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

feat(prompts): update prompt version tags on set #5946

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

mikeldking
Copy link
Contributor

resolves #5939

This mostly solves the problem of keeping the tags up to date on a version. It's not clear if this is sufficient to update all the versions' tags. Will follow up on that one. This at least moves the tags ui into a component for now to make the data refreshing easy via a fragment.

Screen.Recording.2025-01-07.at.4.49.43.PM.mov

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 7, 2025
Comment on lines +25 to +32
const tags = data.tags.map((tag) => ({
id: tag.id,
name: tag.name,
}));
return (
<TagGroup aria-label="Prompt Version Tags">
<TagList items={tags}>{(tag) => <Tag>{tag.name}</Tag>}</TagList>
</TagGroup>
Copy link
Contributor

Choose a reason for hiding this comment

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

This map seems extraneous

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah it seems that way but in reality the aria-components builds a collection under the hood. Without this it's not wrapped in a collection and it doesn't let you map over tags inside the list. It's weird but how it works.

@mikeldking mikeldking merged commit c95efcb into prompts Jan 8, 2025
6 checks passed
@mikeldking mikeldking deleted the mikeldking/5939-prompt-version-on-node branch January 8, 2025 00:10
mikeldking added a commit that referenced this pull request Jan 9, 2025
* feat(prompts): update prompt version tags on set

* remove unnecessary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants