-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(overlay): add option to re-use last preferred position when re-applying to open connected overlay #7805
Conversation
I'm not sure about this- I've always considered it a feature that overlays can flip positions to stay on-screen when scrolling What's your reasoning for wanting to change it? |
My reasoning was that it could be distracting having the overlay "follow you" after you've decided to scroll away from it. Alternatively we can make this functionality opt-in and only enable it on the components where we think it makes sense (e.g. the select doesn't handle the repositioning very well because it also has to change the |
I'd be okay with it being a setting. Not sure on the name, though. |
…pplying to open connected overlay Currently when updating the position of an open connected overlay (e.g. when the user is scrolling) we go through the same process for determining the preferred position as when the overlay was attached. This means that the preferred position could change, causing the overlay to jump. With these changes the consumer can decide to lock an overlay into its initial position, preventing it from jumping. This PR is a resubmit of angular#5471.
f2a565b
to
1a708e8
Compare
@jelbourn I've reworked it to make the functionality opt-in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently when updating the position of an open connected overlay (e.g. when the user is scrolling) we go through the same process for determining the preferred position as when the overlay was attached. This means that the preferred position could change, causing the overlay to jump. With these changes the consumer can decide to lock an overlay into its initial position, preventing it from jumping.
This PR is a resubmit of #5471.