fix: Adjust modal alignment to middle at breakpoint #821
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description
Some of our modals have enough content that when viewed at certain viewport heights, the content is cropped from view, hiding important elements (such as CTA buttons). This happens because we use a dynamic value for "padding" to optimize the placement more towards the top of the viewport, in a way to place modals more or less at eyesight level, while having enough room for dropdowns.
To work around this mechanism for certain modals when the viewport height is not enough to display all the content, this PR adjusts modal alignment to the middle of the screen when a certain breakpoint is reached.
Important
We have an ongoing discussion to decide whether this is the way forward or not, but I'll be OOO for more than a week, and won't be around to bring this to the finish line. However, I'm leaving this PR ready if the design team decides to go with this.
PR Checklist
npm run validate
and made sure no errors / warnings were shownCHANGELOG.md
package.json
andpackage-lock.json
(npm --no-git-tag-version version <major|minor|patch>
) ref📸 Demo
firefox_e3afGnycSk.mp4
Versioning
Patch. A release would be nice to help with https://github.com/Doist/Issues/issues/13441.