feat(v1): add SubNav breadcrumb component (Phase 1 - Foundation PR 3)#482
Open
vitorvasc wants to merge 5 commits into
Open
feat(v1): add SubNav breadcrumb component (Phase 1 - Foundation PR 3)#482vitorvasc wants to merge 5 commits into
vitorvasc wants to merge 5 commits into
Conversation
Signed-off-by: Vitor Vasconcellos <vvasconcellos1@gmail.com>
✅ Deploy Preview for otel-ecosystem-explorer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new <SubNav> breadcrumb component to the v1 sub-app as a foundation primitive. It's not yet mounted on any route; later page-level PRs will consume it.
Changes:
- New
SubNavcomponent withcrumbs(required) and optionalactionsslot, returningnullwhen both are empty. - New scoped
sub-nav.csspartial under.td-subnav, imported fromsrc/v1/styles/index.css. - Vitest coverage for empty/crumbs-only/actions-only/combined render paths.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ecosystem-explorer/src/v1/components/layout/sub-nav.tsx | New SubNav component with breadcrumb landmark and actions slot. |
| ecosystem-explorer/src/v1/components/layout/sub-nav.test.tsx | Unit tests covering the four render permutations. |
| ecosystem-explorer/src/v1/styles/sub-nav.css | Scoped .td-subnav styles for the row. |
| ecosystem-explorer/src/v1/styles/index.css | Imports the new partial; updates header comment. |
Signed-off-by: Vitor Vasconcellos <vvasconcellos1@gmail.com>
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.
First foundation primitive after the v1 router scaffold (#470). SubNav is the breadcrumb row that sits beneath the navbar on every inner page.
Contributes to #84 and #370.
What's in this PR
<SubNav crumbs={...} actions={...} />atsrc/v1/components/layout/sub-nav.tsx:crumbs: BreadcrumbItem[]is required,actions?: ReactNodeis an optional right-side slot for page-level controls<span aria-current="page">. Earlier crumbs render as<Link>whenhrefis set, otherwise as plain textnullwhen bothcrumbsandactionsare empty, so route layouts can mount it unconditionally (home passes nothing, inner pages pass their breadcrumb)ChevronRightseparator.src/v1/styles/sub-nav.cssuses the.td-subnavclass. Selectors only match elements rendered by<V1App />, so it stays inert in the legacy bundlesrc/v1/styles/index.csspicks up one@importfor the new partial plus a comment updateWhat's not in this PR
Verification
bun run typecheckcleanbun run lintcleanbun run test src/v1/components/layout/sub-nav.test.tsxpasses 5/5 (covers empty, crumbs-only, actions-only, crumbs+actions)bun run testpasses 842/842bun run formatno reformatting needed