Repository navigation
fix(SidebarNav): apply multi-class item classes, style the label as a nav link - #309
Merged
Merged
Conversation
… and icon class - title: `class: 'a b'` threw InvalidCharacterError and the whole `c-sidebar-nav` rendered nothing; the title now writes `nav-title` and `item.class` on its host itself (the nav no longer binds the item class pipe on it) and rebuilds its content on item change (was `OneTwo`, stale class kept) - label (`class`, `icon`, `label.class`), badge (`badge.class`), `cSidebarNavIcon`, `SidebarNavHelper.getIconClass()`: a multi-class string was a single record key and never applied - `classMap()` splits class strings on ASCII whitespace into record keys; pipes and helper keep their object shape - label icon `aria-hidden`, now that a font icon glyph renders inside the link
- label `<a>` rendered only `c-nav-label c-active`, which no CoreUI stylesheet styles (v4 dropped the label styles), so it showed as a bare underlined link with the icon above the text and stayed visible in a narrow sidebar - adds `nav-link` (link padding and colour) and `nav-label` (hidden in a narrow sidebar, like titles); `c-nav-label` and `c-active` stay so selectors on them still match, but `.sidebar-nav .nav-link` now wins where both set a property
xidedix
added a commit
that referenced
this pull request
Oct 19, 2026
- fix(alert): hide and emit `visibleChange` when there is no opacity transition (#304) - fix(carousel): measure each swipe from its own touchstart (#303) - fix(collapse.directive): emit `visibleChange` and `collapseChange` when `animate` is false (#292) - fix(dropdown): mirror the menu placement in a right-to-left context (#299) - fix(dropdown, modal, offcanvas): Escape in an open dropdown leaves the container open (#298) - fix(shadow-on-scroll.directive): changing `cShadowOnScroll` drops the old shadow class and scroll listener (#292) - fix(sidebar): apply input changes after first render, scope state actions to their sidebar (#307) - fix(sidebar-nav): apply multi-class item classes, style the label as a nav link (#309) - fix(sidebar-nav-helper): `isActive()` handles array urls (#296) - fix(sidebar-nav-icon.pipe): handle a missing item (#296) - fix(table): keep one responsive wrapper and remove it on destroy (#305) - fix(tabs): Home/End, one key manager, navigate and select by key (#306) - fix: ignore key events without a key (#302) - refactor(tab-pane): `OnPush`, signal state, host metadata (#294) - refactor: drop `ngAcceptInputType_` from signal inputs (#293) - test: run specs zoneless, drop `zone.js` (#295) - test: use `TestBed.createDirective()` in directive specs (#292) - test: cover untested paths across components and services (#300, #301, #308) - ci: bump `actions/setup-node` (#297) - chore(dependencies): update to Angular 22.2.3 (#310) Verified: `npm ci`, lint, tests 30 + 1035 + 60, 3 prod builds.
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.
A nav item
classwith more than one class broke the sidebar nav. On a title,renderer.addClass(host, 'a b')threwInvalidCharacterErrorandc-sidebar-navrendered none of its items; on labels, badges and icons the string went in as a single[class]key, which Angular drops, so nothing was applied.The title now writes
nav-titleanditem.classon its host itself, so the nav no longer binds the item class pipe on it and a standalonec-sidebar-nav-titlegetsnav-titletoo. It rebuilds its text whenitemchanges, so a new item replaces the name and class instead of appending to them.classMap()splits the other class strings on whitespace into one key each;cSidebarNavBadge,cSidebarNavIconandSidebarNavHelper.getIconClass()still return an object. The label icon getsaria-hidden, since a multi-class font icon now renders a glyph inside the link.The label link rendered only
c-nav-label c-active, which no CoreUI stylesheet styles, so it showed as a bare underlined link with the icon above the text. It now also getsnav-linkandnav-label: it looks like the other nav links and hides in a narrow sidebar, like titles.c-nav-labelandc-activestay.