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

feat(cdk/overlay): connected-overlay directive should have input for disabling escape close #19420 #20585

Merged

Conversation

yuriyward
Copy link
Contributor

@yuriyward yuriyward commented Sep 16, 2020

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 16, 2020
@yuriyward yuriyward changed the title feat(cdk/overlay): connected-overlay directive should have input for disabling escape close feat(cdk/overlay): connected-overlay directive should have input for disabling escape close #19420 Sep 16, 2020
@yuriyward yuriyward force-pushed the connected-overlay-optional-escape branch from f081f94 to 8d1803b Compare September 16, 2020 12:54
@@ -181,6 +181,9 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {
/** Whether the overlay is open. */
@Input('cdkConnectedOverlayOpen') open: boolean = false;

/** Whether the overlay is open. */
@Input('cdkConnectedOverlayCloseOnEscape') closeOnEscape: boolean = true;
Copy link
Member

Choose a reason for hiding this comment

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

We have something similar in the dialog, bottom sheet and sidenav called disableClose which we should probably align with. Note that in the other components it means disabling close when pressing escape and clicking on the backdrop.

Copy link
Member

Choose a reason for hiding this comment

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

+1, we should be consistent with the name and the behavior

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't know about disableClose, totally agree with it, I will modify PR soon

Copy link
Contributor Author

@yuriyward yuriyward Sep 17, 2020

Choose a reason for hiding this comment

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

@crisbeto I modified code, also align behavior as it is in Dialog.
But overlay-directive doesn't have close action on backdrop click, I verified it manually also created test, that shows current behavior

src/cdk/overlay/overlay-directives.ts Outdated Show resolved Hide resolved
@jelbourn jelbourn added the target: minor This PR is targeted for the next minor release label Sep 16, 2020
@yuriyward yuriyward force-pushed the connected-overlay-optional-escape branch 5 times, most recently from 541cd6b to 9e84c0e Compare September 17, 2020 07:57
@yuriyward
Copy link
Contributor Author

@jelbourn @crisbeto Can you, please, review it again?
(All comments resolved)

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 action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Sep 22, 2020
@wagnermaciel wagnermaciel merged commit 57c7b6a into angular:master Oct 7, 2020
@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 Nov 7, 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 P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants