Repository navigation
[6.x] Forms 2: Collapse the header tabs when they don't fit - #16173
Merged
Merged
Conversation
- Longer translations (German needs ~1120px) pushed the header's right-hand icons off screen between 1024px and the width the tabs need - The tabs now swap for the dropdown whenever they'd make the header overflow, and focus moves to the dropdown if a tab had it
- Widening the window hid a focused dropdown button and dropped focus to the page; focus now goes to whichever of the tabs or dropdown replaced it
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 #16115
The form tabs (Edit, Logic, Connect, Results, Configure) sit in the header from 1024px up. In German they need about 1120px, so in between the header scrolls sideways and the icons on the right end up off screen.
The header is designed to overflow when it runs out of space, so I wouldn’t call it a bug, per se 🙂. That said, I can see that something like a dropdown might be considered tidier in a longer language like German, and where there are other things going on like multisite. It's lightweight to implement, so I’m happy to switch to that.
What this PR Does
ResizeObserveron the header shows the tabs, checks for overflow, and collapses them if needed, all before paint, so there's no flickerBefore / After
How to Reproduce