Commit graph

14 commits

Author SHA1 Message Date
infinite-persistence
26f89b3ec9 re-reselect proof of concept + fix Date selector as first example
`makeSelectDataForUri` always returns a new reference, so `ClaimPreview` was constantly being rendered. It's pretty expensive since `ClaimPreview`'s rendering checks against a huge blocklist, which is another issue on it's own.

- This commit tests the usage of `re-reselect` as the solution to the multi-instance memoization problem (https://github.com/toomuchdesign/re-reselect/blob/master/examples/1-join-selectors.md)
2021-12-03 15:22:32 -05:00
zeppi
ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00
mayeaux
25b56ada48
Fix issue where channel upload viewcounts were creating a new line (#7154)
* fix issue where viewcounts were creating a new line

* conditionally add large view css

* conditionally apply class based on if view count should be shown

* last couple touchups

* clean up the css

* add scss to flow config

* add scss component to flow config
2021-09-29 15:04:43 -04:00
infinite-persistence
cded632fd2
DateTime: avoid unnecessary update (#6110)
## Issue
Part of `5834 Performance investigation`

In a homepage with 120 tiles, the lists get rendered 3 times during initial update. The sub-components are updating recursively (will investigate), so instead of 120 DateTime renders, we have 1000+ renders.

The resolved DateTime string for `timeAgo` rarely changes, and even if the string was "a few seconds ago", there's no real need to constantly update it.

## Change
Require a minimum 1-minute delta when deciding whether the component should update. Clients can change this value as needed.

## Test
- [x] Verified `shouldComponentUpdate` doesn't end up taking more time than not having it (it's in micro-second range, compared to the millisecond render).
- [x] Profiler showed no significant improvement for low number of DateTime components, but for the 120 DateTime case, almost 1/4 of a second is saved.
2021-05-24 18:29:58 -04:00
Stefan Sundin
039264531f Add 24-hour clock setting. 2021-04-06 13:00:10 -04:00
Stefan Sundin
92e55c7d5f Add a title with the exact date to dateTime elements that use timeAgo. 2021-04-03 00:32:06 -04:00
Sean Yesmunt
61dfc2f74a handle comment time display correctly immediately after posting 2020-10-05 11:54:20 -04:00
Sean Yesmunt
951d7bbb63 remove 'show both' date option in DateTime 2020-07-09 14:49:36 -04:00
infiinte-persistence
598c336b66 Refactor DateTime to allow it's translated result string to be re-used elsewhere, for consistency. 2020-05-11 14:54:05 -04:00
infiinte-persistence
2582627f25 Fix localization issue in DateTime.
The class was only returning a localized string for 'years' and 'months'; English was used for the rest.

- Fixed by handling the remaining cases.
- New strings were added (1) so that they will all be consistent language-wise until the translators handle them all (2) allows for cleaner code through variable re-use (%duration%).
2020-05-11 14:54:05 -04:00
Sean Yesmunt
893e7fbb1b round dates down for months and days 2019-12-13 10:36:48 -05:00
Sean Yesmunt
208fe57ed7 fix date rounding 2019-12-13 10:36:48 -05:00
Sean Yesmunt
c1131a374b hopefully stop app crashes because of bad dates
https://github.com/GoogleChrome/lighthouse/issues/1056
2019-12-05 01:09:08 -05:00
Sean Yesmunt
6ad31a3ce9 refactor lbrytv web server 2019-11-11 13:27:29 -05:00