Skip to content

feat(router): add new initialNavigation options to replace legacy#37480

Closed
CaerusKaru wants to merge 1 commit into
angular:masterfrom
CaerusKaru:adam/r
Closed

feat(router): add new initialNavigation options to replace legacy#37480
CaerusKaru wants to merge 1 commit into
angular:masterfrom
CaerusKaru:adam/r

Conversation

@CaerusKaru

@CaerusKaru CaerusKaru commented Jun 7, 2020

Copy link
Copy Markdown
Member

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

@CaerusKaru CaerusKaru force-pushed the adam/r branch 4 times, most recently from e338c5e to da67485 Compare June 7, 2020 23:31
@ngbot ngbot Bot added this to the needsTriage milestone Jun 8, 2020
@CaerusKaru CaerusKaru added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Jun 9, 2020

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread packages/router/src/router_module.ts Outdated
Comment thread packages/router/src/router_module.ts Outdated
@pullapprove pullapprove Bot requested a review from jelbourn June 18, 2020 00:02
@CaerusKaru CaerusKaru force-pushed the adam/r branch 3 times, most recently from dfb9df0 to ca4ed7c Compare June 20, 2020 20:49
@jelbourn

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member Author

@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.

@jelbourn jelbourn left a comment

Copy link
Copy Markdown
Contributor

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

@CaerusKaru CaerusKaru force-pushed the adam/r branch 2 times, most recently from c72b4cb to 328decd Compare June 27, 2020 05:44
@CaerusKaru CaerusKaru force-pushed the adam/r branch 2 times, most recently from 5595b1d to a061ab9 Compare July 15, 2020 04:32
Comment thread packages/router/src/router_module.ts Outdated
@mary-poppins

Copy link
Copy Markdown

You can preview 424336c at https://pr37480-424336c.ngbuilds.io/.

@mary-poppins

Copy link
Copy Markdown

You can preview 78627e3 at https://pr37480-78627e3.ngbuilds.io/.

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed-for: public-api

Minor docs suggestions.

Comment thread packages/router/src/router_module.ts Outdated
@pullapprove pullapprove Bot requested a review from atscott October 12, 2020 16:45

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the changes @CaerusKaru 👍

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

Reviewed-for: public-api

Comment thread packages/router/src/router_module.ts Outdated
Comment thread packages/router/src/router_module.ts Outdated
Comment thread packages/router/test/bootstrap.spec.ts Outdated
@pullapprove pullapprove Bot requested a review from AndrewKushnir October 12, 2020 17:01

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding a review from size tracking group...

Reviewed-for: size-tracking

@pullapprove pullapprove Bot requested a review from jelbourn October 12, 2020 17:02
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
Copy Markdown

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

@pullapprove pullapprove Bot requested a review from atscott October 13, 2020 16:28

@atscott atscott left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

reviewed-for: size-tracking

@atscott

atscott commented Oct 13, 2020

Copy link
Copy Markdown
Contributor

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

@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 13, 2020
@atscott atscott closed this in c4becca Oct 14, 2020
@angular-automatic-lock-bot

Copy link
Copy Markdown

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.

Labels

action: merge The PR is ready for merge by the caretaker area: router breaking changes cla: yes target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants