Merged
Conversation
Can be used for iceberg versions, or for git branches, for example. See hyparam/space#3
Contributor
There was a problem hiding this comment.
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
Contributor
Author
|
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. |
Contributor
Author
|
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) |
severo
added a commit
that referenced
this pull request
Apr 23, 2025
Contributor
Author
|
See #226 |
severo
added a commit
that referenced
this pull request
Apr 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Can be used for iceberg versions, or git branches, for example.
See hyparam/space#3