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

cdkConnectedOverlay should let us change positioning strategy #16374

Merged
merged 6 commits into from
Dec 4, 2019

Conversation

mertdeg2
Copy link
Contributor

The problem is that this directive is not flexible enough to pass in arbitrary positioning strategy.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 24, 2019
@crisbeto
Copy link
Member

Doesn't this somewhat defeat the purpose of the directive? If you're already creating the strategy, the rest of the overlay only needs a few more lines of code.

@mertdeg2
Copy link
Contributor Author

We have an internal component that is built on top of this directive.

We use all of the other features. But the positioning strategy is not overridable. It mostly looks like below:

<ng-template
  cdkConnectedOverlay
  [cdkConnectedOverlayHasBackdrop]="hasBackdrop"
  [cdkConnectedOverlayBackdropClass]="getBackdropClasses()"
  [cdkConnectedOverlayOrigin]="trigger"
  [cdkConnectedOverlayPositionStrategy]="positionStrategy"
  [cdkConnectedOverlayOpen]="isOpen"
  [cdkConnectedOverlayPositions]="positions"
  [cdkConnectedOverlayMinWidth]="minWidth"
  [cdkConnectedOverlayViewportMargin]="overlayViewportMargin"
  [cdkConnectedOverlayGrowAfterOpen]="true"
  [cdkConnectedOverlayPush]="true"
  (backdropClick)="close()"
  (detach)="close()">

@crisbeto
Copy link
Member

Leaving up to @jelbourn on how to proceed here, but it'll definitely need some unit tests.

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.

We talked about it ahead of time; I'm okay with this change, though it does need a unit test :)

@jelbourn jelbourn added G This is is related to a Google internal issue target: minor This PR is targeted for the next minor release merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed labels Jun 24, 2019
@mertdeg2
Copy link
Contributor Author

mertdeg2 commented Dec 3, 2019

Added a unit test for this.

@jelbourn
Copy link
Member

jelbourn commented Dec 3, 2019

@mertdeg2 overall looks good but there are some failures on CI

@mertdeg2
Copy link
Contributor Author

mertdeg2 commented Dec 3, 2019

I think i fixed the failures on CI

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 Dec 3, 2019
@jelbourn jelbourn merged commit 73d1ceb into angular:master Dec 4, 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 Jan 4, 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 cla: yes PR author has agreed to Google's Contributor License Agreement G This is is related to a Google internal issue merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants