Skip to content

FE-1515: Give sidebar list labels the full row width until the row menu shows - #9377

Merged
kube merged 1 commit into
mainfrom
claude/fe-1515-sidebar-row-label-width
Aug 27, 2026
Merged

kube merged 1 commit into
mainfrom
claude/fe-1515-sidebar-row-label-width

Conversation

@kube

@kube kube commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Copy of #9367 which cannot be re-opened.

🌟 What is the purpose of this PR?

Left-sidebar list items cropped inconsistently. Rows with a row menu always reserved space for the hidden "More options" button (it was revealed by animating opacity, which keeps its layout size), so those lists wrapped labels ~20px early — while lists without menus used the full width. And items rendering a name with a subtitle (e.g. parameters) escaped the row's ellipsis and clipped hard, while plain-text items showed "…".

Labels now take the full row width with a consistent ellipsis, and only shrink while the row is hovered (or its menu is open), when the button actually appears.

Before — space reserved for the hidden button, and name/subtitle lines hard-clip without an ellipsis:

image

After — full-width labels, consistent "…" truncation (same net, same 200px sidebar):

image

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • filterable-list-sub-view.tsx hides [data-row-action] with display: none instead of opacity: 0, revealing it on row hover or while its menu is open — the hidden button no longer occupies layout.
  • listItemNameStyle applies its truncation (nowrap, hidden overflow, ellipsis) to nested item lines as well, so name + subtitle renderers truncate like plain-text ones.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

The user guide does not describe row-menu reveal behaviour.

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • The 150ms fade/slide reveal animation is gone — display cannot transition, so the button appears instantly. A @starting-style fade can be added later if the pop feels abrupt.
  • While hidden, the button is no longer in the tab order (display: none). Previously it was tab-focusable but invisible, which was not meaningfully more accessible.

🛡 What tests cover this?

  • None — CSS-only. Verified in the running app: button computes display: none by default and the label content spans the full row (244px of a 256px row); forcing the menu-open state (the same rule as :hover) shows the 20px button and shrinks the content to 224px; nested name and <pre> subtitle lines compute nowrap / ellipsis / hidden.

❓ How to test this?

  1. yarn workspace @hashintel/petrinaut dev, open a story with parameters (e.g. Handle Spike With Sir), narrow the left sidebar.
  2. Long labels truncate with "…" and reach the row's right edge; name and subtitle lines truncate alike.
  3. Hover a row: the "⋯" button appears and the label shortens; unhover with the menu open: the button stays.

🤖 Generated with Claude Code

Rows revealed their action button by animating opacity, so the hidden
button always reserved its layout space: lists with row menus wrapped
labels earlier than lists without, and the space was wasted until hover.
The button is now hidden with display, so labels take the full row width
and only shrink while the row is hovered or its menu is open.

Item content rendered as nested lines (a name with a subtitle) escaped
the row's ellipsis and clipped hard; nested lines now truncate the same
way plain-text items do.
@kube kube self-assigned this Aug 27, 2026
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 27, 2026 1:37pm
petrinaut Ready Ready Preview Aug 27, 2026 1:37pm
petrinaut-docs Ready Ready Preview Aug 27, 2026 1:37pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Aug 27, 2026 1:37pm

Request Review

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels Aug 27, 2026
@kube
kube requested review from CiaranMn and YannisZa August 27, 2026 13:33
@kube
kube marked this pull request as ready for review August 27, 2026 13:34
@cursor

cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
CSS-only layout and truncation in a shared sidebar list component; no auth, data, or API changes. Trade-off is instant menu button reveal and display: none removing the action from tab order while hidden.

Overview
Left sidebar filterable list rows no longer reserve horizontal space for the hidden “More options” control. The row action is hidden with display: none and shown on row hover or while the menu is open (display: flex), so labels use the full row width until the button actually appears. The previous opacity-based reveal (and its slide animation) is removed.

Label truncation is tightened: the name cell gets minWidth: 0 for flex shrinking, and ellipsis/nowrap rules apply to nested content from renderItem (e.g. name + subtitle) so those lines match plain-text items instead of hard-clipping.

Includes a patch changeset for @hashintel/petrinaut.

Reviewed by Cursor Bugbot for commit b2b708e. Bugbot is set up for automated code reviews on this repo. Configure here.

@kube
kube enabled auto-merge August 27, 2026 13:35
@kube
kube added this pull request to the merge queue Aug 27, 2026
Merged via the queue into main with commit c6a3fb5 Aug 27, 2026
61 checks passed
@kube
kube deleted the claude/fe-1515-sidebar-row-label-width branch August 27, 2026 14:08
@hash-release hash-release Bot mentioned this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants