Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak Message Spacing For Greatly Improved Readablity #1564

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RageGamerBoi
Copy link

@RageGamerBoi RageGamerBoi commented Mar 25, 2024

This PR changes padding on the top and bottom of all messages from 6px to 3px and adds a new 10px margin on top of messages with usernames
This drastically improves readability with a very minor code change (4 lines changing actual functionality) without affecting Dino's UI in any negative way.

This type of spacing helps to group messages from different people into readable chunks to drastically improve clarity.

Almost every modern chat program with this kind of layout does something similar, from Discord and Slack to Gajim, Element, and Cinny.
In many cases it even helps fit more messages on screen, while still being nicer to read!
It also helps better differentiate between a newline or line break inside of a message and the space between two separate messages.

New Dino or XMPP users will typically expect a UI like this as they are often coming from an app that already does something similar.
It is a very subtle effect, and it took me a while to figure out why Dino felt so hard to read myself, so I don't expect other new users to realize what is wrong, let alone fix it themselves.

Because many of you already using Dino have gotten used to the current message spacing, if you dislike it initially I highly recommend trying the new spacing out for a few days to get a feel for it. This will help make sure you don't dismiss this PR simply because you aren't used to it yet.

Here is a side-by-side comparison (new spacing on the right):

comparison

To test it out without building, simply add this code to ~/.config/gtk-4.0/gtk.css or ~/.var/app/im.dino.Dino/config/gtk-4.0/gtk.css if you use the Flatpak:

@import 'colors.css';
window.dino-main .dino-conversation .message-box {
    padding: 3px 15px 3px 15px;
}
window.dino-main .dino-conversation .has-skeleton {
    margin-top: 10px;
}
window.dino-main .dino-conversation .message-box:not(.has-skeleton) {
    padding-left: 58px;
}

Note that the padding-left line is already in Dino, it's just here because setting custom padding values in the gtk.css file overrides Dino's defaults so the default has to be applied in the gtk.css file as well.

Thank you for considering this relatively minor yet important improvement!

3px padding on top and bottom of all messages
10px margin on top of messages with usernames
This improves readability among other things.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant