-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix plugin metadata IDs #453
Conversation
@@ -42,9 +42,10 @@ export function MetadataList({ | |||
Use list wrapper so that the preview highlight overlay only renders as | |||
tall as the content. | |||
*/} | |||
<div id={id} className={clsx('text-sm', className)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's the reason why we had duplicate IDs lol
@@ -157,7 +158,7 @@ function PluginMetadataBase({ | |||
className="h-56" | |||
render={() => ( | |||
<> | |||
{renderSingleItemList('version', { highlight: false })} | |||
{renderSingleItemList('version')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the version wasn't being highlighted for some reason, I must have mistakenly added this highlight: false
to this field. Since the plugin version is a part of the required metadata for the preview page, I re-enabled highlighting for this field.
@@ -275,3 +275,5 @@ export type MetadataKeys = keyof Omit< | |||
Metadata, | |||
'actionRepository' | 'workflowSteps' | 'imageModality' | 'supportedData' | |||
>; | |||
|
|||
export type MetadataId = `metadata-${MetadataKeys}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses the new template literal types from TypeScript 4.1:
https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html
Fixes:
This works by adding a the prefix
metadata-
to plugin metadata IDs.FYI: @justinelarsen @neuromusic
For review: @klai95 @kne42