Skip to content

Dashboard: group project sidebar links #7417

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

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Jun 23, 2025


PR-Codex overview

This PR refactors the ProjectSidebarLayout.tsx to enhance the sidebar structure by introducing groups for links and improving the rendering of sidebar items. It also modifies the way sidebar links are displayed, replacing SidebarGroup with RenderSidebarMenu.

Detailed summary

  • Added grouping for sidebar links: "Build", "Monetize", and "Scale".
  • Introduced RenderSidebarMenu for rendering links instead of RenderSidebarGroup.
  • Updated link structure to include links arrays for grouped items.
  • Changed sidebar item rendering from SidebarMenuItem to SidebarMenuSubItem.
  • Improved handling of separators in the sidebar.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Refactor
    • Organized sidebar navigation into clear groups ("Build," "Monetize," "Scale") for easier access to related links.
    • Enhanced sidebar menu rendering with a new modular structure for improved navigation and interaction.

Copy link

vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 9:20pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Jun 23, 2025 9:20pm
nebula ⬜️ Skipped (Inspect) Jun 23, 2025 9:20pm
thirdweb_playground ⬜️ Skipped (Inspect) Jun 23, 2025 9:20pm
wallet-ui ⬜️ Skipped (Inspect) Jun 23, 2025 9:20pm

@vercel vercel bot temporarily deployed to Preview – docs-v2 June 23, 2025 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 23, 2025 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula June 23, 2025 20:42 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 23, 2025 20:42 Inactive
Copy link

changeset-bot bot commented Jun 23, 2025

⚠️ No Changeset found

Latest commit: 66270f7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jun 23, 2025

"""

Walkthrough

The sidebar navigation logic was refactored to introduce a more modular rendering structure. The previous sidebar components were replaced with a new RenderSidebarMenu for rendering sidebar links and a simplified RenderSidebarGroup. Sidebar links in the project layout were reorganized into hierarchical groups labeled "Build," "Monetize," and "Scale."

Changes

File(s) Change Summary
apps/dashboard/src/@/components/blocks/SidebarLayout.tsx Refactored sidebar rendering: introduced RenderSidebarMenu, simplified RenderSidebarGroup, updated link handling, and changed group prop types.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx Reorganized sidebar links into "Build," "Monetize," and "Scale" groups; added conditional and grouped links, removed separators between individual links.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SidebarLayout
    participant RenderSidebarMenu
    participant RenderSidebarGroup

    User->>SidebarLayout: Render sidebar
    SidebarLayout->>RenderSidebarGroup: For each group, render with groupName and sidebarLinks
    RenderSidebarGroup->>RenderSidebarMenu: Pass sidebarLinks to RenderSidebarMenu
    RenderSidebarMenu->>SidebarLayout: Render link items, separators, and nested groups
Loading

Suggested reviewers

  • jnsdls
    """

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1676b9 and 66270f7.

📒 Files selected for processing (2)
  • apps/dashboard/src/@/components/blocks/SidebarLayout.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx
  • apps/dashboard/src/@/components/blocks/SidebarLayout.tsx
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MananTank MananTank marked this pull request as ready for review June 23, 2025 20:42
@MananTank MananTank requested review from a team as code owners June 23, 2025 20:42
@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Jun 23, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@MananTank MananTank changed the title Dashboard: group Project sidebar links Dashboard: group project sidebar links Jun 23, 2025
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.08%. Comparing base (11b4d9e) to head (66270f7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7417   +/-   ##
=======================================
  Coverage   52.08%   52.08%           
=======================================
  Files         947      947           
  Lines       63636    63636           
  Branches     4222     4222           
=======================================
  Hits        33146    33146           
  Misses      30384    30384           
  Partials      106      106           
Flag Coverage Δ
packages 52.08% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Jun 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.56 KB (0%) 1.3 s (0%) 286 ms (+156.62% 🔺) 1.6 s
thirdweb (cjs) 350.74 KB (0%) 7.1 s (0%) 988 ms (+8.23% 🔺) 8.1 s
thirdweb (minimal + tree-shaking) 5.72 KB (0%) 115 ms (0%) 111 ms (+1628.04% 🔺) 226 ms
thirdweb/chains (tree-shaking) 530 B (0%) 11 ms (0%) 64 ms (+1937.39% 🔺) 75 ms
thirdweb/react (minimal + tree-shaking) 19.61 KB (0%) 393 ms (0%) 102 ms (+432.61% 🔺) 495 ms

Copy link
Contributor

graphite-app bot commented Jun 23, 2025

Merge activity

graphite-app bot pushed a commit that referenced this pull request Jun 23, 2025
<!--

## 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 focuses on enhancing the sidebar layout by introducing new components for better organization and rendering of sidebar links. It refactors the sidebar structure to use `RenderSidebarMenu` and `RenderSidebarGroup`, allowing for grouped sidebar items.

### Detailed summary
- Added `SidebarGroupLabel` and `SidebarMenuSubItem` components.
- Refactored `FullWidthSidebarLayout` to use `RenderSidebarMenu` instead of `RenderSidebarGroup`.
- Updated `RenderSidebarGroup` to include `SidebarGroupLabel` and `SidebarMenuItem`.
- Introduced grouping for sidebar links with `group` and `links` properties.
- Enhanced sidebar link structure to support separators and improved organization.

> ✨ 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

- **Refactor**
  - Improved sidebar navigation by organizing links into hierarchical groups ("Build," "Monetize," "Scale") for better clarity and usability.
  - Updated sidebar rendering for greater modularity and maintainability, with enhanced grouping and link management.

- **Style**
  - Sidebar appearance and structure are updated for a more organized and user-friendly experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 06-24-dashboard_group_project_sidebar_links branch from c37bc05 to c1676b9 Compare June 23, 2025 21:05
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 23, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula June 23, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 23, 2025 21:05 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 23, 2025 21:05 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/dashboard/src/@/components/blocks/SidebarLayout.tsx (1)

103-112: Review the semantic correctness of wrapping SidebarGroupLabel in SidebarMenuItem.

The current implementation wraps SidebarGroupLabel inside a SidebarMenuItem, which may not be semantically correct. Consider if the group label should be a direct child of SidebarGroup instead.

-<SidebarGroup className="p-0">
-  <SidebarMenuItem>
-    <SidebarGroupLabel> {props.groupName}</SidebarGroupLabel>
-    <SidebarGroupContent>
-      <RenderSidebarMenu links={props.sidebarLinks} />
-    </SidebarGroupContent>
-  </SidebarMenuItem>
-</SidebarGroup>
+<SidebarGroup className="p-0">
+  <SidebarGroupLabel>{props.groupName}</SidebarGroupLabel>
+  <SidebarGroupContent>
+    <RenderSidebarMenu links={props.sidebarLinks} />
+  </SidebarGroupContent>
+</SidebarGroup>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c37bc05 and c1676b9.

📒 Files selected for processing (2)
  • apps/dashboard/src/@/components/blocks/SidebarLayout.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/components/ProjectSidebarLayout.tsx
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.@(ts|tsx)`: Accept a typed 'props' object and export a named function (e.g., export function MyComponent()). Combine class names via 'cn', expose 'className' prop if useful. ...

**/*.@(ts|tsx): Accept a typed 'props' object and export a named function (e.g., export function MyComponent()).
Combine class names via 'cn', expose 'className' prop if useful.
Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
Local state or effects live inside; data fetching happens in hooks.
Merge class names with 'cn' from '@/lib/utils' to keep conditional logic readable.
Stick to design-tokens: background ('bg-card'), borders ('border-border'), muted text ('text-muted-foreground') etc.
Use the 'container' class with a 'max-w-7xl' cap for page width consistency.
Spacing utilities ('px-', 'py-', 'gap-*') are preferred over custom margins.
Responsive helpers follow mobile-first ('max-sm', 'md', 'lg', 'xl').
Never hard-code colors – always go through Tailwind variables.
Tailwind CSS is the styling system – avoid inline styles or CSS modules.
Prefix files with 'import "server-only";' so they never end up in the client bundle (for server-only code).

  • apps/dashboard/src/@/components/blocks/SidebarLayout.tsx
🧬 Code Graph Analysis (1)
apps/dashboard/src/@/components/blocks/SidebarLayout.tsx (2)
apps/dashboard/src/@/components/ui/sidebar.tsx (10)
  • SidebarContent (751-751)
  • SidebarFooter (752-752)
  • SidebarGroup (753-753)
  • SidebarMenuItem (764-764)
  • SidebarGroupLabel (756-756)
  • SidebarGroupContent (755-755)
  • useSidebar (773-773)
  • SidebarMenu (760-760)
  • SidebarMenuSubItem (768-768)
  • SidebarSeparator (771-771)
apps/dashboard/src/@/components/blocks/Sidebar.tsx (1)
  • SidebarLink (15-23)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
apps/dashboard/src/@/components/blocks/SidebarLayout.tsx (5)

7-7: LGTM! New UI component imports are properly added.

The imports for SidebarGroupLabel and SidebarMenuSubItem align with the refactored sidebar structure and are correctly imported from the UI library.

Also applies to: 11-11


71-72: LGTM! Sidebar rendering refactor improves modularity.

The change from RenderSidebarGroup to RenderSidebarMenu creates a cleaner separation of concerns and the addition of padding to SidebarContent improves the visual layout.

Also applies to: 77-77


115-116: LGTM! Good use of the useSidebar hook for mobile functionality.

The RenderSidebarMenu function properly uses the useSidebar hook to manage mobile sidebar state, which provides a better user experience.


123-123: LGTM! Correct use of SidebarMenuSubItem for individual links.

The change from SidebarMenuItem to SidebarMenuSubItem for individual links is semantically correct and aligns with the hierarchical sidebar structure.

Also applies to: 139-139


101-101: To accurately locate all usages of RenderSidebarGroup, let’s rerun the search without relying on ripgrep’s preset file types:

#!/bin/bash
# Search for usages of RenderSidebarGroup across .ts and .tsx files
rg -A5 -B2 RenderSidebarGroup -g '*.ts' -g '*.tsx'

<!--

## 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 focuses on enhancing the sidebar layout by introducing new components for better organization and rendering of sidebar links. It refactors the sidebar structure to use `RenderSidebarMenu` and `RenderSidebarGroup`, allowing for grouped sidebar items.

### Detailed summary
- Added `SidebarGroupLabel` and `SidebarMenuSubItem` components.
- Refactored `FullWidthSidebarLayout` to use `RenderSidebarMenu` instead of `RenderSidebarGroup`.
- Updated `RenderSidebarGroup` to include `SidebarGroupLabel` and `SidebarMenuItem`.
- Introduced grouping for sidebar links with `group` and `links` properties.
- Enhanced sidebar link structure to support separators and improved organization.

> ✨ 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

- **Refactor**
  - Improved sidebar navigation by organizing links into hierarchical groups ("Build," "Monetize," "Scale") for better clarity and usability.
  - Updated sidebar rendering for greater modularity and maintainability, with enhanced grouping and link management.

- **Style**
  - Sidebar appearance and structure are updated for a more organized and user-friendly experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@MananTank MananTank force-pushed the 06-24-dashboard_group_project_sidebar_links branch from c1676b9 to 66270f7 Compare June 23, 2025 21:12
@vercel vercel bot temporarily deployed to Preview – wallet-ui June 23, 2025 21:12 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground June 23, 2025 21:12 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 June 23, 2025 21:12 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula June 23, 2025 21:12 Inactive
@graphite-app graphite-app bot merged commit 66270f7 into main Jun 23, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 06-24-dashboard_group_project_sidebar_links branch June 23, 2025 21:21
@vercel vercel bot temporarily deployed to Production – thirdweb_playground June 23, 2025 21:21 Inactive
@vercel vercel bot temporarily deployed to Production – nebula June 23, 2025 21:21 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui June 23, 2025 21:21 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 June 23, 2025 21:21 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants