Skip to content

chore(overlay): add attach method to PositionStrategy interface #6505

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

Merged
merged 3 commits into from
Aug 22, 2017

Conversation

jelbourn
Copy link
Member

No description provided.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 16, 2017
@jelbourn
Copy link
Member Author

After fixing the bad import this seems fine (same as the attach on ScrollStrategy)

@jelbourn jelbourn requested review from crisbeto and kara as code owners August 17, 2017 20:53
@jelbourn
Copy link
Member Author

I've updated this to now omit the overlay element from apply (since it can be read from the OverlayRef). This is in preparation for another change that changes when the overlay does its initial position.

/** Updates the position of the overlay element. */
apply(element: Element): void;
apply(): void;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe attach and apply should return this so they can be chained?

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'd rather leave them as is since normal use wouldn't chain them, just the tests

@@ -974,7 +974,7 @@ describe('MdMenu', () => {
.not.toContain('mat-elevation-z3', 'Expected no stacked elevation.');
});

it('should close all of the menus when the root is closed programmatically', () => {
it('should close all of the menus when the root is closed programmatically', fakeAsync(() => {
Copy link
Member

Choose a reason for hiding this comment

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

You should get these changes if you rebase.

element: HTMLElement;

apply(): void {
this.element.classList.add('fake-positioned');
Copy link
Member

Choose a reason for hiding this comment

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

Add a test that this gets executed at the proper time?

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 don't follow what you mean; the existing test for this still applies- is there something that isn't covered?

Copy link
Member

Choose a reason for hiding this comment

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

Ah sorry, didn't know that we had something in place already.

Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM, one typo

this._pane = overlayRef.overlayElement;
}

/** To be used to for any cleanup after the element gets destroyed. */
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: to for any cleanup -> for any cleanup

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

@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Aug 17, 2017
@jelbourn jelbourn added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Aug 17, 2017
@jelbourn
Copy link
Member Author

jelbourn commented Aug 17, 2017

Caretaker note: This is technically a breaking API change, but I don't think anyone inside Google will be affected by it

@kara kara merged commit 0db3635 into angular:master Aug 22, 2017
@jelbourn jelbourn deleted the pos-attach 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 merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants