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

fix: consistent names for all cdk directives #8088

Merged
merged 1 commit into from
Oct 30, 2017

Conversation

jelbourn
Copy link
Member

@jelbourn jelbourn commented Oct 27, 2017

Based on #7544. Should be fully backwards compatible.

Renames:
OverlayOrigin -> CdkOverlayOrigin
ConnectedOverlayDirective -> CdkConnectedOverlay
PortalDirective -> CdkPortal
PortalHostDirective -> CdkPortalOutlet
ObserveContent -> CdkObserveContent

Also stop using "mat" completely in the cdk.

BREAKING CHANGE:
MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY is renamed to
CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY

@jelbourn jelbourn added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful pr: needs review labels Oct 27, 2017
@googlebot googlebot added the cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla label Oct 27, 2017
@jelbourn jelbourn added cla: yes PR author has agreed to Google's Contributor License Agreement and removed cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla labels Oct 27, 2017
@angular angular deleted a comment from googlebot Oct 27, 2017
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -78,22 +77,21 @@ export const MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',
exportAs: 'cdkOverlayOrigin',
})
export class OverlayOrigin {
export class CdkOverlayOrigin {
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking about this one a few days ago: do we really need the directive? It doesn't really provide a lot of value since using it ends up being slightly longer than straight-up passing in the elementRef to the overlay:

<button cdk-overlay-origin #origin="cdkOverlayOrigin">Open</button>
<ng-template cdk-connected-overlay [origin]="origin"></ng-template>

Versus something like this if we got rid of it:

<button #origin>Open</button>
<ng-template cdk-connected-overlay [origin]="origin"></ng-template>

It's not something we should necessarily address now, but it just something to think about.

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is that if the element you're applying it do has a component (like mat-button), you don't have a way to grab the ElementRef in the template.

@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Oct 28, 2017
Renames:
`OverlayOrigin` -> `CdkOverlayOrigin`
`ConnectedOverlayDirective` -> `CdkConnectedOverlay`
`PortalDirective` -> `CdkPortal`
`PortalHostDirective` -> `CdkPortalOutlet`
`ObserveContent` -> `CdkObserveContent`

Also stop using "mat" completely in the cdk.

BREAKING CHANGE:
`MAT_CONNECTED_OVERLAY_SCROLL_STRATEGY` is renamed to
`CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY`
@mmalerba mmalerba merged commit f08b3f0 into angular:master Oct 30, 2017
@jelbourn jelbourn deleted the portal-directives branch April 2, 2018 22:30
@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 8, 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 P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants