Skip to content

feat: implement remaining UIShell sub-components - #685

Merged
patricklx merged 5 commits into
mainfrom
fix-issue-638
Aug 4, 2026
Merged

feat: implement remaining UIShell sub-components#685
patricklx merged 5 commits into
mainfrom
fix-issue-638

Conversation

@patricklx

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #637: implements the remaining React UIShell sub-components that were tracked as missing in #638.

  • HeaderMenu / HeaderMenuItem — dropdown submenus in the top Header nav, yielded from Nav's default block alongside the existing Item.
  • HeaderPanel — expandable panel yielded from Header's new headerPanel named block (e.g. for an app-switcher panel toggled from a GlobalAction).
  • Switcher / SwitcherItem / SwitcherDivider — yielded from the top-level shell hash as Switcher.
  • SideNavHeader / SideNavDetails / SideNavIcon — yielded from Sidenav's default block alongside the existing Menu/Divider.
  • HeaderSideNavItems — mirrors header nav items into the side nav for smaller viewports; also yielded from Sidenav's default block.
  • HeaderContainer — new stateful wrapper (yielded from the top-level shell hash) that owns isSideNavExpanded and collapses it on Escape, yielding isSideNavExpanded/onClickSideNavExpand so consumers no longer have to manage that state themselves.

All new markup uses cds-- prefixed classes matching the React implementation's DOM structure.

Test plan

  • cd carbon-components-ember && pnpm build succeeds
  • cd test-app && pnpm test -- --filter="UIShell" — all 11 UIShell tests pass (added 6 new tests covering HeaderMenu, HeaderPanel, Switcher, Sidenav sub-components, and HeaderContainer)
  • Docs updated at docs-app/public/docs/2-components/ui-shell.md with one live-preview example per new sub-component group

Closes #638

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📖 Docs Preview

Preview has been removed (PR closed or preview label removed).

github-actions Bot pushed a commit that referenced this pull request Jul 29, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 1, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 1, 2026
@patricklx
patricklx force-pushed the fix-issue-638 branch 2 times, most recently from 232d8c6 to bd00473 Compare August 2, 2026 13:05
Adds HeaderMenu/HeaderMenuItem (dropdown submenus in the top Header nav),
HeaderPanel and the top-level Switcher/SwitcherItem/SwitcherDivider (app
switcher panel), SideNavHeader/SideNavDetails/SideNavIcon, and
HeaderSideNavItems (mirrors header items into the side nav). Also adds
HeaderContainer, a stateful wrapper that manages isSideNavExpanded and
collapses it on Escape so consumers no longer have to manage that state
themselves.

Closes #638

Signed-off-by: Patrick Pircher <patrick.pircher@ibm.com>
The header submenu trigger anchor uses aria-haspopup/aria-expanded,
which template-lint flags because <a href="#"> resolves to an
implicit generic role rather than link (matches existing precedent in
select.gts). The header panel's keydown listener sits on a
non-interactive div, matching the same disable used in toggletip,
tooltip, and tree-view for Escape-key handling.

Signed-off-by: Patrick Pircher <patrick.pircher@ibm.com>
github-actions Bot pushed a commit that referenced this pull request Aug 2, 2026
The header menu toggle used <Icon @ICON='menu'/>, a string-keyed lookup
into IconMap via registerIcon(), but nothing in the codebase ever calls
registerIcon() since the per-icon-component refactor — so the toggle
button rendered no icon at all. Use the real Menu/Close icon components
instead, matching how every other icon in ui-shell is rendered.

HeaderGlobalAction's button was also missing the cds--btn--icon-only
class that Carbon's CSS requires to center an icon-only button
(.cds--header__action alone is only display:inline-flex, with no
align-items/justify-content), so global action icons rendered flush to
the left instead of centered.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Patrick Pircher <patrick.pircher@ibm.com>
github-actions Bot pushed a commit that referenced this pull request Aug 3, 2026
…ring

Add assertions for the two symptoms fixed in 587eeeb so a regression
fails a test instead of only being caught visually: the menu toggle
renders an svg that swaps between Menu/Close based on @OPEN, and
HeaderGlobalAction's button carries cds--btn--icon-only and renders
its icon.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Patrick Pircher <patrick.pircher@ibm.com>
github-actions Bot pushed a commit that referenced this pull request Aug 3, 2026
Without cds--btn, Carbon's icon fill-color rule
(.cds--btn.cds--btn--icon-only.cds--header__action svg) never matches,
so the icon never gets the intended icon-secondary/icon-primary color
or hover feedback.

Signed-off-by: Patrick Pircher <patrick.pircher@ibm.com>
github-actions Bot pushed a commit that referenced this pull request Aug 3, 2026
@patricklx
patricklx merged commit cafeb66 into main Aug 4, 2026
8 checks passed
@patricklx
patricklx deleted the fix-issue-638 branch August 4, 2026 09:12
github-actions Bot pushed a commit that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Parity Check] UIShell: implement remaining React sub-components

1 participant