Repository navigation
fix(Sidebar): apply input changes after first render, scope state actions to their sidebar - #307
Merged
Merged
Conversation
…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.
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.
Sidebar ignored input changes after first render, and internal actions leaked to other sidebars.
ngOnChangeslooked forvisible,narrow,unfoldable; with signal inputsSimpleChangescarriesvisibleInput,narrowInput,unfoldableInput.[visible]false to true lefthideandinert; firstunfoldabletoggle after an[unfoldable]change did nothing.SimpleChanges<SidebarComponent>now fails the build when an*Inputfield is renamed. An init flag replacesfirstChange, so the firstsetInput()after render applies too.sidebarreference (init, layout change, backdrop click, nav link on mobile) reached every sidebar withoutid(undefined === undefined); a second id-less sidebar's init state hid the first. Now they reach that sidebar only, also when they carry anid. Actions withoutsidebarstill match byid.visibleno 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.