Commit graph

5 commits

Author SHA1 Message Date
Eugen Rochko
07341e7aa6
Add graphs and retention metrics to admin dashboard (#16829) 2021-10-14 20:44:59 +02:00
Sasha Sorokin
cb2adaaf9d
Replace shortNumberFormat with <ShortNumber> (#14061)
This commit introduces new utility component - ShortNumber. It should
work almost the same way as original shortNumberFormat function,
though it also localizes units and accepts one more prop - renderer.

Renderer is a function that takes rendered short formatted number
and also ready-to-pluralize number to format display result accordingly.
Ready-to-pluralize number allows to correctly select plural for
compactly notated numbers, respecting thousands and other units.

Issue #12451 accurately describes the issue with using raw numbers
when replacing counter with short version. In short, it doesn't work
with languages such as Russian, that require different plurals,
according to the unit number was compacted to.

All previous usages of shortNumberFormat were replaced with new
function, and as it became unused, it was removed to avoid misleading.
2020-07-06 14:27:32 +02:00
Takeshi Umeda
0e8c0287d0 Fix shortNumberFormat to within 3 chars without units (#12706) 2019-12-29 16:59:25 +01:00
Eugen Rochko
0e9668051e
Fix short number formatting for numbers above million in web UI (#11559) 2019-08-13 12:22:33 +02:00
Eugen Rochko
1bbe81030c
Display numbers in account header using shortNumberFormat for consistency (#7723) 2018-06-04 05:15:50 +02:00