Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

feat(widget): #1965 Split “number + leaks” in two lines when needed

Guillaume Jacquart requested to merge 1965-improve_leaks_display into main

Description

On the widget, there is not enough room in the dedicated space to display properly all figures in every language. Here is how it looks with hundreds of thousands of leaks in German, you can see the last letter is almost on the outline of the rectangle.

As soon as there is not enough room left in the dedicated space in the widget, the display must switch to 2 a 2 line display: the number on 1 line and the word leaks on a second line.

Screenshots

Screenshot_20240329_085336

Screenshot_20240329_085408

Technical details

We manually switch from 1 line to 2 lines, as we can contrôle properly view in widget, or use Advanced views. We switch to 2 lines, if the number reach 1000, and if the total length of number + leaksLabel is 14.

Tests

Issues

https://gitlab.e.foundation/e/os/backlog/-/issues/1965

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/mobile-team/guidelines/Code-review

Edited by Guillaume Jacquart

Merge request reports

Loading