Stop constant movement of notifications due to changing timestamps #353
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#353
Loading…
Reference in a new issue
No description provided.
Delete branch "Oneric/akkoma-fe:notification-writhing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the notification timestamps change, so does the size the timestamp takes up and this may induce new line-wrapping for other text and thus change the size of a notification box. As a result theres constant movement and shifting around in the notification tray even when no new notifications occur.
This really bugged me and especially before I figured out where the movement came from also confuses me when I notice a movement, but then see no obvious change when focusing on the notification tray.
This change avoids the problem by setting a proper
min-width
for all types of notification timestamps.I applied a variant of this (with
9em
) for over a month via user styles and didn't run into issues.For the proper patch I now also checked non-English localisations and tweaked it again.
Full details in the commit message.
Stop constant movement of notifications due to changing timestampsto WIP: Stop constant movement of notifications due to changing timestampsWhile I checked the short unit identifiers, I ofc forgot to check the translations for
ago
. Indeed many localisations use a string >4 characters with the longest being Indonesian withyang lalu
which already takes up 10 characters before any actual time info is added (and Vietnamese also has a longer text withtrước
).This would push the new worst case to
18em
iimn, but I believe this is too long as it takes up more than half of the notification tray’s width.Do we actually need the
ago
in the notification tray? With strings as long asyang lalu
this might already be problematic apart from the movement, notifications can logically only ever be from the past and follow notifications already drop this part.I’ll probably update the patch to drop the
ago
in notification timestamps. At first thought the only other alternative to an indiscriminate18em
that comes to mind would be to make themin-width
locale dependent but I don't like this as it leaves the problem of the timstamp taking up too much space for some locales.If anyone has other ideas I’d love to hear them and I’m also available on IRC (
#akkoma-dev
) for discussions.2065973058
tobeee99e733
WIP: Stop constant movement of notifications due to changing timestampsto Stop constant movement of notifications due to changing timestampsAdjustments done, should be ready for review for real this time.
The new patches + limit are good for up to 3 weeks in all — except for two incomplete ones without proper short unit identifiers — localisations (more details in commit message). I believe this is reasonable enough and prevents frequent movements while not taking away too much space from usernames.
If we wanted to also reserve enough space for timestamps counted in months in all languages (e.g. Polish
mies.
), we’d need to bumpmin-width
to8em
, which automatically will also be enough for up to 999 years in all sufficiently translated localisations.Note: I don't know why Forgejo keeps showing only the old, single commit on the discussion view. In the “Commits” tab the two up-to date commits are displayed properly. (see
beee99e733
)WAIT you fixed this???
my actual saviour this has been annoying me for months and i never got around to figuring why it happend
praise
also very cool branch name
tried with a bunch of values and it seems good
thanks a lot!