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(dialog): add backdrop #1041

Merged
merged 4 commits into from
Sep 9, 2016
Merged

feat(dialog): add backdrop #1041

merged 4 commits into from
Sep 9, 2016

Conversation

jelbourn
Copy link
Member

R: @kara @hansl

This adds support to the Overlay to add a backdrop. Components that consume the overlay can take the clicks on the backdrop and do whatever they want with them.

This also cleans up the dialog tests; they no longer need a setTimeout with the recent changes to fakeAsync in core.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 14, 2016
@fxck fxck mentioned this pull request Aug 24, 2016
@jelbourn
Copy link
Member Author

@hansl @kara - rebased on top of synchronous overlay.

@jelbourn
Copy link
Member Author

@kara @hansl still needs review

@jelbourn jelbourn mentioned this pull request Sep 1, 2016
this._backdropElement.classList.add('md-overlay-backdrop');
this._pane.parentElement.appendChild(this._backdropElement);

// Forward backdrop clicks that that the consumer of the overlay can perform whatever
Copy link
Contributor

Choose a reason for hiding this comment

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

that that -> such that

@kara
Copy link
Contributor

kara commented Sep 3, 2016

LGTM, just a few typos and questions about Sass.

@hansl
Copy link
Contributor

hansl commented Sep 3, 2016

LGTM as well except the few points above.

// Forward backdrop clicks that that the consumer of the overlay can perform whatever
// action desired when such a click occurs (usually closing the overlay).
this._backdropElement.addEventListener('click', () => {
this._backdropClick.next(null);
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentionally to not pass the DOM event to the Subject? It is not necessary but would be a good improvement though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to keep any DOM stuff out of public-facing APIs for now (keeping potential running on web-workers in mind).

@jelbourn
Copy link
Member Author

jelbourn commented Sep 9, 2016

Addressed comments (added todo for fullscreen, since I'm not sure it will stick around forever).

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Sep 9, 2016
@hansl hansl merged commit 7ecda22 into angular:master Sep 9, 2016
@jelbourn jelbourn deleted the dialog-backdrop4 branch September 13, 2017 04:33
@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 7, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants