-
Notifications
You must be signed in to change notification settings - Fork 559
Dashboard: add "Contracts" link in contract layout header #7436
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
Dashboard: add "Contracts" link in contract layout header #7436
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
## Walkthrough
The changes introduce an optional `currentProjectSubpath` prop to multiple team header components, enabling the display of an additional breadcrumb-like navigation element for active project subpages. This enhancement is reflected in the main component, its client wrapper, and Storybook stories, with updated imports and minor UI adjustments.
## Changes
| File(s) | Change Summary |
|---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| .../team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx | Updated imports; added `currentProjectSubpath` prop to `TeamHeaderLoggedIn` with Contracts link and icon. |
| .../components/TeamHeader/TeamHeaderUI.stories.tsx | Added story variant for "Pro Plan - active subpage"; extended `Variant` component with `currentProjectSubpath` prop. |
| .../components/TeamHeader/TeamHeaderUI.tsx | Added optional `currentProjectSubpath` prop; rendered additional breadcrumb UI if present. |
| .../components/TeamHeader/team-header-logged-in.client.tsx | Extended props to accept and forward `currentProjectSubpath` to header UI components. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant User
participant ContractLayout
participant TeamHeaderLoggedIn
participant TeamHeaderDesktopUI
User->>ContractLayout: Access contract page
ContractLayout->>TeamHeaderLoggedIn: Render with currentProjectSubpath prop
TeamHeaderLoggedIn->>TeamHeaderDesktopUI: Pass currentProjectSubpath prop
TeamHeaderDesktopUI->>User: Render header with breadcrumb (if currentProjectSubpath present) Suggested labels
Suggested reviewers
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7436 +/- ##
=======================================
Coverage 51.96% 51.96%
=======================================
Files 947 947
Lines 63809 63809
Branches 4216 4216
=======================================
Hits 33161 33161
Misses 30542 30542
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
ad3036e
to
21e58ee
Compare
Merge activity
|
 <!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a new optional property, `currentProjectSubpath`, to enhance the `TeamHeader` components by allowing the display of additional project navigation details, including a label, href, and icon. ### Detailed summary - Added `currentProjectSubpath` property to `TeamHeaderLoggedIn` and `TeamHeaderDesktopUI`. - Updated `TeamHeaderUI` to render project subpath details if provided. - Introduced a new story in `TeamHeaderUI.stories.tsx` to showcase the `currentProjectSubpath` feature. - Integrated `currentProjectSubpath` into the `ContractLayout` component for enhanced navigation. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for displaying an active project subpage link with an icon in the team header, enhancing breadcrumb navigation for projects. - Updated the team header to visually indicate the current subpage within a project. - **Documentation** - Added a new Storybook variant to demonstrate the team header with an active subpage link. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
21e58ee
to
d85ee5f
Compare
PR-Codex overview
This PR introduces a new optional property
currentProjectSubpath
to various components related to theTeamHeader
. This property allows the display of additional project navigation information, enhancing the user interface for project management.Detailed summary
currentProjectSubpath
property toTeamHeaderLoggedIn
component.TeamHeaderDesktopUI
to render project subpath details if available.currentProjectSubpath
inTeamHeaderUI
stories for testing.ContractLayout
to include project subpath information.Summary by CodeRabbit
New Features
Documentation