feat(ui): make app header responsive#7825
Open
delucis wants to merge 8 commits into
Open
Conversation
Frees up space on small or zoomed screens by scrolling header out of view
The header can now be taller than the editor editor and shows below it.
Uses a two-row layout on small screens, similar to decaporg#7298
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.
Summary
Similarly to #7820, this PR aims to tackle a small portion of the work to make the app dashboard responsive, keeping the focus small and incremental. In this case, it tackles the app header.
I borrowed some of the design ideas from #7298, but tried to avoid too many font-size changes so that UI elements continue to share the same font sizes.
Wraps the app header onto two lines in smaller viewports.
Hides the app header on editor routes so it doesn’t peek below the editor header (similar to feat(ui): add responsive styling for mobile compatibility #7298).
Allows the site link URL to be truncated as the viewport shrinks. In general, truncation can be a bad approach for UI because, for example, truncating the label of an action can mislead a user (e.g. imagine truncating “Delete all” to “Delete…”), but in this case I think it may be acceptable because it’s the site URL not a UI string and at most viewport widths, enough of the URL should remain visible to be understood.
At the smallest viewport widths, brings the navigation labels under the icons to allow an even more compact horizontal display.
The app header is no longer sticky, for viewports <500px tall. This also an accessibility change as well as related to responsiveness: it ensures on small viewports or for users who zoom the interface, the app header doesn’t get in the way, taking up too much of the screen. (Related to WCAG Success Criterion 1.4.4.)
Not important on production sites, but I also added a style for the test backend indicator for the smallest viewport. It’s a bit of a kludge, but given this is an indicator that the site is in test mode rather than a genuine part of the CMS UI, I think it’s OK for it to appear in this “overlay” position to let the “real” layout of the app header display at small viewport sizes.
Here’s an example of the header layout reflowing at various viewport widths:
Kapture.2026-05-22.at.00.08.37.mp4
With the English UI strings it works down to 235px wide. I checked a few other languages and most seemed similar. Some languages use two-word phrases on the navigation buttons like “Flujo Editorial” for “Workflow” in Spanish. At the smallest viewport sizes, these wrap, e.g.
Test plan
Tested locally at a range of viewport sizes and app states. Existing tests should pass as this only touches functionality.
Checklist
Please add a
xinside each checkbox:A picture of a cute animal (not mandatory but encouraged)