Commit graph

12265 commits

Author SHA1 Message Date
infinite-persistence
70ea3f0812
tus: restore higher chunk size (10MB -> 25MB) (#1774)
It was previously reduced to 10MB (d1447083) with the assumption that the slow disk write was causing the "lock" issue.

Now that the backend has implemented a new locking mechanism, restore to a larger chunk to reduce the number of PATCH calls.

```
10MB  ->  2s/call
25MB  ->  6s/call (similar to what I see with Google Drive)
100MB -> 25s/call
```
2022-06-29 08:34:25 -04:00
infinite-persistence
c2b911d73a
Workaround for markdown crash with Google Translate (#1773)
## Issue
Depending on what the markdown content was, React crashes when unmounting the component if Google Translate is active.

## Change
It seems like the content is too dynamic to apply the same workaround used in 1772 for FileReactions (someone else can take a stab).

Until we have a better solution, just make the markdown component (posts, comments, file description, etc.) not participate in Chrome-level translations. It's not a good solution from a user standpoint, but it at least it doesn't crash.
2022-06-29 08:25:21 -04:00
infinite-persistence
f686d86910
FileReactions: make it robust against external DOM manipulation (#1772)
## Issue
Crash when reacting while Google Translate is active.

https://github.com/facebook/react/issues/11538#issuecomment-390386520
2022-06-29 08:25:12 -04:00
infinite-persistence
4b1bf22154
Revert "Fix uploads page cleared/reloaded on each navigation" (#1771)
This reverts commit 1dccc1ac64.

Closes 1770
Re-opens "1515 uploads page cleared/reloaded on each navigation"

1515 is just a minor annoyance, while the current issue is a non-functional page, so reverting for now and revisit later.
2022-06-29 08:04:33 -04:00
mayeaux
3f44b80603
Merge pull request #1756 from OdyseeTeam/dont-dispose-when-switching
Don't dispose switching between video/livestream, chapter button fix, current time not updating quickly fix
2022-06-29 12:47:18 +02:00
Anthony
41905f420e
dont dispose between videos and update current time immediately
fix chapters button not being hidden

add back live ui

fix chapters button showing up when using miniplayer

bugfix race condition for removing chapters button

move chapter loading to videoviewer component

remove unnecessary claim being passed
2022-06-29 12:42:26 +02:00
Thomas Zarebczan
5c41e5da0d
improve sync page clarity, move up button. 2022-06-28 16:07:03 -04:00
infinite-persistence
d3f95e256a
Recsys: add isEmbed to videos in Markdown (posts, comments) (#1765)
* Remove dead-end selector

`playingUri` resides in the `content` slice, so this returns nothing.
Nobody is using it, so should be safe to remove.

* Recsys: add `isEmbed` to videos in Markdown (posts, comments)

It seems like the existing `embedded` needs to specifically mean `/$/embed` (external from odysee.com), so had to add another variable.
2022-06-28 08:10:22 -04:00
infinite-persistence
0a88c6254d
Publish: restore the multiple retries (#1763)
- Previously, we tried to solve the "file locked" problem by only making one retry after a super long delay. This was from an anecdote that it's more likely to lock up if the delay was short.
  - This didn't help at all for our case, and Andrey has made some locking mechanism changes in the backend.
  - The reduced number of retries probably increased the number of "failed to upload chunk" errors (not sure), which is supposedly a normal occurrence and we're expected to keep retrying.

Restoring the retry behavior and monitor...
2022-06-28 06:29:07 -04:00
infinite-persistence
96cdf11567
Fix naming convention and type correctness
- Fixed value props being named like a function/selector.
- Fixed flow type for membership (should be `?string`).
    - It might not matter in the current code, but the whole purpose of type checking to catch usage errors in the future.
- `hasXXX` indicates a boolean, so it doesn't make sense to force the client to input a string.
2022-06-28 13:39:11 +08:00
infinite-persistence
1933997276
Preorder cleanup
Reported issues that weren't completed in de068d36
2022-06-28 13:36:18 +08:00
mayeaux
1bf3f492ff
add lbry_api_url to env defaults (#1760) 2022-06-27 15:46:57 +02:00
mayeaux
de068d36f1
Preorder button touchups (#1755)
* update precommit hook

* touchup code per kps comments
2022-06-24 09:08:46 -04:00
mayeaux
628da8bb04
show controls if both calls to play fail (#1724) 2022-06-24 08:52:01 -04:00
infinite-persistence
7ea73c3f1b
Recsys: improve data stashing frequency
## Issue
The 15s saving interval (hijacking the position-saving code) is too far apart, causing rescys data to be lost when tab is closed/refreshed.

## Change
While I think it is fine to save to redux every second, it is still best to avoid that since a state change will always cause the map-to-props to evaluate.

Chose 5s as the interval and moved away from the position-saving code (the recsys videojs plugin is a better choice to handle this).

Also save it on `t=1` so that at least we know it played prior to the tab refreshing/closing.

## Considered
- Didn't want to do `beforeunload` again since it is unreliable and a pain to test in mobile.
2022-06-24 16:54:55 +08:00
infinite-persistence
8aa831fe49
Recsys: fix resumed-send missing totalPlayTime
Ticket: 1751

## Issue
The `totalPlayTime` resides in the videojs plugin and is only sent to the recsys object in `onPlayerDispose`, so it missed the redux rehydration in the browser close/refresh scenario.

## Change
Update the recsys value for `totalPlayTime` immediately so that it'll be part of the redux stashing (and later, rehydration).

Note that recsys data is currently being saved to redux in a 15s interval. Will change that in the next commit.
2022-06-24 16:52:08 +08:00
infinite-persistence
6b3e03cca4
Recsys: fix missing uuid
Ticket: 1745

## Issue
The search result (and the uuid) won't be ready when a recommendation is clicked, but a stub recsyst entry is created at this point. In the past, the uuid was randomly generated, so it didn't matter.

## Fix
Ensure the uuid field is filled when the recommendations are finally loaded.
2022-06-24 14:02:40 +08:00
mayeaux
4f47779303
Preorder content functionality (#1743)
* adding preorder button

* adding preorder modal

* frontend mostly done

* check if its already purchased

* refresh page after purchase

* smooth out purchase process

* check if user has card saved

* handle case where its the users own upload

* fix transaction listing order bug

* cleaning up code for merge

* fix lint errors

* fix flow errors

* allow eur purchases

* support eur on customer transaction page

* fix css
2022-06-23 20:58:32 -04:00
Thomas Zarebczan
017df02816
Update thumbnail cards URL (#1748)
And function name - was confusing that we had 2 with different paths.

Use 1280x720 to improve caching (used on mobile/tablets). There's no real spec for size.
2022-06-23 18:09:48 -04:00
Rave | 図書館猫
305673999b
Update thumbnail paths (#1747) 2022-06-23 22:33:32 +02:00
Thomas Zarebczan
553a801bc3
fix tip target page 2022-06-23 09:14:47 -04:00
Thomas Zarebczan
29b2a8aeff
use new reporting endpoint
fixes #1698 at least for now
2022-06-23 08:47:34 -04:00
infinite-persistence
7cbb7a54aa
Handle browsers that don't support IntersectionObserver (#1739)
* Remove ad-handling in videojs.jsx

Primary impetus is to remove unnecessary IntersectionObserver usage, but it should be removed anyway because:
- no longer relevant today with Adnimation's script.
- we also globally hide floating ads now, so no more invisible divs.
- the code is wrongly placed -- it's not the responsibility of the Videojs component.

* use-lazy-loaded: skip if IntersectionObserver is not supported

## Issue
Page not loading in older Safari (e.g. ipad air 2)

## Approach
Instead of using a polyfill (which comes with implementation caveats), just not apply the lazy-loading for those old browsers. Not lazy-loading is better than not loading at all, plus this is way easier to test (even by just reading the code) than testing out the polyfill implementation's caveats.

The cons is we would need the polyfill if we use it in other places in the future.

## Code Changes
Factor out the src-setting code, and use it directly when IntersectionObserver is not found.
2022-06-23 08:10:27 -04:00
Raphael Wickihalder
3687292cdf
Fix button padding on mobile 2022-06-23 13:53:19 +02:00
infinite-persistence
053e214c86
PublishReleaseTime widget improvements (#1740)
* PublishReleaseDate: improve calendar error handling

Ticket: 1738

- Report invalid `minute` and `day`. The 3rd-party widget auto-corrects the other fields. Don't think there is a way to make it autocorrect for all.
- Report invalid range (cannot set to future date).

* Block form on releaseDate error instead of silently sending last valid value

which does not tally with what's on screen.
2022-06-23 07:27:08 -04:00
Thomas Zarebczan
b6f9b0e6d4
Add token to help page (internal) (#1737) 2022-06-22 12:32:17 -04:00
Raphael Wickihalder
d1958d3775
Add help button to header in guets mode 2022-06-22 18:25:24 +02:00
infinite-persistence
486a557d75
Recsys: capture and use x-uuid from search results (#1727)
* Recsys/FYP: add documentation.

* Recsys: capture and use `x-uuid` from search results

Ticket: 1717
2022-06-22 09:43:54 -04:00
infinite-persistence
63a2430a7c
ReportContent: redirect back after logging in (#1733)
## Issue
1709 - If you sign in while reporting, you end up in the homepage

## Notes
The other option is to just make `<Header>` always redirect back to where it came from using the full path. But existing code elsewhere seem to always trim off any params (e.g. `location.search`, `location.hash`) when doing redirects.

So, ended up making it generic and let the caller decide where to redirect (and with what params).
2022-06-22 09:07:15 -04:00
infinite-persistence
9e4ac047ca
Str and cleanup 2022-06-22 20:53:34 +08:00
Rave | 図書館猫
3bfdd7e920
Add platforms to share buttons (#1721)
* Add Minds to share buttons

* Add Telegram & WhatsApp

* Adjust style on mobile

* Adjust WhatsApp share url on desktop

* Freeze icon size

* Adjust share buttons
2022-06-22 08:23:40 -04:00
infinite-persistence
e2166b6f03
Change collection item fetch-page from 5 to 50 (#1732)
In `doResolveUri`, if the `uri` is a collection, it will attempt to fetch all items in the collection.

Can't think of any special reason to keep the page-size small, and not seeing any notes in the commits either. It just ends up making several `claim_search` of 5's until all items are fetched.
2022-06-22 08:04:22 -04:00
Rave | 図書館猫
86fcd87f53
Notification Menu Upgrade (#1713)
* Mark notification as seen on hover

* Clean code

* Mark notifications as seen on button click

* Clean code

* Animate bubble
2022-06-21 20:59:37 -04:00
mayeaux
061f4ab08f
fix progress bar hover (#1726) 2022-06-21 11:22:20 -04:00
infinite-persistence
ee3236fe1e
Recommendations: factor out a selector for raw results
1606
2022-06-21 22:14:07 +08:00
infinite-persistence
539cc062b6
DRY: fix duplicate code for Recommended key generation
Must use `getRecommendationSearchOptions`, otherwise there is a chance of some clients deriving the wrong key.
2022-06-21 22:14:07 +08:00
mayeaux
d50f51bd3b
fix plays inline bug on ios (#1723) 2022-06-21 09:55:25 -04:00
Thomas Zarebczan
56ce70cef5
Revert "Undo the hardcoded ad div id (#1719)" (#1722)
This reverts commit 5888b6b7d8.
2022-06-21 06:12:47 -04:00
infinite-persistence
5888b6b7d8
Undo the hardcoded ad div id (#1719)
I previously hardcoded both IDs since the script was not looking the right one at one point, but I guess that was unnecessary.

I don't think it causes any problems, because I'm still just loading 1 script (no double video, just 2 divs for them to choose).

Note that we are still using the `filepage` script since the `homepage` one is not working.
2022-06-21 05:51:07 -04:00
Raphael Wickihalder
3e0f1c63c9
Update snackbar design 2022-06-21 10:11:28 +02:00
Raphael Wickihalder
b53fc3732e
Redesign error nag 2022-06-21 08:34:27 +02:00
mayeaux
63f7a8f15c
bugfix streams continuing to run in the background (#1714) 2022-06-20 18:17:12 -04:00
Rave | 図書館猫
20ff660cb2
Minor design fixes in modals (#1711)
* Minor design fixes in modals

* Adjust button icon color
2022-06-20 13:51:57 +02:00
Rave | 図書館猫
d40260374d
Inject close button into footer banner ad (#1710)
* Make shouldLoadSticky dynamic again

* Adjust of statement

* Update statement again...

* Adjust selector. Again.
2022-06-17 12:07:08 -04:00
infinite-persistence
f9ebd0863d Consolidate the mobile tile to use the poster size for better caching.
It's all approximation anyway.
2022-06-17 11:58:43 -04:00
infinite-persistence
b8fceacb8a Only apply the larger thumbnail width on mobile + tile layout
## Ticket
1526 strange thumbnail size requested on mobile layout (pc only?)

## Notes
The 900px was to account for blur tile thumbnails in mobile homepage (4f4803c6).
Fix to only do that in tile mode.
2022-06-17 11:58:43 -04:00
Raphael Wickihalder
eea0ec16e0
Fix notification menu height / transparency issue in firefox 2022-06-17 12:35:18 +02:00
Raphael Wickihalder
7cdeb9593f Add settings page button to header in guest mode 2022-06-17 18:23:53 +08:00
Raphael Wickihalder
845b70f52c
Adjust ad design 2022-06-17 12:20:35 +02:00
Raphael Wickihalder
8e15f30ace
Fix typo 2022-06-17 11:27:23 +02:00