Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(router): make RouterOutlet name an Input so it can be set dynami… #46569

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Jun 28, 2022

…cally

This commit updates the 'name' of RouterOutlet to be an Input rather
than an attribute. Note that this change does not affect [attr.name]=
because those already would not have worked. The static name was only
read in the constructor and if it wasn't available, it would use
'PRIMARY' instead.

fixes #12522

@atscott atscott added action: global presubmit The PR is in need of a google3 global presubmit area: router target: minor This PR is targeted for the next minor release labels Jun 28, 2022
@ngbot ngbot bot added this to the Backlog milestone Jun 28, 2022
@atscott
Copy link
Contributor Author

atscott commented Jun 28, 2022

Since this does change the timing of the outlet getting activated, it might be considered breaking. Started a TGP run to see what, if anything, fails.

@atscott atscott added breaking changes target: major This PR is targeted for the next major release and removed target: minor This PR is targeted for the next minor release labels Jun 29, 2022
@atscott atscott marked this pull request as ready for review September 19, 2022 20:52
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just 2 nits (feel free to ignore) 👍

packages/router/src/directives/router_outlet.ts Outdated Show resolved Hide resolved
packages/router/src/directives/router_outlet.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: public-api

@atscott atscott force-pushed the routeroutletnameinput branch 4 times, most recently from 1b45aeb to 1471326 Compare September 20, 2022 18:29
…cally

This commit updates the 'name' of `RouterOutlet` to be an `Input` rather
than an attribute. Note that this change does not affect `[attr.name]=`
because those already would not have worked. The static name was only
read in the constructor and if it wasn't available, it would use
'PRIMARY' instead.

fixes angular#12522

BREAKING CHANGE: Previously, the `RouterOutlet` would immediately
instantiate the component being activated during navigation. Now the
component is not instantiated until the change detection runs. This
could affect tests which do not trigger change detection after a router
navigation. In rarer cases, this can affect production code that relies
on the exact timing of component availability.
Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewed-for: public-api

@atscott
Copy link
Contributor Author

atscott commented Sep 26, 2022

TGP

@atscott atscott added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note risk: high and removed action: global presubmit The PR is in need of a google3 global presubmit labels Sep 26, 2022
@atscott
Copy link
Contributor Author

atscott commented Sep 26, 2022

Merge assistance: Please merge and sync on its own. This will also require patching this CL during the sync.

@ngbot
Copy link

ngbot bot commented Sep 26, 2022

I see that you just added the action: merge label, but the following checks are still failing:
    failure status "google3" is failing
    pending 2 pending code reviews

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken main, please try rebasing to main and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@AndrewKushnir
Copy link
Contributor

TGP.

@AndrewKushnir
Copy link
Contributor

@atscott it looks like there are a couple of regressions, see TGP results. Could you please take a look when you get a chance? Adding a "blocked" label for now...

@AndrewKushnir
Copy link
Contributor

TGP #2.

@AndrewKushnir
Copy link
Contributor

The latest TGP is "green", we can proceed with merging this PR.

@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit c3f8579.

pterratpro pushed a commit to pterratpro/angular-fr that referenced this pull request Oct 4, 2022
…cally (angular#46569)

This commit updates the 'name' of `RouterOutlet` to be an `Input` rather
than an attribute. Note that this change does not affect `[attr.name]=`
because those already would not have worked. The static name was only
read in the constructor and if it wasn't available, it would use
'PRIMARY' instead.

fixes angular#12522

BREAKING CHANGE: Previously, the `RouterOutlet` would immediately
instantiate the component being activated during navigation. Now the
component is not instantiated until the change detection runs. This
could affect tests which do not trigger change detection after a router
navigation. In rarer cases, this can affect production code that relies
on the exact timing of component availability.

PR Close angular#46569
pterratpro pushed a commit to pterratpro/angular-fr that referenced this pull request Oct 4, 2022
…cally (angular#46569)

This commit updates the 'name' of `RouterOutlet` to be an `Input` rather
than an attribute. Note that this change does not affect `[attr.name]=`
because those already would not have worked. The static name was only
read in the constructor and if it wasn't available, it would use
'PRIMARY' instead.

fixes angular#12522

BREAKING CHANGE: Previously, the `RouterOutlet` would immediately
instantiate the component being activated during navigation. Now the
component is not instantiated until the change detection runs. This
could affect tests which do not trigger change detection after a router
navigation. In rarer cases, this can affect production code that relies
on the exact timing of component availability.

PR Close angular#46569
mprobst pushed a commit to mprobst/angular that referenced this pull request Oct 5, 2022
…cally (angular#46569)

This commit updates the 'name' of `RouterOutlet` to be an `Input` rather
than an attribute. Note that this change does not affect `[attr.name]=`
because those already would not have worked. The static name was only
read in the constructor and if it wasn't available, it would use
'PRIMARY' instead.

fixes angular#12522

BREAKING CHANGE: Previously, the `RouterOutlet` would immediately
instantiate the component being activated during navigation. Now the
component is not instantiated until the change detection runs. This
could affect tests which do not trigger change detection after a router
navigation. In rarer cases, this can affect production code that relies
on the exact timing of component availability.

PR Close angular#46569
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: router breaking changes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note risk: high target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing router-outlet's name variable from Attribute to Input type
3 participants