Bug 404039 - Text chat: bubbles should be limited to the width of the string inside them
Summary: Text chat: bubbles should be limited to the width of the string inside them
Status: RESOLVED UNMAINTAINED
Alias: None
Product: ring-kde
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Emmanuel Lepage Vallée
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-06 20:48 UTC by Nate Graham
Modified: 2025-06-14 15:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Bubbles should be smaller for short strings (117.61 KB, image/png)
2019-02-06 20:48 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-02-06 20:48:30 UTC
Created attachment 117903 [details]
Bubbles should be smaller for short strings

See attached screenshot.
Comment 1 Emmanuel Lepage Vallée 2019-02-08 15:15:15 UTC
Changes have been made but I fear I made it worst.

There is a few corner case in need of a solution:

## The chat bubble is written in C++

Until 3 weeks ago, the minimum Qt version supported by Kirigami was 5.9. Qt 5.9 does not have the `Shape` module so the bubble had to use the `QQuickPaintedItem` module. 5.9 is no longer supported, so in theory this is no longer a problem.

However the side still have to be determined from C++ because [while disabled for now] computing the position of a messages requires to know the size of all messsages above it and this can be multi-threaded. Storing the size is not working because it changes when you resize the window and it changes when multiple devices synchronize each other and new conversations are added.

A middle ground would be to keep the code to determine the optimal size as a C++ "Metrics" object and use the QtQuick.Shape module for the rendering. I am also not sure if it would be faster or better.

## Date and metadata

context: When searching or scrolling, the date and separators becomes relevant. Searching is a major pain point with Telegram because it lacks all temporal metadata when you search/scroll. If the user scrolls, either he/she is bored and want to see stuff moving or he/she is looking for something.

So when the text is shorter than the date, it looks wrong. It looks even more wrong when the height is taller than the width. Vertically resizing the bubble is not possible because it makes scrolling impossible. But resizing horizontally is possible. When I did that, it had the bad side effect of "animation hangover" where too much moved on the screen. Adding "white" paddings on top and bottom and resize both horizontally and vertically made this worst.



tl;dr; For now I kept a minimum width a bit bigger than the date. So this bug isn't resolved, it's just "not as bad as before".
Comment 2 Christoph Cullmann 2025-06-14 15:10:06 UTC
This project is unfortunately no longer maintained.

If a new maintainer wants to step up and take care, the project is archived here:

https://invent.kde.org/network/ring-kde

You can just clone it in your private namespace on invent.kde.org and if you have started to work on it and fixed/implemented something get it reviewed and the project unarchived.

Sorry for the inconveniences.