Commit graph

4339 commits

Author SHA1 Message Date
saltrafael
620de2e6b7
Batch resolve replies 2021-10-11 08:35:50 +08:00
saltrafael
cafefb2a33
Refactor commentsReplies 2021-10-11 08:35:50 +08:00
saltrafael
f7cb39c496
Batch resolve comment list channels 2021-10-11 08:35:49 +08:00
infinite-persistence
9d48d9924d
Comments: expand replies for LC chain before mount instead of after
## Issue
40 Linked comments doesn't scroll for deep replies

## Notes
Don't need an effect for this, plus it was causing the parent to not pick it up for auto-scrolling.
2021-10-09 15:38:38 +08:00
Thomas Zarebczan
fc657d98d2
Sync language 2021-10-08 16:21:50 -04:00
Thomas Zarebczan
eaa32e4df4
Odysee references revamp, part1 2021-10-08 15:22:07 -04:00
infinite-persistence
b455e807bc
Disable timestamp parsing in livestream chat
## Issues
- The current version of the link handler doesn't seem able to control the livestream player's position.
- The "live" position is always 0:00 and everything behind it is a negative timestamp. The current timestamp parser doesn't handle negative values.
2021-10-08 17:59:05 +08:00
Thomas Zarebczan
88794761d0
use thumbnails.odysee.com
f
2021-10-07 16:38:59 -04:00
mayeaux
e3791aefdc
Send video bitrate and user bandwidth to Watchman (#7145)
* adding functionality to detect user download speed

* calculating bandwidth speed more intelligently

* saving download speed and updating it every 30s

* all the functionality should be done needs testing

* fix linting

* use a 1mb file for calculating bandwidth

* add optional chaining plugin to babel and get bitrate from texttrack

* allow optional chaining for flow

* ignore flow error

* disable bandwidth checking functionality

* fix flow error
2021-10-06 14:59:33 -04:00
zeppi
b44be39252 move file actions from lbry-redux 2021-10-06 10:22:49 -04:00
jessopb
4bc4a965d9
fix notifications page on unauthed app (#7226) 2021-10-06 10:13:37 -04:00
infinite-persistence
0be3154cbe
Fix playlist strings 2021-10-06 08:39:05 +08:00
Branko Tomic
a04c69f787 Prevent comment content from breaking the layout on mobile 2021-10-05 09:55:14 +08:00
saltrafael
256ed6a106
Remove expand/collapse from channel discussion page 2021-10-05 09:19:56 +08:00
saltrafael
fc2e08c882
Refactor commentsList 2021-10-05 09:19:56 +08:00
Dan Peterson
905a52ea61
adjust css for toast message so that it behaves as expected (text truncation via ellipsis) (#7213) 2021-10-04 09:21:59 -04:00
saltrafael
d6e14b84db
Add copy comment link menu option (#7224) 2021-10-04 09:20:37 -04:00
saltrafael
2ba6023926
Fix spacing / centering live stream + comments section (#7225) 2021-10-04 09:19:52 -04:00
zeppi
f7b942fa42 patch hubs claims_in_channel temporarily 2021-10-02 14:01:22 -04:00
zeppi
d54976e461 patch creator analytics with hub without channel claim count 2021-10-02 13:29:46 -04:00
Thomas Zarebczan
aa0db24d0d
Temp workaround claims in channel count 0 2021-10-02 11:48:45 -04:00
Thomas Zarebczan
1cb0461991
Temp workaround SDK 0 count 2021-10-02 11:44:25 -04:00
infinite-persistence
11c9a53872
Fix 'pinnedUrl' error.
Part of "6989 Fix console spam in dev"

EXTRA_SIDEBAR_LINKS should be a `SideNavLink` object, so trim down the return object from `GetLinksData`.
2021-10-02 15:08:19 +08:00
jessopb
4c72a563da
Update icons.js 2021-10-01 13:41:00 -04:00
saltrafael
56817d4e69
Fix resolving invalid claims (#7210) 2021-10-01 12:00:57 -04:00
infinite-persistence
de6c6f9bfd
List own comments (#7171)
* Add option to pass in url-search params.

Impetus: allow linked comment ID and setting the discussion tab when clicking on the `ClaimPreview`.

* comment.list: fix typos and renamed variables

- Switch from 'author' to 'creator' to disambiguate between comment author and content author. For comment author, we'll use 'commenter' from now on.
- Corrected 'commenterClaimId' to 'creatorClaimId' (just a typo, no functional change).

* doCommentReset: change param from uri to claimId

This reduces one lookup as clients will always have the claimID ready, but might not have the full URI.

It was using URI previously just to match the other APIs.

* Add doCommentListOwn -- command to fetch own comments

Since the redux slice is set up based on content or channel ID (for Channel Discussion page), re-use the channel ID for the case of "own comments". We always clear each ID when fetching page-0, so no worries of conflict when actually browsing the Channel Discussion page.

* Comment: add option to hide the actions section

* Implement own-comments page

* Use new param to remove sort-pins-first.

comment.List currently always pushes pins to the top to support pagination. This new param removes this behavior.
2021-10-01 08:10:27 -04:00
infinite-persistence
c71b90cecf
Fix linked-comment scrolling
I think this the best solution so far, at the expense of a slight delay in scrolling if the network call stalls.

- Added "fetching by ID" state so that we don't need to use the ugly N-retries method.
- `scrollIntoView` doesn't work if the element is already in the viewport, and the `scrollBy` adjustment doesn't take into account the y-position restoration that we perform on certain type of pages. Use `window.scrollTo` instead and taking into account current scroll position.
2021-10-01 15:51:05 +08:00
infinite-persistence
2cebdc3113
Fix wrong 'recsysId' sent due to search-key mismatch
## Issue
.../archives/C02FQBM00Q0/p1633044695010600

## Changes
When querying a search key, it has to be an exact match. This was broken by the insertion of `free_only` in the fetch.

Added a function to generate the options, so that all clients stay in sync.
2021-10-01 10:46:26 +08:00
infinite-persistence
dd7c56a324
i18n - ChannelMention and other fixes 2021-10-01 08:12:37 +08:00
saltrafael
2f4dedfba2
Add Channel Mention selection ability (#7151)
* Add Channel Mention selection ability

* Fix mentioned user name being smaller than other text

* Improve logic for locating a mention

* Fix mentioning with enter on livestream

* Fix breaking for invalid URI query

* Handle punctuation after mention

* Fix name display and appeareance

* Use canonical url

* Fix missing search
2021-09-30 17:30:32 -04:00
saltrafael
81abae875f
Fix plant icon (#7195)
* Fix plant icon

* Also change phone icon name
2021-09-30 14:05:39 -04:00
Bradley Ray
819bdea0c6
fix playlist resolving collectionurls (#7178)
* fix playlist resolving collectionurls

* Update CHANGELOG.md

Co-authored-by: Thomas Zarebczan <tzarebczan@users.noreply.github.com>
2021-09-30 09:03:50 -04:00
saltrafael
26f80b0ec5
Add icons (#7194) 2021-09-30 09:01:24 -04:00
infinite-persistence
0984fe8370
Fix page titles for SiteLinks
Part of `7166 improve search metadata`, where page titles are important clues for Google to generate Site-Links.
2021-09-30 14:47:18 +08:00
infinite-persistence
87636fc887
Commentron now includes replies for ByID request
Wasn't aware of that, and that was causing 7146 ("show replies" visible when there are no replies).
2021-09-30 09:22:21 +08:00
jessopb
fdd2d503d9
use homepage LATEST for following discover (#7185) 2021-09-29 15:22:46 -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
Branko Tomic
b1d4f119a7
Fix “Your Account” popup on mobile (#5652) (#7172)
* Fix “Your Account” popup on mobile (#5652)

* Update changelog

Co-authored-by: Branko Tomic <branko@spicefactory.co>
2021-09-29 11:20:36 -04:00
infinite-persistence
a8149fe9bb
Memoize 'mutedAndBlockedChannelIds'
It was being recalculated repeatedly.

This memoizes it, although it still re-calculates occasionally despite none of the source arrays changed. I think it is due to the state change in the Preference Sync.

Note: input selectors to `createSelector` needs to be extractions-only (i.e. must not have transformations). I think most of our `makeSelect*` selectors violate this and broke memoization.
2021-09-29 21:55:01 +08:00
infinite-persistence
b796ab3207
Fix missed render when blocklist is fetched
## Issue
7176

## Changes
Pitfalls of pausing render via React.memo:
  - We'll miss the `doClaimSearch()` since that is sparked by an `useEffect`.

Seems like we can't avoid having a redundant copy of the previously-displayed URIs.
2021-09-29 16:33:18 +08:00
saltrafael
ddc29ac853
Fix autoplay next default value (#7173) 2021-09-27 15:10:41 -04:00
infinite-persistence
78d0ff9793
Adjust comment fade-out height
## Issue
6944 Comment expansion sometimes doesn't reveal extra text (already showing everything)

## Fix
Reconcile some constants between JS and CSS.
2021-09-27 11:01:44 +08:00
infinite-persistence
3c0750a2a0
Fix homepage tiles not filtering blocked channels
## Ticket
7165 homepage queries don't take into account blocked channel ids (mute does)

## Changes
resolveSearchOptions: was not grabbing redux data correctly.
2021-09-25 13:14:08 +08:00
saltrafael
cc76a4a665
Fix video embeds in comments not playing and resize issues (#7163) 2021-09-24 11:53:17 -04:00
infinite-persistence
3b47edc3b9
Livestream category improvements (#7115)
*  Remove old method of displaying active livestreams

Completely remove it for now to make the commit deltas clearer.
We'll replace it with the new method at the end.

* Fetch and store active-livestream info in redux

* Tiles can now query active-livestream state from redux instead of getting from parent.

*  ClaimTilesDiscover: revert and cleanup

## Simplify
- Simplify to just `uris` instead of having multiple arrays (`uris`, `modifiedUris`, `prevUris`)
- The `prevUris` is for CLS prevention. With this removal, the CLS issue is back, but we'll handle it differently later.
- Temporarily disable the view-count fetching. Code is left there so that I don't forget.

## Fix
- `shouldPerformSearch` was never true when `prefixUris` is present. Corrected the logic.
- Aside: prefix and pin is so similar in function. Hm ....

* ClaimTilesDiscover: factor out options

## Change
Move the `option` code outside and passed in as a pre-calculated prop.

## Reason
To skip rendering while waiting for `claim_search`, we need to add `React.memo(areEqual)`. However, the flag that determines if we are fetching `claim_search` (fetchingClaimSearchByQuery[]) depends on the derived options as the key.

Instead of calculating `options` twice, we moved it to the props so both sides can use it.

It also makes the component a bit more readable.

The downside is that the prop-passing might not be clear.

* ClaimTilesDiscover: reduce ~17 renders at startup to just 2.

* ClaimTilesDiscover: fill with placeholder while waiting for claim_search

## Issue
Livestream claims are fetched seperately, so they might already exists. While claim_search is running, the list only consists of livestreams (collapsed).

## Fix
Fill up the space with placeholders to prevent layout shift.

* Add 'useFetchViewCount' to handle fetching from lists

This effect also stashes fetched uris, so that we won't re-fetch the same uris during the same instance (e.g. during infinite scroll).

*  ClaimListDiscover: revert and cleanup

## Revert
- Removed the 'finalUris' stuff that was meant to "pause" visual changes when fetching. I think it'll be cleaner to use React.memo to achieve that.

## Alterations
- Added `renderUri` to make it clear which array that this component will render.
- Re-do the way we fetch view counts now that 'finalUris' is gone. Not the best method, but at least correct for now.

* ClaimListDiscover: add prefixUris, similar to ClaimTilesDiscover

This will be initially used to append livestreams at the top.

*  Re-enable active livestream tiles using the new method

* doFetchActiveLivestreams: add interval check

- Added a default minimum of 5 minutes between fetches. Clients can bypass this through `forceFetch` if needed.

* doFetchActiveLivestreams: add option check

We'll need to support different 'orderBy', so adding an "options check" when determining if we just made the same fetch.

* WildWest: limit livestream tiles + add ability to show more

Most likely this behavior will change in the future, so we'll leave `ClaimListDiscover` untouched and handle the logic at the page level.

This solution uses 2 `ClaimListDiscover` -- if the reduced livestream list is visible, it handles the header; else the normal list handles the header.

* Use better tile-count on larger screens.

Used the same method as how the homepage does it.
2021-09-24 10:26:21 -04:00
infinite-persistence
f38a15ee0d
Blocklist page: fix perpetual spinner when trying to refresh with no channels
There's nothing to do when you don't have a channel, so hide the button and ensure redux fails gracefully.
2021-09-24 15:04:59 +08:00
infinite-persistence
0e391a3d78
Comment: Swap the order of "Edit" and "Remove"
This order is more common.
2021-09-24 10:00:37 +08:00
infinite-persistence
65d7e478ac
Don't allow assigning yourself as moderator
Also fixed split-string (hard to localize).
2021-09-24 09:57:24 +08:00
infinite-persistence
6658217865
Restore "Stream Key Button (#7127)" + lint and modifications
- Consolidate functionality into existing component.
- Use proper strings.
2021-09-23 20:13:02 +08:00
infinite-persistence
8bc8c4bcae
Revert "Stream Key Button (#7127)"
I forgot to lint before merging. Reverting for now, will fix in a bit.

This reverts commit 5c8878353f.
2021-09-23 17:57:49 +08:00