Skip to content

docs: convert component sidenav to signals - #33910

Merged
crisbeto merged 1 commit into
angular:mainfrom
MeAkib:docs/component-sidenav-signals
Oct 21, 2026
Merged

crisbeto merged 1 commit into
angular:mainfrom
MeAkib:docs/component-sidenav-signals

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Replaces the async pipe usages in ComponentSidenav and ComponentNav with signals. The breakpoints are converted using toSignal, which also allows the templates to be simplified.

ComponentNav was injecting ActivatedRoute to read the section param, because it isn't a routed component. Now ComponentSidenav receives the section param as an input through the router's component input binding and passes it down to ComponentNav, which loads the section's items through a resource. Adds a test that navigates through the routes and checks that the navigation lists the items of the section.

Also fixes the sidenav closing logic which was checking the isScreenSmall observable instead of its value.

@pullapprove
pullapprove Bot requested review from andrewseguin and ok7sai October 1, 2026 03:08
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Oct 1, 2026
@crisbeto

Copy link
Copy Markdown
Member

There was a merge conflict that I tried resolving through Github, but I ended up breaking it 😓 Can you force push again and resolve the conflict? It's also fine to open another PR if that's easier.

Replaces the `async` pipe usages in `ComponentSidenav` and `ComponentNav` with signals. The breakpoints are converted using `toSignal`, which also allows the templates to be simplified.

`ComponentNav` was injecting `ActivatedRoute` to read the `section` param, because it isn't a routed component. Now `ComponentSidenav` receives the `section` param as an input through the router's component input binding and passes it down to `ComponentNav`, which loads the section's items through a `resource`. Adds a test that navigates through the routes and checks that the navigation lists the items of the section.

Also fixes the sidenav closing logic which was checking the `isScreenSmall` observable instead of its value.
@MeAkib
MeAkib force-pushed the docs/component-sidenav-signals branch from ba0e28c to 54c853a Compare October 21, 2026 11:39
@MeAkib

MeAkib commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

There was a merge conflict that I tried resolving through Github, but I ended up breaking it 😓 Can you force push again and resolve the conflict? It's also fine to open another PR if that's easier.

Done

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Oct 21, 2026
@crisbeto
crisbeto merged commit 0b5260d into angular:main Oct 21, 2026
34 checks passed
@crisbeto

Copy link
Copy Markdown
Member

This PR was merged into the repository. The changes were merged into the following branches:

crisbeto pushed a commit that referenced this pull request Oct 21, 2026
Replaces the `async` pipe usages in `ComponentSidenav` and `ComponentNav` with signals. The breakpoints are converted using `toSignal`, which also allows the templates to be simplified.

`ComponentNav` was injecting `ActivatedRoute` to read the `section` param, because it isn't a routed component. Now `ComponentSidenav` receives the `section` param as an input through the router's component input binding and passes it down to `ComponentNav`, which loads the section's items through a `resource`. Adds a test that navigates through the routes and checks that the navigation lists the items of the section.

Also fixes the sidenav closing logic which was checking the `isScreenSmall` observable instead of its value.

(cherry picked from commit 0b5260d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: docs Related to the documentation target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants