Commit graph

1787 commits

Author SHA1 Message Date
infinite-persistence e77a986125
Load comments if spinner is visible from the start
It was previously only responding to scroll events.
2021-07-14 13:00:26 +08:00
infinite-persistence 3d63ce4666
Load comments when approaching viewport
Seeing the spinner too much can be annoying.

- This approach works, but currently, when the list is very long, something is taking up resources and the handler couldn't be processed, so the effect is lost (still seeing the spinner). See 6473.

- Since we are now prefetching, bumped the debounceMs a bit.
2021-07-14 13:00:25 +08:00
infinite-persistence 5ef95846d8
Add AUTO_EXPAND_REPLIES flag to toggle the feature. 2021-07-14 12:58:26 +08:00
infinite-persistence 0cf6fe3df5
Comments Pagination
## Issue
6158 - Support Comment Pagination
2021-07-14 12:58:25 +08:00
infinite-persistence 052aa87ddd
Remove unused items 2021-07-14 11:13:13 +08:00
DispatchCommit d32af5606b move pre-roll ad logic into it's designated video.js plugin 2021-07-13 22:22:06 -04:00
btzr-io 7398120c0c fix incorrect aria-label in rewards page 2021-07-13 18:09:09 -04:00
btzr-io 2391f66d90 fix upload button on creator analytics: #6323 2021-07-13 18:09:09 -04:00
btzr-io 2dbd5d0f00 fix sidebar shortcut activation on textarea: #6326 2021-07-13 18:07:41 -04:00
DispatchCommit 47d9b4a866 fix site detection, add hide logo to macro url 2021-07-13 00:06:32 -04:00
DispatchCommit 8253f5e0dc center play button 2021-07-13 00:06:32 -04:00
DispatchCommit b777669a7e Add pre-roll ads
change ad macro url
rework video.js load logic
fix autoplay and retry errors
yeet player.ended error
fix another race condition
fix another error message
add allowPreRoll restrictions
fix some lint issues
remove annoying lint rule
remove video.js lazy loading
more linting fixes
2021-07-13 00:06:32 -04:00
infinite-persistence 59a8b9d663 WaitUntilOnPage: take scaling into account
It was waiting too near the viewport to load on certain zoom levels. This will maintain the same physical distance for the "approaching viewport" buffer regardless of zoom levels.
2021-07-12 17:06:30 -04:00
infinite-persistence ad1c826f2c RSS: Use canonical_url (with ':') instead of slicing to 2 characters.
## Changes
- Change to canonical_url (with ':').
- The old format of 'claimName/claimId' needs to be supported still, since we shipped with it.

## Notes
- It would be nice to use regex instead of 2 separate paths, but I couldn't figure out how to make the koa variables work.
2021-07-12 17:06:03 -04:00
saltrafael 4bd5beb2f6 Fix notification bell toast 2021-07-12 11:03:11 -04:00
infinite-persistence cd9337f2d4
Skip RSS URL generation if it's not a channel. 2021-07-09 21:54:44 +08:00
infinite-persistence da8000303b
Add toast feedback for RSS and Link copy action.
6369
2021-07-09 21:54:43 +08:00
infinite-persistence 1f16736e5a
Fix invalid semicolon 2021-07-09 21:28:58 +08:00
infinite-persistence d97a23b699 Rename default import/exports for clarity in text search (no functional change)
I believe it was just due to copy/pasting from another file and not renaming it.
2021-07-09 08:40:26 +08:00
zeppi 0bb9c520ff fix livestream display 2021-07-08 15:08:53 -04:00
infinite-persistence 67324aca21
Reload page when trying to open stale chunks
https://raphael-leger.medium.com/react-webpack-chunkloaderror-loading-chunk-x-failed-ac385bd110e0

#codesplit
2021-07-08 15:06:09 +08:00
infinite-persistence 3017155867
Don't lazy-load components in ErrorBoundary
We currently handle major errors through ErrorBoundary. If the error is network related, ErrorBoundary ends up blank if it's components are lazy-loaded.

