Skip to content

fix: stop 'PlayCanvas Web Components' sidebar label wrapping#1038

Merged
willeastcott merged 1 commit into
mainfrom
fix/sidebar-web-components-nowrap
Jun 10, 2026
Merged

fix: stop 'PlayCanvas Web Components' sidebar label wrapping#1038
willeastcott merged 1 commit into
mainfrom
fix/sidebar-web-components-nowrap

Conversation

@willeastcott

Copy link
Copy Markdown
Contributor

What changed

  • Added className: 'sidebar-item-nowrap' to the PlayCanvas Web Components category in sidebars.js
  • Added a matching CSS rule in src/css/custom.scss that applies white-space: nowrap to that item's sidebar link

Why

The 'PlayCanvas Web Components' sidebar label is borderline at the 310px sidebar width, so depending on OS/browser font metrics it sometimes rendered on one line and sometimes wrapped 'Components' onto a second line. This pins it to a single line everywhere.

Notes for reviewers

  • The fix is scoped to this one item rather than all sidebar links, to avoid clipping risk on deeply nested labels. The class is reusable if other labels develop the same issue.
  • There's comfortably enough horizontal room for the label on one line (~185px of text in ~240px of space), so nowrap won't overflow into the collapse caret.
  • The CSS targets the rendered menu__link element, so the Japanese locale (shared sidebar structure) is covered too.

🤖 Generated with Claude Code

The label is borderline at the 310px sidebar width, so platform font
metric differences sometimes wrapped it to two lines. Pin the item to a
single line via a targeted sidebar-item-nowrap class.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@willeastcott willeastcott merged commit 67e89f5 into main Jun 10, 2026
3 checks passed
@willeastcott willeastcott deleted the fix/sidebar-web-components-nowrap branch June 10, 2026 12:03
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.

1 participant