-
Notifications
You must be signed in to change notification settings - Fork 2
Add Versions component in Breadcrumb #224
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
Conversation
Can be used for iceberg versions, or for git branches, for example. See hyparam/space#3
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.
Pull Request Overview
This PR introduces versioning support to the Breadcrumb component by adding new types and UI elements to display version or branch links.
- Added TypeScript interfaces (Version, VersionsData) and integrated these into the Source type.
- Updated configuration (useConfig) to include a versions property for styling.
- Implemented a Versions component within Breadcrumb, with corresponding tests and a Storybook story demonstrating its behavior.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/sources/types.ts | Added interfaces for version data and updated BaseSource to optionally include versions. |
| src/hooks/useConfig.ts | Added a configuration key for versions to support custom styling for the new component. |
| src/components/Breadcrumb/Breadcrumb.tsx | Introduced a Versions component that utilizes a Dropdown for rendering version links. |
| src/components/Breadcrumb/Breadcrumb.test.tsx | Implemented tests to verify that version links are rendered correctly when supplied. |
| src/components/Breadcrumb/Breadcrumb.stories.tsx | Added a Storybook story to showcase the Versions component integration. |
Files not reviewed (2)
- .storybook/global.css: Language not supported
- src/components/Breadcrumb/Breadcrumb.module.css: Language not supported
platypii
left a comment
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.
nice abstraction
|
I'm not 100% happy with it because
But let's merge to have a branch selector in the space, and we can revisit later if needed. |
|
Hmmm I forgot that the Source is parsed synchronously in the app, while the list of branches or versions is generally fetched asynchronously. I'll work on a follow-up PR that fixes this (and maybe the other issues mentioned above) |
|
See #226 |
Can be used for iceberg versions, or git branches, for example.
See hyparam/space#3