Repository navigation
[6.x] Forms 2: Centre the empty section's hint and fit it to the screen - #16170
Merged
Merged
Conversation
- Centre the hint so wrapped lines don't leave "or" alone on the left - Size the only empty section to the viewport (200px to 670px) so the hint stays above the fold - Pad it horizontally so the hint doesn't touch the dashed border
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of the Problem
Closes #16113
When a form's only section is empty, the drop zone is a fixed 670px tall, so on a laptop the "Drag fields here…" hint sits low and the box runs off the bottom of the screen. The hint also isn't centred, so once it wraps (narrow window, longer translations) its lines sit on the left.
What this PR Does
min(670px, 100dvh - 22rem), never under 200px. Tall screens still get 670px; laptops get a box that fits.I went with a height based on the viewport rather than the issue's other idea (200px, like later sections), because the first section is the main drop target on a new form and a 200px box looks lost on a big empty canvas.
Before / After
How to Reproduce