https://discord.com/channels/362322208485277697/363087331475062785/815132676293918730
- Renamed `closeInlinePlayer` to `clearPlayingUri` to reflect it's actual function.
- Add additional check to see if the current video is actually inline before closing it.
Wanted to refactor out an actual `closeInlinePlayer`, but let's wait until there are more usages.
Looking at a few other files hoping to understand the convention for components, I moved the videojs.scss file to where all CSS related files appear to be in the project.
Also restores the CSS for vjs-overlay which I commented out previously for *some* reason (but I don't know why, and it doesn't seem to make a difference whether I comment it out or not)
if blockedList takes a while to return, the app would call claim_search once without the blocked list, then again with the block list. just hide them in the ui
* initial support for block/mute
* hide blocked + muted content everywhere
* add info message for blocked/muted characteristics
* sort blocked list by most recent block first
* add 'blocked' message on channel page for channels that you have blocked
* cleanup
* delete unused files
* always pass mute/block list to claim_search on homepage
* PR cleanup
## Issue
Second attempt at 5571: Limit description length on channel edit
## Changes
- Undo #5573: restore limit back to 5000.
- Translate the `bad-txns-claimscriptsize-toolarge (code 16)` error into `Transaction limit reached. Try reducing the Description length.`
## Issue
Closes 4505: Highlight url instead of text when embedding a link
_Too used to Github's editor behavior, so was annoyed at this too. It makes more sense to highlight the URL placeholder since that needs to be filled._
For to the unhighlighted case, then the cursor should be at the Label.
## Changes
Until the upstream code decides to fix it (`github::Ionaru/easy-markdown-editor/issues/85`), we'll handle it ourself by listing to the 'changes' events.
## Issue
- Most titles don't fit the embed container width. I wish to know what the title is without having to click on it first.
- Also, add clarity that the LBRY icon brings you Home.
## Issue
The removal of `svg` from `media__subtitle` in 09b689ba made the icon black.
## Fix
Both 'Open File' and 'Download' should have the same css class.
## Issue
5219: Add content type and language filters to channel page
## Notes
There is a quirk in the dropdown (see 5542: Language filter doesn't reflect effective setting if language is outside of `SEARCHABLE_LANGUAGES[ ]`)
Included the memes as well per translator request. I've been excluding it since I wasn't sure if memes can be translated, but I guess they can change it to something equivalent in their language.
Adds custom video.js hls quality selector plugin
This allows the quality selector plugin to stay active and listen for source changes on the player to prevent the need to recreate the player when switching between MP4's and M3U8's
## Issues
5349: Remove theater mode button from player in comments
5519: Theatre mode button doesn't do anything in full screen mode [Odysse/LBRY desktop app]
## Notes
5349: Wanted to hide for 'markdown' as well, but it seems useful for 'markdown' (to clear the screen from Related), so I did not include it.
## Issue
5438: Keep floating player in view area
## Changes
- Restore correct z-index
- The bug came as a side effect of cbac2174. Redo cbac2174 to cover both close button and floating player.
- Remove wobbling when dragging to bottom-right.
- The extra gap introduced is fighting against react-draggable. If gaps are needed, handle it entire ourselves or do it somewhere in react-draggable; neither is worth the effort, so the gap was removed.
- Fix i18n concat problem for some languages.
- Display the same label (specifically, the recommended aspect ratio) for both URL and UPLOAD. I think the string "File to upload" can be omitted, but I left it as-is.
- Remove old/unused strings.
Continually recreating video.js instance on render is bad.
Instead, persist a single instance, and simply update the source and poster on the existing instance.
I'm a bit wary of adding props to this component due to the 'dispose' call, but I think 'source' and 'claim' will update together, so it shouldn't be an issue?
## Issue
5308: Ability to choose default play speed and theatre mode or regular playback size
## Comments
Initially, I used the local storage, as per 'muted' and 'volume' -- I thought that would be appropriate.
Later, I saw that Theater Mode is already using Client Settings, so I re-did everything to match that.
Also, there is an accompanying commit in lbyr-redux.
## Issue:
5119 "Video: Mobile UI + overlay for keyboard shortcut feedback" was disabled because the feature broke the chromecast button in Android Chrome
## Issue
5204: Don't autoplay when commenting/video off screen
## Change
Previously, the checking was only done during a scroll event. We also need to check if the user has already scroll down before the component was invoked.
Clearer display of takeover amounts
Repost from empty search result, from top page, or from claim
review changes
final touches
bump
empty comment copy
they
emptier
validation cleanup
extra
## Issue
5130: Support mailto hyperlinks / urls in markdown
## Change
The markdown components already support mailto, just that the logic here ended up making it a 'ClaimLink'
## Issue
5090: When sorting channels, switching between Trending/Top/New returns viewer to the top of the page
## Approach
- Add an optional parameter to `ClaimListDiscover/Header` to add an additional anchor ID when building a new search URL.
- Clients then add the anchor ID on the desired location.
- The code that handles the scrolling then checks if the `location` contains an anchor hash. If it does, we'll scroll to that element; else, the existing behavior will be used.
## Issues
(1) 4783: New search query does not reset to the top
(2) The current way that Tag Search resets the position can be overridden by the AppRouter's call.
## Approach
Listen to `search` changes as well. This basically covers any search param changes.
Components should probably not call `window.scrollTo` directly as the AppRouter's call might override it.
The only downside to this new implementation is that the top-most (or right-most?) scrollbar won't get the customization. Any other sub-components (e.g. sidebar) will get the customization.
My guess is that the "top-most" scrollbar is above the `main-wrapper`. I'm not sure if we can (or should) add another className higher than App.
The impetus for the customization was the ugly sidebar anyway, so at least we covered that.
4913: Can't slide volume slider in pop out mode
I first tried to handle this at the floating player level, but it was impossible to hack there due to how 'react-draggable' works (it already moved the window before the "move" handler is called, so we can't do much).
Fix by overriding the dragging behavior of the videojs' VolumeBar class by not propagating the event further. It is odd that videojs didn't already do this, since it's SeekBar does stop the propagation.
## Issue
4609: If claim search on latter page fails, don't clear out all previous data
## Note
This requires an accompanying change in `lbry-redux` to mark `claimSearchResultLastPageReached` during timeout and to not purge past results.
## Change
The previous flow was: increment the page, and expect the next render to either be 0 (timeout + purge) or fill in at least 1 new item.
Since it is now possible for no results to be returned for the new page (due to timeout + no purging), the code continues to make another query. This commit stops the perpetual querying.
## Test Case:
1. https://lbry.tv/$/discover?t=imherelbry&content=video&order=top&fresh=year
2. Scroll down a few pages until it timeout happens. Past results are gone.
## Issue
In the odysee branch, the tooltip for "Following" in the Sidebar was shown as "Following --[sidebar]--". In lbry.tv, the tooltip doesn't appear.
I believe the tooltip appeared due to the name change from 'label' to 'title' and then being passed to Button through '...passedProps'.
Fix by explicitly setting the Button's 'title' to the localized text.
I believe we don't translate these since this is already the translated form?
When the language is supported later, the English version will be added to the string database instead.
## Issue
4393: Tag query URL goes on indefinitely as you change between [Trending|New|Top]
## Change
Change from `append` to `set` when building the query to remove duplicates.
Flow hates null being not a string, so the FixMe was retained.
## Note from Russian translator
"To/From" in the 'automatic dark mode setting' cannot be re-used for the one in the 'Tip Modal'.
## Change
Wanted to split this into "general" and "time", but I'm guessing it won't satisfy all languages, so we'll just use the usage as the context since there's just 2 instances.
The "Report Content" button was the impetus for this, as there was no way to know what that button is for unless the user clicked it (or smart enough to decipher the icon).
3465
## Issue
The abrupt cut-off of the expandable section bugs me (looks like a rendering glitch), especially when it cuts off in the middle of a line.
## Change
In addition to the existing 'More' button, we fade out the section to provide additional visual cues.
## Approach
This solution doesn't require the background color to be known, so it will work regardless where <Expandable> is used, or whatever color-scheme is chosen.
However, it does utilize non-standard css -- for older browsers, it should simply cut-off like the before.
This option allows users to bypass the "publish preview" modal. Users can disable it by checking "don't show this again" in the modal, and re-enable it in the Settings Page.
This requires an accompanying change in lbry-redux. Search for "SETTINGS.ENABLE_PUBLISH_PREVIEW" in the commit message to find the commit.
In Edit Mode, the preview will not appear. Not sure if it's needed, plus there are more things to handle in Edit mode (e.g. which items are changed)
- More missing strings
- Moved strings around to keep related strings together (easier for translators to guess the context)
- Removed translation macro for blank string
- Fix typo for 'Neetwork'
## Issue
4797: Markdown preview breaks when using a lbry link in angle brackets
This is similar to the Embed case in commit dbcd677e.
## Change
Replaced it with a dummy link that looks like what the final outcome would be, but would not be clickable.
Again, similar to the embed case, unless there is a way to pass the store over, I don't have an alternative that makes sense: Adding a dummy router or replacing it as a regular <a> will just make React spew security errors.
Not being able to click it is not ideal as we (as a user) can't verify our links, but it's better than the current case of not rendering anything at all.
remove previous changes,keep syncpref in wallet, change anon wallet pref key to local
sync choices wip
dont relocate syncenable setting
bump
no prefs on web unauth
bugfix redux bump
pull after sync change
bump
## Issue
4644: Markdown Preview breaks when <iframe> is present
Error: "Invariant violation: could not find 'store' ..."
## Change
Until we figure out a way to pass the store to the SimpleMDE preview formatter, just replace the embed with a stub region.
## Issue
The previous code only handled the clamping if the FP is already floating when the main window is resized.
1. In fresh Odysee session, the floating player is always clipped on the right.
2. If you resize the desktop while not floating, the FP could be clipped when you go into floating mode.
## Changes
- Factor out the clamping code.
- Add another effect to handle 'isFloating' changes.
## Issue
4741: `Pop out player disappears or is cut off`
## Approach:
- When dragging stops, determine the location of the floating player with respect to the main window in terms of percentage.
- When window is resized, roughly re-position based on the stored percentage.
## Issue
4669: `Download doesn't trigger on web until 2nd attempt`
The issue only happens when _Autoplay_ is disabled in the User Settings and the video hasn't been loaded when _Download_ is clicked.
The following code:
`if (didClickDownloadButton && streamingUrl)`
didn't triggered because:
1. `streamingUrl` has not resolved yet when the Effect ran.
2. When it did resolve, the parent component was also notified and unmounted things, causing `didClickDownloadButton` to reset.
## Approach
Avoid the unnecessary unmounting by not using a conditional section wrapper within a return statement. React probably couldn't do the diffs when the conditional is at a section level.
## Issue
4708: Bring back tag list in side bar when Tags view selected
## Approach
- Instead of displaying either Channels or Tags, both will now be displayed.
- The tags will simply be a the same button component as the "channels", but with a "#" prefix. This simplifies the CSS-side changes, and looks better overall as well.
## Issue
Fixes 4709 `Dragging floating player via video section pauses video`
## Changes
Don't propagate the key-up action if the window was dragged. Hopefully there isn't another sub-component that relies on the action being propagated.
## Note
If you drag at exactly the "Play" icon the control bar, the issue still happens.
## Issue
Users are annoyed with the constant reset of the 'channel' setting in the Publish page.
## Changes
1. Revert the previous attempt in ff7b4092. The `usePersistedState` method is bad, as it will clash with the Redux value.
2. Implemented the persistence in Redux -- requires "https://github.com/lbryio/lbry-redux/pull/347".
## Issue
The sidebar text stuck in English despite already translated.
I'm guessing the i18n macro only ran once for the global object.
## Change
Run the macro on the label when passing it to the `Button`.
## Issue
The previous commit was over-doing the manual syncing, causing other usages like the Repost Modal to always reset to a different channel.
## Fix
Only do the manual syncing when the channel does not exist.
At this point, we could also just take `channel[0]` as the new value.
## Issue
Fixes `4544 Channel-creation in "Tip|Support" Modal shouldn't submit LBC immediately`
## Changes
`Form` seems to have already tried to stop the propagation of `onSubmit`, so I'm not sure why it was still propagated.
Fix by using the same method used in the `CommentCreate`, which is simply to check for `CHANNEL_NEW` as the current selection.
## Issue
Fixes `4621 Can't create Comments if you recently deleted a channel`
The `channel` that the parent passes in is from a persisted state. If the channel has been deleted, `<select>` will automatically resolve to another selectable value. However, `onChange` will not be called for this scenario, so we now have a mismatch.
## Changes
- Manually check if the value has been auto-resolved and report it to the parent.
- An extra `setTimeout` was needed. It seems like `onChannelChange` needs to be called after the first `useEffect` of the parent, otherwise the call has no effect.
## Issue
In the `Autoplay` case, if the `WaitUntilOnPage` has already opened the gates previously, the next video's Related will be loaded regardless of scroll position.
## Changes
Add a `lastUpdateDate` prop to `WaitUntilOnPage` to allow the parent to reset the gating state.
I don't really like the `lastUpdateDate` prop since it's purpose is not intuitive. Is there a standard way to do a "one-time trigger" from the parent?
This allows `RecommendedContent` to render the Card but with an empty list, so that the area isn't totally blank while waiting for `WaitUntilOnPage` to debounce.
There are cases where `WaitUntilOnPage` will incorrectly render, such as at the beginning if the upper components hasn't expanded to full size, so `WaitUntilOnPage` would be briefly visible.
Added a 300ms debounce to fix this, which would also improve scrolling performance a bit by doing less. Hopefully 300ms is enough for the upper components to inflate to full size.
## Issue:
Fixes 4549 `Mature content + navigating to URLs directly`
_If a user navigates to mature content directly, we currently show the page even if mature content setting is not enabled. With our recent mature content verification setting, we should hide the page until the user turns it on - we can prompt directly on the file page._
## Changes:
1. Show basic info of the claim like URL and Title, so that user knows which page is being blocked.
2. Initially, I had 2 "boxes" -- one for the title and another for the message. It felt a bit messy, so `FileTitle` was augmented to house everything in one box.
## Issue:
Fixes 4411 `"SelectChannel=New" doesn't show all fields on re-entry`
## Code Changes:
`selectChannel`: Correct the value of `addingChannel` in the constructor based on the given props.
(1) This reverts commit 8641a3ee1c.
(2) Fix floating-player misalignment due to YT badge in mobile by hiding the badge.
At first, the suggestion to truncate the left URI to keep the entire thing single-lined was implemented, but during testing, I realized that the YT badge will take up the entire width anyway (especially on other languages). The URI is more important than the badge, and truncating both of them would be ugly.
Given the preference to not have 2 lines for this, we'll just hide the badge for the mobile case.
For the Channel Page case, let's make it single-line through "4454: URL / top claims overlap" instead. We'll keep this commit/PR limited to fixing the YT badge.
## Issue
Fixes 4524 `[mobile] in channel search not available`
## Changes
There are currently 3 wunderbars: (1) header (2) channel list (3) downloaded list.
The additional `wrapperStyle` in the header made it hard to find a solution that works for all 3, so I split 2 and 3 into `wunderbar__input--inline`.
## Issue:
Currently, the checkbox grayed-out state is only correctly updated when changing from "no-file" to "file selected". If you have selected a video file and later changed to a text file, the checkbox doesn't gray out.
## Code Changes:
`fileVid` wasn't being updated for the case of non-videos; now it does.
## Issue
Closes 3964 `Add Youtuber info to file page`
## Changes
(1) Refactor the YT-info query into `YoutubeBadge` component.
(2) For the File Page case, don't show "- last sync <date>" since the date has nothing to do with the file.
## Test
[x] YT Channel page
[x] YT Channel's claim page
[x] Non YT Channel page
[x] Non YT Channel's claim page
[x] No channel (anonymous) claim page
[x] Various RENDER_MODES
## Issue
Closes 4501 `Font size`
## New behavior
The Desktop app can now zoom the same way as browsers:
- Zoom In: "Ctrl+=" or "Ctrl+numpadPlus" or "Ctrl+WheelUp"
- Zoom Out: "Ctrl+-" or "Ctrl+numpadMinus" or "Ctrl+WheelDown"
- Zoom Reset: "Ctrl+0" or "Ctrl+numpad0"
## Code changes
(1) Electron provides this functionality through the `zoomIn|zoomOut|resetZoom` roles in the Menu, so it would have been a quick job.
However, given that Electron currently does not support having multiple accelerators for one item, we can't add `Ctrl+WheelUp` to the mix and would have to implement our own handler and use `webFrame`.
Given that we need to add code anyways, we handle both keyboard and mouse cases through the same handler, hence the existence of `zoomWindow.js`. It also provides the opportunity to few a few quirks with Electron's default implementation (e.g. stuck at both extremes)
(2) I recall there is another Issue for adding keyboard shortcuts. Given that these shortcuts are universally used in browsers, they are probably "reserved", so shouldn't clash with that task.
## Issue
Fixes 2675 `Claim search with exactly 20 results keep fetching next page`
## Changes
Use `claimSearchResultLastPageReached` (I didn't know it existed back then).
The unnecessary "loading" refresh will still happen one time, but at least now it doesn't happen every time we scroll to the bottom (and incorrectly incrementing 'page').
This is a follow-up on PR-4392.
## Issue:
The previous PR covered "pop from within the same page but with different query/order", but missed "pop after entering a claim".
1. Click `Your Tags`.
2. Set order to `New`.
3. Restart app or reload (crucial step)
4. Click `Your Tags`.
5. Click any claim.
6. `Back`. The order incorrectly resets to `Trending` -- it should stay at `New`.