-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List own comments #7171
Merged
Merged
List own comments #7171
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
infinite-persistence
force-pushed
the
ip/own.comments
branch
from
September 27, 2021 17:38
cd2f3d2
to
bac26bc
Compare
Don't love the placement of where this is avaialble, but probably the best bet for now. Checking with Beamer on a sorting issue, otherwise it looks good! |
infinite-persistence
force-pushed
the
ip/own.comments
branch
from
September 30, 2021 07:36
bac26bc
to
05f2aed
Compare
There's a new sorting method (5 I think - check DMs) to remove pins. Can we make the comment clickable or linkable? |
Impetus: allow linked comment ID and setting the discussion tab when clicking on the `ClaimPreview`.
- 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).
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.
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.List currently always pushes pins to the top to support pagination. This new param removes this behavior.
infinite-persistence
force-pushed
the
ip/own.comments
branch
from
October 1, 2021 08:17
05f2aed
to
48247cb
Compare
|
infinite-persistence
added a commit
that referenced
this pull request
Oct 2, 2021
Add back commits to make the diffs clearer, and to allow easier partial reverts.
jessopb
pushed a commit
that referenced
this pull request
Nov 13, 2021
Implement Download Progress Revert "Stream Key Button (#7127)" I forgot to lint before merging. Reverting for now, will fix in a bit. This reverts commit 5c88783. Restore "Stream Key Button (#7127)" + lint and modifications - Consolidate functionality into existing component. - Use proper strings. Localize sunset nag Changed the text a bit so that we can re-use the existing 'Learn more'. Don't allow assigning yourself as moderator Also fixed split-string (hard to localize). Comment: Swap the order of "Edit" and "Remove" This order is more common. 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. i18n 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 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. - `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 Move the `option` code outside and passed in as a pre-calculated prop. 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 Livestream claims are fetched seperately, so they might already exists. While claim_search is running, the list only consists of livestreams (collapsed). 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 - 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. - 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. Fix video embeds in comments not playing and resize issues (#7163) -- tmp revert -- This reverts commit 3b47edc to allow putting back in the original commits. ❌ 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 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. - `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 Move the `option` code outside and passed in as a pre-calculated prop. 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 Livestream claims are fetched seperately, so they might already exists. While claim_search is running, the list only consists of livestreams (collapsed). 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 - 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. - 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 and options checking - Added a default minimum of 5 minutes between fetches. Clients can bypass this through `forceFetch` if needed. - 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. Fix homepage tiles not filtering blocked channels 7165 homepage queries don't take into account blocked channel ids (mute does) resolveSearchOptions: was not grabbing redux data correctly. Adjust comment fade-out height 6944 Comment expansion sometimes doesn't reveal extra text (already showing everything) Reconcile some constants between JS and CSS. force mp3 extension vs mpga Fix autoplay next default value (#7173) Fix missed render when blocklist is fetched 7176 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. 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. Fix “Your Account” popup on mobile (#5652) (#7172) * Fix “Your Account” popup on mobile (#5652) * Update changelog Co-authored-by: Branko Tomic <[email protected]> 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 use homepage LATEST for following discover (#7185) 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). Fix page titles for SiteLinks Part of `7166 improve search metadata`, where page titles are important clues for Google to generate Site-Links. Add icons (#7194) fix playlist resolving collectionurls (#7178) * fix playlist resolving collectionurls * Update CHANGELOG.md Co-authored-by: Thomas Zarebczan <[email protected]> Fix plant icon (#7195) * Fix plant icon * Also change phone icon name 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 i18n - ChannelMention and other fixes Fix wrong 'recsysId' sent due to search-key mismatch .../archives/C02FQBM00Q0/p1633044695010600 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. 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. Prevent random description in Google Search results for "odysee" (#7206) 7166 improve search metadata Depending on the search term and timing, Google extracts data from the sidebar or page content to use as the search-result description. Defined `description` (on top of the existing `og:description` and `twitter:description`. While I couldn't find a definitive doc saying that this is the solution, this is present in all other sites (and matches their description in a Google Search results). Add favicon for Google Search results (#7205) - A side-quest from "7166 improve search metadata". - The favicon must be from the same domain as the homepage, so the CDN URL couldn't be used, hence the additional upload. - The favicon also needs to be multiples of 48x48 and above. - Wanted to use SVG for the smallest size possible, but seems like Safari does not fully support it. Got Dejan to give me a reasonably-sized PNG. https://developers.google.com/search/docs/advanced/appearance/favicon-in-search#guidelines 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. Fix resolving invalid claims (#7210) Update icons.js --- tmp revert --- This reverts commit de6c6f9. 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. Corrected meta for "description" (patch for #7206) It should be `name`, not `property`. Copy-paste error from the OG version. 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`. Temp workaround SDK 0 count Temp workaround claims in channel count 0 patch creator analytics with hub without channel claim count patch hubs claims_in_channel temporarily OG: fix url for categories Category cards are showing up as "odysee.com" cards in Facebook. - `og:url` is supposed to be the canonical URL. It was hardcoded to "odysee.com", so every category was being redirected when the card is being generated. - Removed `twitter:url`. The documentation says it will fall back to `og:url`, so there is not need to define both if it's the same. OG: Technology category missing due to rename - 'technology' was renamed to 'tech'. - Leave both entries there for now. Not sure if other homepages still use the old link or not. Fix spacing / centering live stream + comments section (#7225) Add copy comment link menu option (#7224) adjust css for toast message so that it behaves as expected (text truncation via ellipsis) (#7213) Refactor commentsList Remove expand/collapse from channel discussion page Prevent comment content from breaking the layout on mobile ESLint fix Update Dark theme and fix playing issue Fix playlist strings Add sitemap to influence Sitelinks Part of `7166 improve search metadata` This is an experiment to influence the Sitelinks in our search results. Our current sitemap only consists of claims, so claims appear in Sitelinks more often. We (Julian) want categories to have higher priority, if possible. For now, the sitemap will be defined in Google Console instead of robots.txt. If it works, the file should be uploaded to sitemap.odysee.com, alongside the claim list sitemap. Revert "Add sitemap to influence Sitelinks" Seems like I messed up robots.txt? This reverts commit 9565495. Bump url-parse from 1.5.1 to 1.5.3 (#7230) Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](unshiftio/url-parse@1.5.1...1.5.3) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> fix notifications page on unauthed app (#7226) move file actions from lbry-redux 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 Fix ESLint Update Download Progress Update CSS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test
KP » Settings » Account » Comments
Issue
Closes #5146 Show all own comments
Known issues
The total number of comments that Commentron reports vs. what it returns, can be different. Checking with Mark/Tom.Fixed