#codesplit
2021-07-08 14:52:29 +08:00
infinite-persistence a493428247
Skin fiat-tip notification
## Issue
6421 Notification: Fiat Tip Notification
2021-07-08 11:21:58 +08:00
infinite-persistence 52cba611b3
Cleaned up notification constants
- Organized under an object.
- Removed old unused ones.
2021-07-08 11:21:24 +08:00
infinite-persistence 26efe9fd45 Enable 'slow mode' in comments
## Issue
Sub item in <6119 Creator Settings: beyond "Muted Words">

## Changes
- Removed the existing 5s min gap on livestreams.
- Enabled the 'slow mode min gap' in Creator Settings

This change now affects both comments in claims and livestream comments.
2021-07-07 19:31:15 -04:00
zeppi 6761cd2aa6 add star icon 2021-07-07 14:36:20 -04:00
jessopb be879ae90a
Recon 7 6 b (#6418)
* changes

* clean

* showNoSourceClaims
2021-07-07 14:21:11 -04:00
infinite-persistence ffadae9373 Remove unused (?) selector 2021-07-07 07:50:59 -04:00
zeppi b045f62eb7 rm comment 2021-07-06 16:06:58 -04:00
zeppi e2b8aae554 use ENABLE_MATURE for fileTitleSection 2021-07-06 16:06:58 -04:00
zeppi 6b2569e5f2 use ENABLE_UI_NOTIFICATIONS 2021-07-06 16:06:58 -04:00
infinite-persistence 73e8a99c7e i18n - "LBC" to "Credit" 2021-07-06 14:53:23 -04:00
infinite-persistence 05d831b283 i18n - fiat 2021-07-06 14:53:23 -04:00
infinite-persistence 1f4746ed89 Fix RSS icon not having a gap 2021-07-06 11:21:40 -04:00
infinite-persistence 5d8e3d8b0a
Revert lazy-loading videojs
## Issue
The loading circle wasn't showing up, causing confusion.

Splitting CSS doesn't seem trivial as there seems to be a huge dependency on the load order. Pretty much similar to what this person is facing https://lihautan.com/css-code-splitting/#the-problem

## Change
This reverts videojs-specific changes from 4d638bcf.
2021-07-06 17:04:16 +08:00
jessopb 75a78cb65d
More recon (#6400)
* rm

* rm

* recon

* claimlist recon
2021-07-05 17:45:20 -04:00
infinite-persistence 8d1d2d2cf0 RecommendedContent: prevent excessive render
## Issue
When seeking on a video, RecommendedContent gets re-rendered, which causes the 20 ClaimPreviews to be re-rendered, several times. ClaimPreview has lots of children, plus it's constantly checking against the blacklist, among other things.

## Fix
The culprit seems to be the `recommendedContent` array -- the address may be different, but the contents are the same.
Do a deep compare instead.
2021-07-05 11:03:53 -04:00
zeppi 4f6740d1f8 flow... 2021-07-05 10:02:03 -04:00
zeppi d34ef851d0 make flow shut up 2021-07-05 10:02:03 -04:00
zeppi 50556bba97 lint master 2021-07-05 10:02:03 -04:00
infinite-persistence fc7edc875b
ChannelThumbnail improvements
- [x] (6332) The IntersectionObserver method of lazy-loading loads cached images visibly late on slower devices. Previously, it was also showing the "broken image" icon briefly, which we mended by placing a dummy transparent image as the initial src.
  - Reverted that ugly transparent image fix.
  - Use the browser's built-in `loading="lazy"` instead. Sorry, Safari.

- [x] Size-optimization did not take "device pixel ratio" into account.
  - When resizing an image through the CDN, we can't just take the dimensions of the tag in pixels directly -- we need to take zooming into account, otherwise the image ends up blurry.
  - Previously, we quickly disabled optimization for the channel avatar in the Channel Page because of this. Now that we know the root-cause, the change was reverted and we now go through the CDN with appropriate sizes. This also improves our Web Vital scores.

- [x] Size-optimization wasn't really implemented for all ChannelThumbnail instances.
  - The CDN-optimized size was hardcoded to the largest instance, so small images like sidebar thumbnails are still loading images that are unnecessarily larger.
  - There's a little-bit of hardcoding of values from CSS here, but I think it's a ok compromise (not something we change often). It also doesn't need to be exact -- the "device pixel ratio" calculate will ensure it's slightly larger than what we need.

- [x] Set `width` and `height` of `<img>` to improve CLS.
  - Addresses Ligthhouse complaints, although technically the shifting was addressed at the `ClaimPreviewTile` level (sub-container dimensions are well defined).
  - Notes: the values don't need to be the final CSS-adjusted sizes. It just needs to be in the right aspect ratio to help the browser pre-allocate space to avoid shifts.

- [x] Add option to disable lazy-load Channel Thumbnails
  - The guidelines mentioned that items that are already in the viewport should not enable `loading="lazy"`.
  - We have a few areas where it doesn't make sense to lazy-load (e.g. thumbnail in Header, channel selector dropdown, publish preview, etc.).
2021-07-05 16:04:10 +08:00
infinite-persistence 033b03e6e4
WaitUntilOnPage: respond to window resizing or zooming. 2021-07-05 12:06:55 +08:00
infinite-persistence bb8fb038ca
WaitUntilOnPage: add option to load when approaching viewport 2021-07-05 12:06:54 +08:00
infinite-persistence 9745d6df3e
WaitUntilOnPage: Fix scroll listener always registered + bump debounce ms
## Issue
The scroll listener never unregisters, and is always registering itself on every scroll. I believe it was done that way to also handle the case of "element is already in viewport when mounted".

## Change
Tried to separate both "element is already in viewport when mounted" and "element scrolled into viewport" into different effects.

The timeout value used is a bit arbitrary, but is needed because the initial size is (0, 0), and to debounce any layout shifts. Reasoning: If an element is explicitly placed under this wrapper, the additional delay is acceptable since it's meant to be lazy-loaded anyway.
2021-07-05 12:06:54 +08:00
zeppi 270049316e fiat tips only on web 2021-07-03 14:42:37 -04:00
Anthony 434030e007 touchup frontend to show balance 2021-07-03 14:42:37 -04:00
zeppi 8a5230ed6a new api 2021-07-03 14:42:37 -04:00
zeppi bec50829c1 updated code
about to test something

generate programatically

beginning of the frontend

stripe integration page seems to be working

add user

put functionality behind conditional tag

connect frontend working well

adding environment variables to save success and failure url

bugfix

bugfix

final clean up

adding credit card page

seems to be coming along

calls successfully coming from the frontend

fixing up frontend

cleaning up

frontend coming along

client secret working

basic frontend in place

adding tip page

adding more to the tip frontend

frontend almost done

tabs coming along

one last thing to do for frontend

adding explainer text as custom function

putting finishing touches on tabs

support tabs working well

disable fiat toggle when card not connected

fix frontend gui bug

bugfix and pull out label function

fix symbol for tip gui

modal when card is not yet saved

fix fiat disabled bug

knowing whether card is added programatically

sending tip with frontend

tip functionality working

show unpaid balance

add frontend for card add section

update frontend

update frontend

bugfix

change to use react instead of css

update how stripe is instantiated

fix bug

use customer setup

coming along

working but needs optimization

persist if card is saved

adding anonymous tip functionality

fix nan bug

build stripe endpoints programatically

show for all users for time being

allow the stripe key to automatically switch to live environment

bugfix

bugfix

fix jslint

fix channel page support button

better docs

show customer transactions on frontend

basic table in place

various page updates per jeremys notes

showing card details

nicer tip history table

add better prompt to add card on file viewer page

some linting

time

put connect account behind fiat enabled

no persist fiat mode

wallet calls

tip stuff
2021-07-03 14:42:37 -04:00
zeppi 22d9495b8d fix rss, add icon 2021-07-02 13:03:24 -04:00
infinite-persistence 5e97fdfa0d
RSS: Fix URL
Not sure why it worked in the dev instance.
2021-07-02 13:17:14 +08:00