FE-1723: Cap the size of Petrinaut's Open submenu and elide long net titles - #9739
Conversation
Add a `menuClassName` to selectable-list items that carry `subItems`, applied to that item's submenu content, and use it to size the Open submenu and truncate the saved-net titles inside it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VkuGK4P2VXYGTXBTZbC67H
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VkuGK4P2VXYGTXBTZbC67H
PR SummaryLow Risk Overview Petrinaut’s hamburger Open entry uses it with Panda styles: Ships a Reviewed by Cursor Bugbot for commit 87ea955. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Standing down on five red checks — none of them are this diff's, and no code change is needed.
The The run set on the live head is the real one, and its suites are executing rather than being skipped —
No commits pushed for any of this. Generated by Claude Code |
Requested by Ciaran Morinan · Slack thread
🌟 What is the purpose of this PR?
Before: the hamburger menu's Open submenu has one entry per saved net and sizes itself to its longest entry, so one net titled with a full sentence stretched it across the viewport — and the title wrapped over several lines instead of ending in an ellipsis.
After: that submenu is at most
min(600px, 70vw)wide andmin(800px, 80vh)tall, it scrolls when there are more nets than fit, and a title too long for the row ends in an ellipsis with its relative timestamp still visible.🔗 Related links
🚫 Blocked by
🔍 What does this change?
SelectableListitems that carrysubItemsaccept a new optionalmenuClassName, applied to that item's submenu content alongside the list's own class; Petrinaut passes one on the Open item carrying the two caps andwhite-space: nowrap. Nothing else changes appearance, since no shared style is touched and no other consumer passes the prop.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
A single
patchchangeset for@hashintel/ds-components.📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
None.
🐾 Next steps
If other menus want the same treatment,
menuClassNameis the hook; capping the shared recipe instead stays a design-system decision.🛡 What tests cover this?
No new test — the change is CSS on one menu. Existing ds-components snapshots cover the primitive's unchanged appearance.
❓ How to test this?
📹 Demo
Verified in the ds-components nested-menu story with the same style applied through
menuClassName; screenshots and measurements are in the Slack thread.🤖 Generated with Claude Code
https://claude.ai/code/session_01VkuGK4P2VXYGTXBTZbC67H
Generated by Claude Code