pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

Reconcile packageRegistry.ts:Kind with registry.ts:RegistryPackage.kind

Open grahamlangford opened this issue 2 years ago • 4 comments

  • The type of Kind in packageRegistry.ts should be a shorthand for RegistryPackage.kind in registry.ts
  • The types do not perfectly overlap.
    • RegistryPackage.kind needs to be updated to include missing kinds
    • Only add kinds that are needed, there may be kinds in packageRegistry.ts:Kind that are unused.

grahamlangford avatar Jul 14 '23 16:07 grahamlangford

The context here is that:

  • EditablePackageMetadata uses the display name: https://github.com/pixiebrix/pixiebrix-app/blob/be1c486eba393e3c8e2f99401f78af5958b4060b/api/models/registry.py#L210-L210
  • RegistryPackage uses the value that appears in the YAML for user-defined packages: https://github.com/pixiebrix/pixiebrix-app/blob/43f0a4b81d8b7aaaf11adbe7fd8e4530ca4b8bf0/api/serializers/brick.py#L204-L204
  • So previously we had shoved both of those into one type with lower casing
  • What we need to do is look to see how packageRegistry is used and determine the actual values that flow through there to ensure the type is correct

twschiller avatar Jul 14 '23 18:07 twschiller

This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.

github-actions[bot] avatar Feb 05 '24 00:02 github-actions[bot]

This is part of the naming work that we still want to complete once we're further along with the service layer work.

grahamlangford avatar Feb 05 '24 13:02 grahamlangford

This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.

github-actions[bot] avatar Jul 04 '24 00:07 github-actions[bot]