fix(ui): make messages layout responsive#960
Open
Victor-root wants to merge 1 commit into
Open
Conversation
Allow the Messages page to use more horizontal space on larger screens while keeping the other pages unchanged. Clamp code blocks to the message card width and wrap preformatted content on small screens so the web mobile layout remains readable without causing global horizontal overflow.
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
This improves the responsiveness of the WebUI Messages page.
The Messages page was previously constrained by the default
DefaultPagewidth, which made the message list feel unnecessarily narrow on desktop screens and left a lot of available horizontal space unused.This PR keeps the change scoped to the Messages page and preserves the existing layout for the other pages.
Fixes #744
🖥️ Desktop behavior
On larger desktop screens, the Messages page now uses more of the available horizontal space while still keeping a reasonable maximum width.
This makes long notifications, logs, Markdown content, and code blocks much easier to read without changing the overall Gotify layout.
📱 Mobile web behavior
This also improves the WebUI mobile view.
For small screens, preformatted/code blocks now wrap instead of forcing an awkward horizontal overflow. This is only about the web mobile UI, not the Android app.
Desktop/tablet behavior for code blocks is preserved: long lines can still scroll inside the code block instead of being forcibly wrapped.
🔧 Changes
DefaultPageto accept a CSS-compatiblemaxWidthvalue.maxWidthonly for the Messages page.<pre>blocks to the message card width.✅ Tested
I tested the change locally on:
Everything works as expected:
📸 Screenshots
Desktop :
Laptop :
Mobile web :