Skip to content

Immich: display large numbers with suffixes #839

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

Merged

Conversation

yscialom
Copy link
Contributor

@yscialom yscialom commented Jul 22, 2025

Because an app plate is quite small, displaying large numbers can be problematic as they collide and cannot be distinguished.

This commit fixes this issue by displaying large numbers using fewer characters and ISO suffixes, up to G (giga, 10^9).

Here is an example of the problematic behaviour:

+-----------------------+
| PHOTOS  VIDEOS  USAGE |
|   14698443 0.94GiB    |
+-----------------------+

The 14,698 photo count collides with the 443 video count.

This commit changes the display to:

+-----------------------+
| PHOTOS  VIDEOS  USAGE |
|   15k    443  0.94GiB |
+-----------------------+

Because an app plate is quite small, displaying large numbers
can be problematic as they collide and cannot be distinguished.

This commit fixes this issue by displaying large numbers using
fewer characters and ISO suffixes, up to G (giga, 10^9).

Here is an example of the problematic behaviour:
+-----------------------+
| PHOTOS  VIDEOS  USAGE |
|   14398443 0.94GiB    |
+-----------------------+
The 14,398 photo count collides with the 443 video count.

This commit changes the display to:
+-----------------------+
| PHOTOS  VIDEOS  USAGE |
|   15k    443  0.94GiB |
+-----------------------+
@yscialom
Copy link
Contributor Author

@mvdkleijn may I ask for a code review please?

@mvdkleijn
Copy link
Collaborator

@yscialom apologies, I've been very busy with another major project. I'll take a look later today.

@yscialom
Copy link
Contributor Author

That's OK, I'm entitled to no SLA :) Thank you for your time.

@yscialom
Copy link
Contributor Author

yscialom commented Jul 22, 2025

Two of the four CI workflows failed:

  • "Method name "Immich::number_format_large" is not in camel caps format" -> fixed with ea99b7a
  • "Failed: should have name matching the app directory name normalized" -> unclear to me.

Could someone point me to the right direction :) ?

@github-project-automation github-project-automation bot moved this from PRs to PRs Approved in Issue & PR Tracker Jul 22, 2025
@mvdkleijn
Copy link
Collaborator

LGTM. The one error is from another app already in the repo, I'll ignore that for this PR.

@mvdkleijn mvdkleijn merged commit 5b0cda5 into linuxserver:master Jul 22, 2025
2 of 4 checks passed
@LinuxServer-CI LinuxServer-CI moved this from PRs Approved to Done in Issue & PR Tracker Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants