gotify / server

A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
https://gotify.net
Other
11.56k stars 643 forks source link

Request to add option to fill page or make reactive #744

Open NightHawkATL opened 6 days ago

NightHawkATL commented 6 days ago

Is your feature request related to a problem? Please describe. I have a few notifications that are long and wide and I have to scroll to get to the horizontal scroll bar to see the wider notifications. image

Describe the solution you'd like It would be nice to have the notifications window fill the available area to allow for viewing the wider notifications either with an option to "fill" or have the notification area be reactive to the size of the screen or window viewing them.

Describe alternatives you've considered not using Gotify as there are others that offer this but aren't as easy to configure if there is no native Gotify support.

Additional context none at the moment as the above should suffice, but let me know if you have questions.

eternal-flame-AD commented 6 days ago

Thanks for the ticket, I think it is because of many by-pixel max width styles in the code:

https://github.com/gotify/server/blob/63cfc1f0454261d589a1c0f76300d64abd107eab/ui/src/message/Message.tsx#L30-L32

https://github.com/gotify/server/blob/63cfc1f0454261d589a1c0f76300d64abd107eab/ui/src/common/DefaultPage.tsx#L11-L23

I am not familiar with frontend but maybe this can become a relative constraint? @jmattheis

jmattheis commented 2 days ago

Yeah, I think we should have some min-width so that small messages keep the current design and only bigger messages get more width. Maybe something like: min(100%, max(fit-to-content, 700px)).