Skip to content

refactor(overlay): use component to render backdrop - #6627

Closed
crisbeto wants to merge 1 commit into
angular:masterfrom
crisbeto:backdrop-component
Closed

refactor(overlay): use component to render backdrop#6627
crisbeto wants to merge 1 commit into
angular:masterfrom
crisbeto:backdrop-component

Conversation

@crisbeto

Copy link
Copy Markdown
Member

Uses an Angular component to render the backdrop, instead of managing a DOM element manually. This has the advantage of being able to leverage the animations API to transition in/out, as well as not having to worry about the cases where the backdrop animation is disabled.

These changes also enable the backdrop transition for the dialog (previously it would be removed immediately on close).

@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 24, 2017

@jelbournjelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just a couple nits

Comment threadsrc/cdk/overlay/backdrop.ts Outdated

constructor(private _element: ElementRef, private _renderer: Renderer2) {}

_setClass(cls: string) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd rename cls to either cssClass or just c
(cls has a different meaning for me)

Comment threadsrc/cdk/overlay/overlay-ref.ts Outdated
backdropClick(): Observable<void> {
return this._backdropClick.asObservable();
return this._backdropInstance ? this._backdropInstance._clickStream.asObservable() :
empty<void>();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since the function return type is Observable<void>, you don't really need the asObservable call

@crisbetocrisbeto added the action: merge The PR is ready for merge by the caretaker label Aug 30, 2017
@crisbeto
crisbetoforce-pushed the backdrop-component branch 3 times, most recently from 4cb861c to 2dcf30eCompareOctober 4, 2017 17:27
@kara

kara commented Oct 4, 2017

Copy link
Copy Markdown
Contributor

@crisbeto Linter strikes again

@karakara removed the action: merge The PR is ready for merge by the caretaker label Oct 4, 2017
@karakara assigned crisbeto and unassigned jelbournOct 4, 2017
@crisbetocrisbeto added the action: merge The PR is ready for merge by the caretaker label Oct 4, 2017
@crisbeto

Copy link
Copy Markdown
MemberAuthor

Fixed.

@kara

kara commented Oct 5, 2017

Copy link
Copy Markdown
Contributor

@crisbeto CI looks unhappy again

@karakara removed the action: merge The PR is ready for merge by the caretaker label Oct 5, 2017
@crisbeto
crisbetoforce-pushed the backdrop-component branch 2 times, most recently from dbdc289 to 0a87d53CompareOctober 5, 2017 17:07
@crisbeto

crisbeto commented Oct 5, 2017

Copy link
Copy Markdown
MemberAuthor

Alright, now the CI should be happy.

@crisbetocrisbeto added the action: merge The PR is ready for merge by the caretaker label Oct 5, 2017
@crisbeto
crisbetoforce-pushed the backdrop-component branch 3 times, most recently from 8214290 to d1eb5dbCompareOctober 11, 2017 16:52
@crisbeto

Copy link
Copy Markdown
MemberAuthor

Rebased again.

@crisbetocrisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Nov 9, 2017
@jelbournjelbourn added the presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged label Nov 21, 2017
@jelbourn

Copy link
Copy Markdown
Contributor

Some Google teams are using detachBackdrop; we'll need to add it back as a deprecated alias.

@crisbeto

Copy link
Copy Markdown
MemberAuthor

Rebased and re-added the detachOverlay@jelbourn.

@jelbournjelbourn removed the presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged label Nov 28, 2017
@crisbetocrisbeto added the target: minor This PR is targeted for the next minor release label Dec 6, 2017
@andrewseguinandrewseguin added the presubmit failures This PR has failures in Google's internal presubmit process and cannot be immediately merged label Dec 13, 2017
@josephperrott

Copy link
Copy Markdown
Member

@crisbeto Did you want to rebase and work on getting this one in?

@crisbeto
crisbetoforce-pushed the backdrop-component branch 3 times, most recently from bc9a464 to a4e7e80CompareMarch 31, 2018 09:06
@crisbeto

Copy link
Copy Markdown
MemberAuthor

Rebased and fixed a few issues @josephperrott.

Uses an Angular component to render the backdrop, instead of managing a DOM element manually. This has the advantage of being able to leverage the animations API to transition in/out, as well as not having to worry about the cases where the backdrop animation is disabled.
These changes also enable the backdrop transition for the dialog (previously it would be removed immediately on close).
@jelbourn

Copy link
Copy Markdown
Contributor

Going to close this since it's not a big priority and would need further investigation into presubmit failures

@jrood

Copy link
Copy Markdown
Contributor

Requesting for this issue to be reopened in light of issues highlighted in #11806

@jelbourn

Copy link
Copy Markdown
Contributor

We ended up abandoning this because it caused many test failures for various google apps, meaning it would probably cause many more test failures for the community at large.

@angular-automatic-lock-bot

Copy link
Copy Markdown

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-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 9, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: mergeThe PR is ready for merge by the caretakercla: yesPR author has agreed to Google's Contributor License Agreementpresubmit failuresThis PR has failures in Google's internal presubmit process and cannot be immediately mergedtarget: minorThis PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@crisbeto@kara@josephperrott@jelbourn@jrood@googlebot@andrewseguin