Skip to content

Conversation

@ameer2468
Copy link
Contributor

@ameer2468 ameer2468 commented Sep 16, 2025

Summary by CodeRabbit

  • Style

    • Increased organization name text size on mobile for better readability.
    • Disabled initial navbar width animation and improved width transitions for a more stable desktop experience.
    • Adjusted desktop navbar logo sizing to adapt when the sidebar is collapsed or expanded.
    • Added reserved scrollbar space to prevent layout shifts when scrollbars appear.
  • Refactor

    • Simplified logo sizing with a sensible default for more consistent rendering.
  • Chores

    • Minor layout and responsive polish with no user action required.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adjusted several dashboard UI styles and navbar/Logo behavior: increased mobile org name font, disabled initial sidebar width animation and added will-change styling, made Logo accept/use a viewBoxDimensions default, removed redundant flex-grow classes, added aside w-full, and added scrollbar-gutter fallback in CSS.

Changes

Cohort / File(s) Summary
Mobile tab text
apps/web/app/(org)/dashboard/_components/MobileTab.tsx
Increased organization name font class from text-xs to text-sm.
Navbar (Desktop) & Logo usage
apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx
Set motion.div initial={false} (disabled initial width animation); use numeric width values for animation; added will-change-[width] and bg-gray-1 to wrapper classes; pass viewBoxDimensions={sidebarCollapsed ? "0 0 40 40" : "0 0 120 40"} to Logo.
Logo component API/default
packages/ui/src/components/icons/Logo.tsx
Added parameter default viewBoxDimensions = "0 0 120 40" and bind viewBox={viewBoxDimensions} directly (removed inline fallback).
Layout and inner dashboard structure
apps/web/app/(org)/dashboard/layout.tsx, apps/web/app/(org)/dashboard/_components/DashboardInner.tsx
Added w-full to aside className; removed redundant flex-grow utilities from main/container elements and minor formatting changes.
Global CSS scrollbar handling
apps/web/app/globals.css
Added .custom-scroll { scrollbar-gutter: stable } and a @supports not (scrollbar-gutter: stable) fallback padding to reserve scrollbar space; preserved existing scrollbar visuals.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant DesktopNav
  participant Logo
  User->>DesktopNav: Open dashboard / toggle sidebar
  DesktopNav->>DesktopNav: compute sidebarCollapsed
  alt Collapsed
    DesktopNav->>Logo: render(viewBoxDimensions="0 0 40 40")
  else Expanded
    DesktopNav->>Logo: render(viewBoxDimensions="0 0 120 40")
  end
  Note right of Logo #ddebf7: Logo uses provided prop or its default\n(viewBoxDimensions = "0 0 120 40")
  Logo-->>DesktopNav: SVG element with viewBox applied
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I nibbled on a classname, light and quick,
Pushed fonts a touch, adjusted SVG's trick.
Sidebar breathes without its first small spring,
Scrollbars tucked, and layouts softly sing.
— a rabbit, pleased with tiny fixes 🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the two primary changes in the PR: addressing the dashboard logo behavior when the sidebar collapses and increasing the organization name font size. These map directly to edits in Navbar/Desktop.tsx and Logo.tsx for the logo fix, and MobileTab.tsx for the font-size change. The phrasing is clear, specific, and concise for a chore-level UI adjustment.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 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 babf74d and 513b334.

📒 Files selected for processing (4)
  • apps/web/app/(org)/dashboard/_components/DashboardInner.tsx (1 hunks)
  • apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx (1 hunks)
  • apps/web/app/(org)/dashboard/layout.tsx (1 hunks)
  • apps/web/app/globals.css (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 0

🧹 Nitpick comments (3)
apps/web/app/(org)/dashboard/_components/MobileTab.tsx (1)

95-95: Text size bump looks fine; consider line-height and width tweak to avoid truncation jitter.

At text-sm inside a 16px-tall bar, add a tighter leading and slightly larger max-w to reduce ellipsis frequency on common org names.

Apply:

-      <p className="text-sm mr-2 text-gray-12 truncate w-fit max-w-[90px]">
+      <p className="text-sm leading-tight mr-2 text-gray-12 truncate w-fit max-w-[110px]">
packages/ui/src/components/icons/Logo.tsx (1)

7-9: Defaulted viewBox prop + direct binding — LGTM.

The default "0 0 120 40" and direct viewBox={viewBoxDimensions} simplify behavior and align with Desktop’s conditional usage.

If only two viewBoxes are intended, do you want a constrained helper to prevent typos?

+export const VIEWBOX = {
+  full: "0 0 120 40",
+  compact: "0 0 40 40",
+} as const;

Then use typeof VIEWBOX[keyof typeof VIEWBOX] for the prop and pass VIEWBOX.compact/full at call sites.

Also applies to: 21-23

apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx (1)

56-59: Collapsed state still renders a 120px-wide SVG; set width conditionally to avoid letterboxing/overflow.

With viewBox="0 0 40 40" and preserveAspectRatio="xMidYMid meet", keeping w-[120px] causes horizontal padding/overflow when the sidebar is 70px. Bind width to the state.

Apply:

-            <Logo
-              hideLogoName={sidebarCollapsed}
-              viewBoxDimensions={sidebarCollapsed ? "0 0 40 40" : "0 0 120 40"}
-              className="mx-auto w-[120px] h-[40px]"
-            />
+            <Logo
+              hideLogoName={sidebarCollapsed}
+              viewBoxDimensions={sidebarCollapsed ? "0 0 40 40" : "0 0 120 40"}
+              className={clsx(
+                "mx-auto h-[40px]",
+                sidebarCollapsed ? "w-[40px]" : "w-[120px]",
+              )}
+            />

Please verify in collapsed mode (70px width) that the icon is fully visible without horizontal scroll/clip.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a7df37 and 8792092.

📒 Files selected for processing (3)
  • apps/web/app/(org)/dashboard/_components/MobileTab.tsx (1 hunks)
  • apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx (1 hunks)
  • packages/ui/src/components/icons/Logo.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
apps/web/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/web/**/*.{ts,tsx}: Use TanStack Query v5 for client-side server state and data fetching in the web app
Mutations should call Server Actions and perform precise cache updates with setQueryData/setQueriesData, avoiding broad invalidations
Prefer Server Components for initial data and pass initialData to client components for React Query hydration

Files:

  • apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx
  • apps/web/app/(org)/dashboard/_components/MobileTab.tsx
{apps/web,packages/ui}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

{apps/web,packages/ui}/**/*.{ts,tsx}: Use Tailwind CSS exclusively for styling in the web app and shared React UI components
Component naming: React components in PascalCase; hooks in camelCase starting with 'use'

Files:

  • apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx
  • packages/ui/src/components/icons/Logo.tsx
  • apps/web/app/(org)/dashboard/_components/MobileTab.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use strict TypeScript and avoid any; prefer shared types from packages

**/*.{ts,tsx}: Use Biome to format/lint TypeScript with a 2-space indent
TypeScript file names should be kebab-case (e.g., user-menu.tsx)

Files:

  • apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx
  • packages/ui/src/components/icons/Logo.tsx
  • apps/web/app/(org)/dashboard/_components/MobileTab.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

React/Solid components should be named using PascalCase

Files:

  • apps/web/app/(org)/dashboard/_components/Navbar/Desktop.tsx
  • packages/ui/src/components/icons/Logo.tsx
  • apps/web/app/(org)/dashboard/_components/MobileTab.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build Desktop (aarch64-apple-darwin, macos-latest)
  • GitHub Check: Build Desktop (x86_64-pc-windows-msvc, windows-latest)
  • GitHub Check: Analyze (rust)

@ameer2468 ameer2468 merged commit 5fdf8fc into main Sep 16, 2025
13 of 15 checks passed
@ameer2468 ameer2468 deleted the dashboard-logo-fix branch September 16, 2025 20:21
@coderabbitai coderabbitai bot mentioned this pull request Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants