feat: implement remaining UIShell sub-components - #685
Merged
Conversation
8 tasks
Contributor
📖 Docs Preview
|
patricklx
force-pushed
the
fix-issue-638
branch
from
August 1, 2026 12:35
ff2fea0 to
57b7743
Compare
patricklx
force-pushed
the
fix-issue-638
branch
2 times, most recently
from
August 2, 2026 13:05
232d8c6 to
bd00473
Compare
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>
patricklx
force-pushed
the
fix-issue-638
branch
from
August 2, 2026 20:02
bd00473 to
c2bd259
Compare
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>
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #637: implements the remaining React
UIShellsub-components that were tracked as missing in #638.HeaderMenu/HeaderMenuItem— dropdown submenus in the topHeadernav, yielded fromNav's default block alongside the existingItem.HeaderPanel— expandable panel yielded fromHeader's newheaderPanelnamed block (e.g. for an app-switcher panel toggled from aGlobalAction).Switcher/SwitcherItem/SwitcherDivider— yielded from the top-levelshellhash asSwitcher.SideNavHeader/SideNavDetails/SideNavIcon— yielded fromSidenav's default block alongside the existingMenu/Divider.HeaderSideNavItems— mirrors header nav items into the side nav for smaller viewports; also yielded fromSidenav's default block.HeaderContainer— new stateful wrapper (yielded from the top-levelshellhash) that ownsisSideNavExpandedand collapses it on Escape, yieldingisSideNavExpanded/onClickSideNavExpandso 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 buildsucceedscd 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-app/public/docs/2-components/ui-shell.mdwith one live-preview example per new sub-component groupCloses #638