bastodon/app/javascript/mastodon/components
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
..
__tests__ Replace to testing-library from enzyme (#14152) 2020-06-29 13:58:07 +02:00
account.js
animated_number.js Change number animations direction based on decrease or increase (#12971) 2020-01-27 11:04:11 +01:00
attachment_list.js Add noopener and/or noreferrer (#12202) 2019-10-24 22:44:42 +02:00
autosuggest_emoji.js
autosuggest_hashtag.js Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
autosuggest_input.js
autosuggest_textarea.js Fix ref attr for react-textarea-autozsize (#13936) 2020-06-02 03:24:04 +02:00
avatar.js
avatar_composite.js
avatar_overlay.js
button.js
column.js
column_back_button.js
column_back_button_slim.js
column_header.js Fix pinning a column in web UI sometimes redirecting out of web UI (#13376) 2020-04-02 03:12:10 +02:00
common_counter.js Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
display_name.js
domain.js Change the string "hidden" to "blocked" in WebUI (#13221) 2020-03-09 09:13:21 +01:00
dropdown_menu.js Fix page incorrectly scrolling when bringing up dropdown menus (#13574) 2020-04-28 13:19:39 +02:00
error_boundary.js Add source-mapped stacktrace to error message in web UI (#13082) 2020-02-19 22:36:52 +01:00
gifv.js Fix media editing modal changing dimensions when image loads (#12131) 2019-10-10 05:21:38 +02:00
hashtag.js Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
icon.js
icon_button.js Replace fav icon animation with CSS (#12175) 2019-10-24 22:47:48 +02:00
icon_with_badge.js
intersection_observer_article.js Code style improvements in JavaScript (#13159) 2020-03-08 16:02:36 +01:00
load_gap.js
load_more.js
load_pending.js
loading_indicator.js
media_gallery.js Fix audio/video/images/cards not reacting to window resizes in web UI (#14130) 2020-06-24 10:25:32 +02:00
missing_indicator.js
modal_root.js Fix TL sometimes jumping when closing modals (#14019) 2020-06-10 13:57:13 +02:00
permalink.js
poll.js Fix not being able to vote (#13490) 2020-04-17 21:54:25 +02:00
radio_button.js
regeneration_indicator.js
relative_timestamp.js Change last_status_at to be a date, not datetime (#12966) 2020-01-26 23:13:48 +01:00
scrollable_list.js Add hints about incomplete remote content to web UI (#14031) 2020-06-14 22:29:40 +02:00
setting_text.js
short_number.js Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
status.js Add color extraction for audio thumbnails (#14209) 2020-07-05 18:28:25 +02:00
status_action_bar.js Change to correct the role of the boost button (#14132) 2020-06-25 22:44:19 +02:00
status_content.js Improve toot clicking areas (#13327) 2020-03-31 19:40:23 +02:00
status_list.js Fix 12661 (#12744) 2020-01-02 22:46:42 +01:00
timeline_hint.js Add hints about incomplete remote content to web UI (#14031) 2020-06-14 22:29:40 +02:00