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): add new initialNavigation options to replace legacy #37480

Closed
wants to merge 1 commit into from

Conversation

@CaerusKaru
Copy link
Member

@CaerusKaru CaerusKaru commented Jun 7, 2020

As of Angular v4, four of the options for
ExtraOptions#initialNavigation have been deprecated. We intend
to remove them in v11. The final state for these options is:
enabledBlocking, enabledNonBlocking, and disabled. We plan
to remove and deprecate the remaining option in the next two
major releases.

New options:

  • enabledNonBlocking: same as legacy_enabled
  • enabledBlocking: same as enabled

BREAKING CHANGE:

  • The initialNavigation property for the options in
    RouterModule.forRoot no longer supports legacy_disabled,
    legacy_enabled, true, or false as valid values.
    legacy_enabled (the old default) is instead enabledNonBlocking
  • enabled is deprecated as a valid value for the
    RouterModule.forRoot initialNavigation option. enabledBlocking
    has been introduced to replace it

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Member

@jelbourn jelbourn left a comment

If there any deprecation documentation or similar we can link to in the commit message here?

packages/router/src/router_module.ts Outdated Show resolved Hide resolved
packages/router/src/router_module.ts Outdated Show resolved Hide resolved
@pullapprove pullapprove bot requested a review from jelbourn Jun 18, 2020
@CaerusKaru CaerusKaru force-pushed the adam/r branch 3 times, most recently from dfb9df0 to ca4ed7c Jun 20, 2020
@jelbourn
Copy link
Member

@jelbourn jelbourn commented Jun 23, 2020

I have learned since the last time I looked at this that there's a deprecation guide that outlines deprecations and what people should do about them. Should the changes here be included in there?

@CaerusKaru
Copy link
Member Author

@CaerusKaru CaerusKaru commented Jun 24, 2020

@jelbourn Since this PR does not actually deprecate/remove (and is outside a major version), I don’t think now is the time to add it. These options can be used independent of a deprecation plan. The deprecation guide update is captured in #33128, which was bumped from v10 to v11 and will land when we open up the v11 release train.

Copy link
Member

@jelbourn jelbourn left a comment

LGTM

Reviewed-for: public-api

@CaerusKaru CaerusKaru force-pushed the adam/r branch 2 times, most recently from c72b4cb to 328decd Jun 27, 2020
@CaerusKaru CaerusKaru force-pushed the adam/r branch 2 times, most recently from 5595b1d to a061ab9 Jul 15, 2020
@mary-poppins
Copy link

@mary-poppins mary-poppins commented Oct 10, 2020

@mary-poppins
Copy link

@mary-poppins mary-poppins commented Oct 10, 2020

Copy link
Member

@petebacondarwin petebacondarwin left a comment

Reviewed-for: public-api

Minor docs suggestions.

packages/router/src/router_module.ts Outdated Show resolved Hide resolved
@pullapprove pullapprove bot requested a review from atscott Oct 12, 2020
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Thanks for the changes @CaerusKaru 👍

I've just left a couple comments, but all of them are minor.

Reviewed-for: public-api

packages/router/src/router_module.ts Show resolved Hide resolved
packages/router/src/router_module.ts Show resolved Hide resolved
packages/router/test/bootstrap.spec.ts Show resolved Hide resolved
@pullapprove pullapprove bot requested a review from AndrewKushnir Oct 12, 2020
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Adding a review from size tracking group...

Reviewed-for: size-tracking

@pullapprove pullapprove bot requested a review from jelbourn Oct 12, 2020
As of Angular v4, four of the options for
`ExtraOptions#initialNavigation` have been deprecated. We intend
to remove them in v11. The final state for these options is:
`enabledBlocking`, `enabledNonBlocking`, and `disabled`. We plan
to remove and deprecate the remaining option in the next two
major releases.

New options:
- `enabledNonBlocking`: same as legacy_enabled
- `enabledBlocking`: same as enabled

BREAKING CHANGE:

* The `initialNavigation` property for the options in
  `RouterModule.forRoot` no longer supports `legacy_disabled`,
  `legacy_enabled`, `true`, or `false` as valid values.
  `legacy_enabled` (the old default) is instead `enabledNonBlocking`
* `enabled` is deprecated as a valid value for the
  `RouterModule.forRoot` `initialNavigation` option. `enabledBlocking`
  has been introduced to replace it
@mary-poppins
Copy link

@mary-poppins mary-poppins commented Oct 12, 2020

You can preview 7e77995 at https://pr37480-7e77995.ngbuilds.io/.

@pullapprove pullapprove bot requested a review from atscott Oct 13, 2020
Copy link
Contributor

@atscott atscott left a comment

reviewed-for: size-tracking

@atscott
Copy link
Contributor

@atscott atscott commented Oct 13, 2020

presubmit (this will require a g3 patch, see cl/336894045)

@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Nov 14, 2020

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 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants