Skip to content

feat(overlay): add support for swappable position strategies #12306

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 1 commit into from
Sep 21, 2018

Conversation

crisbeto
Copy link
Member

Adds the ability for the consumer to swap out one position strategy for another, even while an overlay is open. This allows us to handle cases like having a menu that is a dropdown on desktop, but becomes a full-screen overlay on a mobile device.

@crisbeto crisbeto added the target: minor This PR is targeted for the next minor release label Jul 21, 2018
@crisbeto crisbeto requested a review from jelbourn as a code owner July 21, 2018 12:10
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 21, 2018
@crisbeto crisbeto force-pushed the swappable-position-strategies branch from 416aa0a to 9218807 Compare July 21, 2018 12:15
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 Jul 24, 2018
@ngbot
Copy link

ngbot bot commented Aug 1, 2018

Hi @crisbeto! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@crisbeto crisbeto force-pushed the swappable-position-strategies branch from 9218807 to f81767b Compare August 3, 2018 15:34
return;
}

const styles = this._overlayRef.overlayElement.style;
Copy link
Member

Choose a reason for hiding this comment

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

Somehow there's a failing GCP test where this._overlayRef is undefined here

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 suppose that could happen if dispose somehow got called before attach. I've added an extra check in there.

@crisbeto crisbeto force-pushed the swappable-position-strategies branch from f81767b to 0cae12a Compare August 26, 2018 18:57
@jelbourn
Copy link
Member

@crisbeto the travis failures look real

Adds the ability for the consumer to swap out one position strategy for another, even while an overlay is open. This allows us to handle cases like having a menu that is a dropdown on desktop, but becomes a full-screen overlay on a mobile device.
@crisbeto crisbeto force-pushed the swappable-position-strategies branch from 0cae12a to 7814468 Compare September 12, 2018 17:25
@crisbeto
Copy link
Member Author

I've sorted out the failures @jelbourn. It needed a couple extra flushes.

@mmalerba mmalerba merged commit e0f3ae7 into angular:master Sep 21, 2018
roboshoes pushed a commit to roboshoes/material2 that referenced this pull request Oct 23, 2018
…#12306)

Adds the ability for the consumer to swap out one position strategy for another, even while an overlay is open. This allows us to handle cases like having a menu that is a dropdown on desktop, but becomes a full-screen overlay on a mobile device.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Feb 3, 2019
With angular#12306 we added the ability to swap out position strategies, however that won't be enough to handle all use cases since the consumer is still locked into the scroll strategy that they chose at the start. E.g. when switching an overlay from a dialog to a dropdown, it might not make sense to block scrolling anymore. These changes add an API to allow for the scroll strategy to be swapped.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Feb 3, 2019
With angular#12306 we added the ability to swap out position strategies, however that won't be enough to handle all use cases since the consumer is still locked into the scroll strategy that they chose at the start. E.g. when switching an overlay from a dialog to a dropdown, it might not make sense to block scrolling anymore. These changes add an API to allow for the scroll strategy to be swapped.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Feb 3, 2019
With angular#12306 we added the ability to swap out position strategies, however that won't be enough to handle all use cases since the consumer is still locked into the scroll strategy that they chose at the start. E.g. when switching an overlay from a dialog to a dropdown, it might not make sense to block scrolling anymore. These changes add an API to allow for the scroll strategy to be swapped.
jelbourn pushed a commit that referenced this pull request Feb 5, 2019
With #12306 we added the ability to swap out position strategies, however that won't be enough to handle all use cases since the consumer is still locked into the scroll strategy that they chose at the start. E.g. when switching an overlay from a dialog to a dropdown, it might not make sense to block scrolling anymore. These changes add an API to allow for the scroll strategy to be swapped.
@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 9, 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 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