Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/components/nav-projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export function NavProjects() {
</span>
</DropdownMenuTrigger>
<DropdownMenuContent
className="w-44 rounded-lg"
className="w-auto rounded-lg"
side={isMobile ? "bottom" : "right"}
align={isMobile ? "end" : "start"}
Comment on lines +281 to 283

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Min-width unintentionally removed 🐞 Bug ≡ Correctness

NavProjects sets DropdownMenuContent to "w-auto", which matches MenuPopup’s "[class*='w-']" check
and disables the component’s built-in "min-w-32" fallback. This can make the menu shrink narrower
than before and increases the chance of wrapped labels being visually clipped given the fixed "h-7"
menu item heights in this dropdown.
Agent Prompt
### Issue description
`NavProjects` changed the project context dropdown width from a fixed `w-44` to `w-auto`. In `MenuPopup` (aliased as `DropdownMenuContent`), a default `min-w-32` is applied **only** when the consumer does *not* provide any class containing `w-`. Because `w-auto` contains `w-`, the default minimum width is now disabled, which can cause overly narrow popups and wrapping/clipping regressions.

### Issue Context
- `MenuPopup` has a conditional Tailwind rule: `not-[class*='w-']:min-w-32`.
- Adding `w-auto` is effectively redundant (divs are `width: auto` by default), but it changes behavior by suppressing the default min width.

### Fix Focus Areas
- apps/web/src/components/nav-projects.tsx[280-284]
- apps/web/src/components/ui/menu.tsx[55-74]

### Suggested fix
Use one of these approaches:
1) Remove the explicit width class entirely and rely on the shared default min width:
   - change `className="w-auto rounded-lg"` -> `className="rounded-lg"`

2) If you want to preserve the old minimum while allowing growth for longer translations, set a min-width explicitly:
   - e.g. `className="min-w-44 rounded-lg"` (and do **not** use a fixed `w-*`).

Option (2) most closely keeps the previous baseline width while still fixing long-language truncation/wrapping.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@MonsPropre thank you for the contribution. Can you take a look at this comment and decide if you want to implement it? If you do not, please provide your reasoning. Thanks!

>
Expand Down
Loading