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

fix: Opt-out dialog is vertically cut off if height is set to auto #506

Merged
merged 8 commits into from
Jan 23, 2025

Conversation

ataromoku
Copy link
Contributor

@ataromoku ataromoku commented Jan 22, 2025

Jira ticket

https://desire2learn.atlassian.net/browse/PHNX-2526

Problem

Previous PR1 PR2 addressed an issue where the entire page shifted upward when scrollIntoView was called. This happened because the opt-in-flayout component overflowed out of view. However, that fix introduced a new problem, the dialog window is now getting cut off because the component's height is too small to fit it in.

Solution

Set the height to auto by default and use 100% to fill the entire space only when the opt-in-flyout is in open state. Hide the content behind the opt-in-flyout using a fade.


Demo

Normal style
flyout-normal-with-fade.mp4
Position fixed style
flyout-fixed-with-fade.mp4
Before
flyout-before.mp4

@ataromoku ataromoku marked this pull request as ready for review January 22, 2025 22:07
@ataromoku ataromoku requested a review from a team as a code owner January 22, 2025 22:07
@ataromoku ataromoku merged commit c525ff2 into main Jan 23, 2025
3 checks passed
@ataromoku ataromoku deleted the phoenix/flyout-hotfix branch January 23, 2025 21:11
Copy link

🎉 This PR is included in version 2.9.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

overflow: hidden;
pointer-events: none;
position: absolute;
width: 100%;
}

:host([opened]) {
background-color: rgba(255, 255, 255, 0.7);

Choose a reason for hiding this comment

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

Curious what the semi-transparency is being used for here.

Choose a reason for hiding this comment

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

I see what this is being used for now. Follow-up question, do you know why this is using white as opposed to regolith like d2l-backdrop. I see the transparency is at least consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants