Skip to content

refactor(drag-drop): remove deprecated APIs for 9.0.0 #17084

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

Merged
merged 1 commit into from
Sep 18, 2019

Conversation

crisbeto
Copy link
Member

Cleans on the APIs that were marked as deprecated for 8.0 and 9.0. Also deprecates a few for 10.0 which were supposed to be removed in 9.0, but hadn't been marked correctly.

BREAKING CHANGES:

  • DropListRef.id has been removed.
  • CdkDragConfig has been replaced with DragRefConfig.
  • DragDropRegistry.getDropContainer has been removed.
  • CdkDropListContainer interface has been removed.
  • CDK_DROP_LIST_CONTAINER has been replaced with CDK_DROP_LIST.
  • CdkDrag.boundaryElementSelector has been replaced with CdkDrag.boundaryElement.
  • _ngZone and _viewportRuler parameters in the DropListRef constructor are now required.
  • distance parameter in DropListRef.drop is now required.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: major This PR is targeted for the next major release labels Sep 14, 2019
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 14, 2019
@crisbeto crisbeto force-pushed the drag-drop-9.0-breaking-changes branch from fba9209 to f67fc43 Compare September 14, 2019 09:37
@jelbourn
Copy link
Member

Should we have a migration for the renames?

@crisbeto
Copy link
Member Author

crisbeto commented Sep 16, 2019

I'm not sure how many people are actually going to hit them. The only documented public API that was renamed is boundaryElementSelector and even it's a regular property (not an Input).

@jelbourn
Copy link
Member

Isn't it trivial, though, to just add it to our migration data? I would still do it if it's not any major effort

@crisbeto
Copy link
Member Author

Looks like we don't have the schematics set up for v9. I've set them up in #17101.

@crisbeto crisbeto force-pushed the drag-drop-9.0-breaking-changes branch from f67fc43 to a168339 Compare September 17, 2019 04:56
@crisbeto
Copy link
Member Author

Added schematics where possible.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Sep 17, 2019
@devversion
Copy link
Member

@crisbeto We should be able to add CDK_DROP_LIST_CONTAINER to the classNames data. I know it's technically not a class, but IIRC that is actually just doing migration for identifiers (can verify in a test case). Same for CdkDragConfig.

We can also handle distance parameter in DropListRef.drop is now required. in the method-calls-check data.

@crisbeto crisbeto force-pushed the drag-drop-9.0-breaking-changes branch from a168339 to 2d3fa97 Compare September 17, 2019 18:41
@crisbeto
Copy link
Member Author

Nice, added 👍. The only part I'm confused by is what the invalidArgCounts.count means. Is it supposed to be the number of required parameters?

@devversion
Copy link
Member

devversion commented Sep 17, 2019

Yeah, I was confused about that rule at some point as well (i did not author it), but I guess it will print the given message if the arguments length matches the count length.

e.g. in that case you'd set it to the amount of params minus one (to match if the distance param is missing). In that case you need to set it to 4 I think.

Cleans on the APIs that were marked as deprecated for 8.0 and 9.0. Also deprecates a few for 10.0 which were supposed to be removed in 9.0, but hadn't been marked correctly.

BREAKING CHANGES:
* `DropListRef.id` has been removed.
* `CdkDragConfig` has been replaced with `DragRefConfig`.
* `DragDropRegistry.getDropContainer` has been removed.
* `CdkDropListContainer` interface has been removed.
* `CDK_DROP_LIST_CONTAINER` has been replaced with `CDK_DROP_LIST`.
* `CdkDrag.boundaryElementSelector` has been replaced with `CdkDrag.boundaryElement`.
* `_ngZone` and `_viewportRuler` parameters in the `DropListRef` constructor are now required.
* `distance` parameter in `DropListRef.drop` is now required.
@crisbeto crisbeto force-pushed the drag-drop-9.0-breaking-changes branch from 2d3fa97 to 51349b7 Compare September 17, 2019 19:28
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM schematic wise.

@jelbourn jelbourn merged commit 75591f7 into angular:master Sep 18, 2019
@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 Oct 19, 2019
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 cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants