fix(sidebar): prevent title overflow on narrow widths#345
fix(sidebar): prevent title overflow on narrow widths#345Sandesh-Upadhyay wants to merge 1 commit intoapsinghdev:mainfrom
Conversation
|
@Sandesh-Upadhyay is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughApplied CSS utility class adjustments in the Sidebar component to constrain flex children and enable truncation, preventing the Opensox AI title from overflowing in narrow layouts; minor alignment and collapse-toggle layout tweaks were also made. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/web/src/components/dashboard/Sidebar.tsx`:
- Line 94: The class string in the Sidebar component uses a hardcoded hex color
("text-[`#eaeaea`]"); update the className in the Sidebar component (the JSX
element with className containing "text-[`#eaeaea`] font-semibold...") to use the
semantic design-token class (e.g., replace text-[`#eaeaea`] with text-ox-white) so
it follows the Tailwind design-token convention and matches other usages.
- Line 84: IconWrapper is currently a non-interactive div used for icon-only
controls (used with setShowSidebar and the collapse toggle), so refactor
IconWrapper to be keyboard-accessible by rendering a semantic <button> (or at
minimum adding role="button", tabIndex={0}, and an onKeyDown handler that
invokes the click handler on Enter/Space) and accept/forward an aria-label prop;
then update the call sites that use IconWrapper for closing the sidebar (where
setShowSidebar(false) is called) and the collapse toggle (where isCollapsed is
toggled) to pass aria-label="close sidebar" and aria-label={isCollapsed ?
"expand sidebar" : "collapse sidebar"} respectively (if IconWrapper already
exposes aria support just supply the labels). Ensure IconWrapper forwards
onClick and onKeyDown to make keyboard activation work.
Made-with: Cursor
b1a9f83 to
7bf3114
Compare
|
I've resolved the previous review comments and synced the branch with upstream. Please let me know if any further adjustments are needed. |
|
@apsinghdev The branch is now synced with upstream and review comments have been addressed. |
Fixes sidebar title overflow when screen width is reduced (~50%).
min-w-0to allow proper flex shrinkingtruncateto prevent overflowCloses #343
Summary by CodeRabbit