Skip to content

refactor(drag-drop): expose more private apis as protected #14134

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

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

Exposes more of the private drag&drop APIs as protected ones, in order to make it easier for people to implement their custom directives based on the CDK ones. Also moves out some of the private helper methods into functions.

Fixes #14113.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Nov 13, 2018
@@ -321,13 +321,13 @@ export class CdkDrag<T = any> implements AfterViewInit, OnDestroy {
}

/** Gets only handles that are not inside descendant `CdkDrag` instances. */
private getChildHandles() {
protected _getChildHandles() {
Copy link
Member

Choose a reason for hiding this comment

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

We might be inconsistent about this, but the coding standards doc says no prefix for protected

Copy link
Member Author

Choose a reason for hiding this comment

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

Doing a quick code search shows that most of the protected APIs we have at the moment are underscored.

Copy link
Member

Choose a reason for hiding this comment

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

Ack, let's revisit this another time

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

@@ -321,13 +321,13 @@ export class CdkDrag<T = any> implements AfterViewInit, OnDestroy {
}

/** Gets only handles that are not inside descendant `CdkDrag` instances. */
private getChildHandles() {
protected _getChildHandles() {
Copy link
Member

Choose a reason for hiding this comment

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

Ack, let's revisit this another time

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement labels Nov 14, 2018
@ngbot
Copy link

ngbot bot commented Nov 14, 2018

Hi @crisbeto! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@jelbourn
Copy link
Member

@crisbeto API golds need to be updated

@crisbeto crisbeto force-pushed the 14113/drag-drop-api-update branch from 4bcd13d to 52718c6 Compare November 27, 2018 18:24
@crisbeto crisbeto requested a review from devversion as a code owner November 27, 2018 18:24
@crisbeto
Copy link
Member Author

@jelbourn the golden has been updated.

@crisbeto crisbeto force-pushed the 14113/drag-drop-api-update branch 2 times, most recently from fe94d15 to bd2405c Compare December 2, 2018 16:02
@mmalerba
Copy link
Contributor

mmalerba commented Dec 4, 2018

@crisbeto needs rebase

@crisbeto crisbeto force-pushed the 14113/drag-drop-api-update branch from bd2405c to 293c1fa Compare December 5, 2018 18:57
@crisbeto
Copy link
Member Author

crisbeto commented Dec 5, 2018

Rebased @mmalerba.

Exposes more of the private drag&drop APIs as protected ones, in order to make it easier for people to implement their custom directives based on the CDK ones. Also moves out some of the private helper methods into functions.

Fixes angular#14113.
@crisbeto crisbeto force-pushed the 14113/drag-drop-api-update branch from 293c1fa to 087bbb5 Compare December 6, 2018 20:37
@crisbeto
Copy link
Member Author

crisbeto commented Dec 9, 2018

Closing this PR since it'll increase the API surface a lot and it won't be necessary anymore once we add a service around #14350.

@crisbeto crisbeto closed this Dec 9, 2018
@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 Sep 10, 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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DragDropModule] Expose members in CdkDrag and CdkDropList
3 participants