chuckya/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 Replace unlock-alt icon with unlock (#9952) 2019-01-31 13:45:15 +01:00
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 Compress and combine emoji data (#5229) 2017-10-06 03:42:34 +02:00
autosuggest_hashtag.js Replace shortNumberFormat with <ShortNumber> (#14061) 2020-07-06 14:27:32 +02:00
autosuggest_input.js Fix emoji autosuggestions (#11442) 2019-07-29 15:04:49 +02:00
autosuggest_textarea.js Fix ref attr for react-textarea-autozsize (#13936) 2020-06-02 03:24:04 +02:00
avatar.js Revert Font Awesome 5 upgrade (#8810) 2018-09-28 02:11:14 +02:00
avatar_composite.js Change conversations UI (#11896) 2019-09-21 20:01:16 +02:00
avatar_overlay.js Fix GIF avatars not autoplaying when GIF autoplay is enabled (#6000) 2017-12-13 12:14:03 +01:00
button.js Fix "cancel follow request" button having unreadable text in web UI (#11521) 2019-08-08 08:56:55 +02:00
column.js Fix scroll to top in single column UI (#11463) 2019-08-01 19:17:17 +02:00
column_back_button.js Fix crash when switching back/from mobile layout (#11655) 2019-08-25 15:49:02 +02:00
column_back_button_slim.js Refactor icons in web UI to use Icon component (#9951) 2019-02-01 00:14:05 +01:00
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 Play animated custom emoji on hover (#11348) 2019-07-21 18:10:40 +02:00
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 Refactor icons in web UI to use Icon component (#9951) 2019-02-01 00:14:05 +01:00
icon_button.js Replace fav icon animation with CSS (#12175) 2019-10-24 22:47:48 +02:00
icon_with_badge.js Improvements to the single column layout (#10835) 2019-05-26 02:55:37 +02:00
intersection_observer_article.js Code style improvements in JavaScript (#13159) 2020-03-08 16:02:36 +01:00
load_gap.js Refactor icons in web UI to use Icon component (#9951) 2019-02-01 00:14:05 +01:00
load_more.js Allow clients to fetch statuses made while they were offline (#6876) 2018-03-24 15:25:15 +01:00
load_pending.js Add option to disable real-time updates in web UI (#9984) 2019-07-16 06:30:47 +02:00
loading_indicator.js Add loading indicator animation (#4316) 2017-07-23 20:28:18 +02:00
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 Fix performance of home feed regeneration (#12084) 2019-10-06 22:11:17 +02:00
modal_root.js Fix TL sometimes jumping when closing modals (#14019) 2020-06-10 13:57:13 +02:00
permalink.js When enabled, always display media in gallery. Also: click to reveal (#6692) 2018-03-08 08:57:21 +01:00
poll.js Fix not being able to vote (#13490) 2020-04-17 21:54:25 +02:00
radio_button.js Add profile directory to web UI (#11688) 2019-08-30 00:14:36 +02:00
regeneration_indicator.js Fix performance of home feed regeneration (#12084) 2019-10-06 22:11:17 +02:00
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 Improve accessibility (part 3) (#4405) 2017-07-28 00:54:48 +02:00
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