Skip to content
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

Merged
merged 10 commits into from
Nov 19, 2024
Merged

Conversation

gtarpenning
Copy link
Member

@gtarpenning gtarpenning commented Nov 15, 2024

Description

https://wandb.atlassian.net/browse/WB-21665

Create annotation specs.

Screenshot 2024-11-15 at 3 35 34 PM

Testing

How was this PR tested?

@gtarpenning gtarpenning marked this pull request as ready for review November 15, 2024 22:53
@gtarpenning gtarpenning requested review from a team as code owners November 15, 2024 22:53
@gtarpenning gtarpenning changed the title Griffin/annotation spec create chore(ui): create annotation specs Nov 15, 2024
@circle-job-mirror
Copy link

circle-job-mirror bot commented Nov 15, 2024

Description: z.string().min(1),
Type: z.discriminatedUnion('type', [
z.object({
type: z.literal('boolean'),
Copy link
Collaborator

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.

Copy link
Member Author

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"
Copy link
Collaborator

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} />
Copy link
Collaborator

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

Copy link
Member Author

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'),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here :)

@gtarpenning gtarpenning merged commit f38d1e6 into master Nov 19, 2024
115 checks passed
@gtarpenning gtarpenning deleted the griffin/annotation-spec-create branch November 19, 2024 01:43
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants