-
Notifications
You must be signed in to change notification settings - Fork 71
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
chore(ui): create annotation specs #3003
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=cc0c90f0ed0ea2c27e67e049f0b90f40fd00865c |
Description: z.string().min(1), | ||
Type: z.discriminatedUnion('type', [ | ||
z.object({ | ||
type: z.literal('boolean'), |
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.
you might want to capitalize Boolean (and other properties / literals) so that they render on the schema editor as such... depends on the display layer that you want.
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 honestly think it looks fine, because its not a label, it just gets rendered in the selector dropdown.
size="small" | ||
variant="ghost" | ||
icon="delete" | ||
tooltip="Remove this key" |
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.
remove this entry
/> | ||
{fieldDescription && ( | ||
<Box display="flex" alignItems="center" sx={{marginTop: '14px'}}> | ||
<DescriptionTooltip description={fieldDescription} /> |
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 styling seems odd to me
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.
yeah because the icon gets centered in the whole div which is tall because of the TextFieldWithLabel being multi-line. We could add the description in TextFieldWithLabel but that breaks the pattern.
}), | ||
z.object({ | ||
type: z.literal('enum'), | ||
enum: z.array(z.string()).describe('List of options to choose from'), |
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 :)
Description
https://wandb.atlassian.net/browse/WB-21665
Create annotation specs.
Testing
How was this PR tested?