Bug 496403

Summary: Room Information drawer will scroll down under certain circumstances
Product: [Applications] NeoChat Reporter: Thiago Sueto <herzenschein>
Component: GeneralAssignee: Tobias Fella <fella>
Status: CONFIRMED ---    
Severity: normal CC: carl, josh
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Thiago Sueto 2024-11-17 22:56:21 UTC
SUMMARY
Certain rooms cause the room information drawer to scroll down a bit once the member list loads.

This is reproducible for me with rooms like:

* #kde-sysadmin-discuss:kde.org
* #kde-promo:kde.org
* #kde-streamlined-app-dev:kde.org

Additionally, this happens even more often when you close and reopen the room information drawer. Here are some rooms where this happens:

* #kde-sysadmin-discuss:kde.org
* #kde-devel:kde.org
* #neochat:kde.org
* #new-contributors:kde.org
* #kde-promo:kde.org
* #kde-streamlined-app-dev:kde.org
* #kde-www:kde.org
* #kde-matrix-support:kde.org
Comment 1 Joshua Goins 2024-11-18 12:23:38 UTC
yes, this has been driving me crazy and i haven't figured out the cause. i didn't think it could be based on the room, though
Comment 2 Thiago Sueto 2024-11-19 14:36:37 UTC
I found out why this happens once I noticed the same bug in the chatbar. It's a mix of specific circumstances:

1. When the Room Information drawer is opened the first time, it doesn't have a scrollbar. It only gets one once the Member List is loaded and is large enough to be scrollable.
2. This forces the drawer to resize horizontally, which can incur in the description text being moved very slightly.
3. This movement causes text elision in long links, causing them to become multiline.
4. This new line update naturally increases the vertical height of the drawer.

So the conditions to reproduce the bug are the following:

1. It must be in a text field with a hidden-by-default scrollbar (like the Room Information description or the chatbar).
2. The text itself must be long.
3. You need to have a link that is sufficiently long enough to become a multiline link once a scrollbar is added.
4. This bug is more likely to occur in smaller text fields, as those naturally lead to more multiline text.
Comment 3 Thiago Sueto 2024-11-19 14:46:41 UTC
I almost forgot: a way to notice this bug happening is with something like the #kde-promo:kde.org group . Reproducible with my screen resolution (1920x1080). There you can see that in its initial state (without scrollbar, the description should show:

KDE Communication and Promotion: http://
community.kde.org/Promo : Subscribe https://mail.kde.org/
mailman/listinfo/kde-promo : Phab project / workboard: 
https://phabricator.kde.org/project/board/222/ : Goals: 
https://community.kde.org/Promo%27s_Long_Term_Goals

But once the scrollbar is added, it becomes:

KDE Communication and Promotion: http://
community.kde.org/Promo : Subscribe https://
mail.kde.org/mailman/listinfo/kde-promo : Phab project / 
workboard: https://phabricator.kde.org/project/board/222/ :
Goals: https://community.kde.org/
Promo%27s_Long_Term_Goals

The exact same thing happens with #kde-sysadmin:kde.org for example.

With #kde-streamlined-app-dev:kde.org it's a little different because what becomes a multiline is the title of the group itself, without requiring any link.

This seems to me like a bug with how text wrap is done.

(btw I meant to say text wrap, not text elision earlier 😅 )