Skip to content

fix(Sidebar): apply input changes after first render, scope state actions to their sidebar - #307

Merged
xidedix merged 1 commit into
v5.7from
fix/sidebar-state
Oct 16, 2026
Merged

xidedix merged 1 commit into
v5.7from
fix/sidebar-state

Conversation

@xidedix

@xidedix xidedix commented Oct 16, 2026

Copy link
Copy Markdown
Member

Sidebar ignored input changes after first render, and internal actions leaked to other sidebars.

  • ngOnChanges looked for visible, narrow, unfoldable; with signal inputs SimpleChanges carries visibleInput, narrowInput, unfoldableInput. [visible] false to true left hide and inert; first unfoldable toggle after an [unfoldable] change did nothing. SimpleChanges<SidebarComponent> now fails the build when an *Input field is renamed. An init flag replaces firstChange, so the first setInput() after render applies too.
  • Actions carrying a sidebar reference (init, layout change, backdrop click, nav link on mobile) reached every sidebar without id (undefined === undefined); a second id-less sidebar's init state hid the first. Now they reach that sidebar only, also when they carry an id. Actions without sidebar still match by id.
  • An action without visible no longer changes visibility: a [narrow] change hid an open overlaid sidebar bound with [(visible)]. A sidebar clears the shared backdrop only when it was the open one, so an input change on a closed mobile sidebar keeps another sidebar's backdrop.

Each fix has a spec that fails before it; three more specs guard behaviour that already worked. Manual check, sidebar docs examples (static inputs) with the patch built into pro: same classes and togglers at 1400 and 500 px.

…ions to their sidebar

- ngOnChanges matched alias keys; SimpleChanges carries visibleInput/narrowInput/unfoldableInput, so [visible] left hide + inert. Keys typed via SimpleChanges<SidebarComponent>; ngOnInit flag replaces firstChange, first setInput() after render applies.
- Actions with a sidebar reference (init, layout, backdrop, mobile nav link) reached every id-less sidebar; now only that sidebar. Actions without one still match by id.
- Action without visible keeps visibility; sidebar clears the shared backdrop only when it was the open one.
@xidedix
xidedix merged commit fd8d8f9 into v5.7 Oct 16, 2026
9 checks passed
@xidedix
xidedix deleted the fix/sidebar-state branch October 16, 2026 15:02
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.
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