Skip to content

fix(ui): make messages layout responsive#960

Open
Victor-root wants to merge 1 commit into
gotify:masterfrom
Victor-root:fix/messages-responsive-layout
Open

fix(ui): make messages layout responsive#960
Victor-root wants to merge 1 commit into
gotify:masterfrom
Victor-root:fix/messages-responsive-layout

Conversation

@Victor-root
Copy link
Copy Markdown

✨ Summary

This improves the responsiveness of the WebUI Messages page.

The Messages page was previously constrained by the default DefaultPage width, 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

  • Allow DefaultPage to accept a CSS-compatible maxWidth value.
  • Set a wider maxWidth only for the Messages page.
  • Clamp <pre> blocks to the message card width.
  • Wrap preformatted content on small screens to avoid mobile overflow.
  • Leave the other pages unchanged.

✅ Tested

I tested the change locally on:

  • 🖥️ Desktop
  • 💻 Laptop
  • 📱 Mobile web viewport

Everything works as expected:

  • the Messages page uses much more available width on desktop;
  • the layout remains clean on laptop/tablet-sized screens;
  • mobile web no longer has broken-looking code/preformatted blocks;
  • the Android app is not affected;
  • existing messages, apps, clients, and WebSocket updates continue to work.

📸 Screenshots

Desktop :

image

Laptop :

laptop

Mobile web :

image

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.
@Victor-root Victor-root requested a review from a team as a code owner May 12, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Request to add option to fill page or make reactive

1 participant