* own comments show first in controversial / best #5905
* workaround to place my recent comment at the top
* only most recent comment
* lint fix
Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
* Release date -- initial attempt (squashed and rebased)
- Use white color for calendar buttons in release date input
- Update icon color for release date input
- Allow to set time in release date and display it under additional options
- Add release date field
* Upgrade to latest react-datetime-picker.
I believe this also picks up the y18n security fix.
* Handle dark theme and general style fixes.
* [+redux] Change how release_time is edited.
- `releaseTime` is now a number instead of a string, matching `release_time`. It was getting confusing what the variable units were.
- `releaseTime` will always match `release_time` for an edit. It will be used in the GUI to reset just the date to the original, instead of having to reset the entire form.
- `releaseTimeEdited` will be used by `updatePublishForm` in the GUI to represent the desired new release time. Set to `undefined` if we don't want to change the date.
* Add 'Reset|Now|Default' buttons instead of overloading the date-picker's "X" button.
Before this, the "X" button resets to the original (previous) publish date for Edits, and resets to current time for New Claims. This is very confusing, so added explicit text-based buttons -- hopefully this is more intuitive.
* bump redux to master
Co-authored-by: Franco Montenegro <franco.montenegro.ruke@gmail.com>
Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
## Issue
6010: hyperchat send display issues with GIF profiles
The FreezeFrameWrapper have no `src` to freeze due to the lazy loading.
## Fix
Delay the freezing by making the lazy-load effect return a state to indicate when then `src` has been loaded.
Since the lazy-loader will `unobserve` after loading, the state will never go back to false, so we don't need to handle the case of preventing `new FreezeFrameWrapper` from being called multiple times from it's effect.
## Issue
Closes 6022 Notifications: Creator Commented
## Changes
- Beautify - show creator icon instead of generic bell.
- Link to comment directly instead of the claim.
* Add ICON.INFO - "i" within a circle.
Basically, an inverted ICON.ALERT.
* Posts: restore "Tip unlock | Claim details" component
## Issue
5882: tip unlock + claim id detials missing from markdown posts view
## Notes
The easiest solution would be to put `FileDescription` into posts, but I think that goes against the clean up of the Post layout, where the focus should be on the content. The faded style of the File Details section seems too distracting, plus we don't want the File Description anyway.
Fixed by:
- Make the existing "LBC amount" clickable to show credit details. An additional padlock will appear if the content is yours and you have tips to unlock.
- Add an "info" icon beside it to show file details.
These "link" buttons are usually lit, but I dimmed it in this case to make them stand out less. Again, focusing on Post content instead of buttons.
* Show full notification text via tooltip
The tooltip fixes the system notifications problem (mentioned below), and also allows one to quickly read the entire comment without actually having to visit the comment.
Currently, we only show about 50 characters in the notification, truncating it to an ellipsis when exceeded.
This is not much of a problem for dynamic text (e.g. comments) since the full text can be seen after clicking on the notification (brings you to the comment). For system notifications, this is problematic since there's no other way to know what the full text was.
Tried to dynamically change the font size to auto fit, but it wasn't fruitful. Even if it did work, it'll probably won't be legible for a 2000-character comment, plus the entire list will look weird with various font sizes.
* Beautify "missed out" notification; bring user to Verify page.
## Issue
6021: Notifications: Missed Out
## Changes
- The notification already brings the user to the `/rewards`. Tweaked it to directly enter the Verify Page.
- Use LBC icon instead of generic bell for this notification.
* Fix ability to delete own comments in livestream
## Issue
5832: can't remove own comments in live stream mode (if you have multiple channels?)
Looks like it was just missing `commentIsMine` for the new component.
* Disable editing livestream comments
It doesn't do anything at the moment, anyways.
* Disable deleting hyperchats
The "total tipped" will get deducted when hyperchats are deleted, which doesn't make sense (doesn't reflect actual total that the creator received).
* Swap: populate 'status' from 'btc/swap' response instead of waiting for first websocket input.
## Issue
Clsoes 5975: swap stop at processing even though response comes through
## Notes
Occasionally, the first websocket message doesn't come through (seems like the commerce didn't send?). There's really no need to wait for one more 'status=NEW' message to ensure the right data is being populated (being over-cautious here).
* Beautify the "exact amount" advice.
Scenarios where active livestreams will not appear:
- creation date is way back.
- homepage section options excludes livestreams.
Make an explicit `claim_search` but with `has_no_source` if the client wants `liveLivestreamsFirst`.
If there are lots of channels with livestreams, there's a possibility that the final list will be larger than what was requested. We could trim it to be within the original `options.pageSize` range, but I left that out for now.
It would have been a clean implementation through `renderProperties`, but due to the need to adjust the opacity of `claim-preview__file-property-overlay` (the parent elemtn), I ended up having to create a new `live` attribute.
## Issue
One of the items in 5865 Video shortcut issues
This one is not really an issue, but it would be nice to match what the arrow keys are doing. Also, in slower regions, seeking 10s will almost always end up buffering.
## Issue
Channel links were showing the "This channel isn't staking enough LBRY Credits for link previews." -- channel links shouldn't be showing previews in the first place.
## Change
Moved the logic into `ClaimLink`, which is the better place to put it anyway. I think I was trying to not touch as many components as possible (i.e. not passing `allowPreview` down too many layers) in the initial implementation. This caused the `isChannel` consideration to be missed.
These only work in the `selectThumbnail` component. If it's small enough, it'll get past the transaction limit-check, but ultimately it doesn't appear correctly in the claim list.
It'll probably appear correctly if we tweak the ClaimPreview code, but since this also fails the Google Video metadata test, I think we should disallow this.
## Issue
5923
Thumbnail errors were just being used in `selectThumbnail`. The form doesn't know about it and was using allowing invalid thumbnails like 'helloworld' to pass through.
I believe the rest of the GUI is setting 'thumbnail'.
'thumbnail_url' is only populated right before publishing.
So, the flag was always false -- we just never see the error on screen because the component is incorrectly hidden (fix for this is coming up next...)
* FileExporter: add 'fetch' hook + Web support
* Re-add ability to export transactions
Closes 4793: Export Wallet History For Taxation Purposes
* Move file-creation to the background.
Don't let the file-creation process block the GUI.
Requires lbry-redux update.
* Bump redux | doFetchTransactions: bump pageSize to 999999; remove doFetchSupport
* bump redux
Co-authored-by: Thomas Zarebczan <thomas.zarebczan@gmail.com>
* CopyableText: add 'onCopy' for clients to change the text-selection
* Swap: only copy the amount (without currency)
## Issue
5873: Rounds 2 of LBC swaps
## Notes
It was an intended feature to include the currency -- I can paste the full string into my note book, while pasting into wallet apps like Exodus will automatically trim off the currency anyway.
Regardless, removed the 'feature' :D
- For the active swap, switch from polling to websocket. The returned data is now the Charge data from the commerce, so some parsing will be required.
- Allow the user to send other coins that the commerce supports.
- Only save the 'chargeCode' to the wallet. The other data can be repopulated from this.
- Store the receipt currency. I'm not sure if the commerce supports sending bits from various coins. Take the coin that came with the 'COMPLETED' message for now.
- Fix 'lbc' calculation to match IAPI side.
- Allow users to see full detauls from "View Past Swaps".
- String cleanup
- GUI cleanup.
While it would be nice if we can swap anonymously through Desktop, the IAPI will tie a wallet address with an account. Final decision is to require authentication.
- Users should be able to see the entered and promised amount, otherwise they might forget how much to send over.
- This change also prepares for the future upgrade to support multiple coins.
## Issue
- Patch for 5316: "Home and End keys not working in search box"
## Notes
Seems like 'shift+home' wasn't highlighting the text. 'shift+end' works.
Was pretty sure I tested that previously. Anyway, adding the direction variable seems to fix it.
- The icon makes the screen too busy when there are lots of images in a page.
- Use src as the last resort for the text (I though `title` and `alt` was mandatory in markdown; apparently not).
## Issue
4945: Simplify / revamp search filters for odysee (and lbry.tv)
## Changes
- Tweaked the "claim type = file | channel | everything" a little to hopefully make it more intuitive.
- Added "Sort By".
- Added "Upload Date".
- Fixed the affected files to handle both Desktop and Odysee.
- Tweaked the layout to be more condensed so that we can see some results as we change the filter.
- Added animations.
- Added "Exact match" option that helps user to surround with quotes.
## Issue
- Redo 5636: Disable video previews in comments/posts made by channels below a certain channel staked level
- Closes 5738: expand video preview level requierment to markdown images also
I think using the 'values' for the keys should be fine since each language name is unique. A key-clash would also help us catch mistakes like not differentiating sub-languages if support any (e.g. "English" vs. "English (British)")
Had to cast to String for lint.
- SUPPORTED_SUB_LANGUAGE_CODES[] that I introduced was pretty redundant when SUPPORTED_LANGUAGES[] already hold the information. The logic to ignore sub-languages (i.e. reduce the locale's "en-GB" to "en" is now located in getDefaultLanguage()).
- SUPPORTED_BROWSER_LANGUAGES[] and SUPPORTED_LANGUAGES[] look so similar and hard to tell what the former is for at first glance. The functionality to map 'zh-CN' to 'zh-Hans' is now handled by resolveLanguageAlias(), which makes the intention clearer.
This leaves us with a single list -- SUPPORTED_LANGUAGES[], whose key also tells us the desired language code to use.
Also, clients now need to call `resolveLanguageAlias` to map any language code aliases, as they differ depending on how it is queried (e.g. `navigator.language` vs. `app.getLocal()` uses different standards).
I think we no longer need to explicitly migrate existing user's 'zh-CN' into 'zh-Hans' because the rest of the system will always use the desired language code as long as 'resolveLanguageAlias' is called appropriately. e.g. the system uses `selectLanguage` and `selectLanguage` calls `resolveLanguageAlias`.
## Issue
Closes 5811: Video-embed in markdown-post is broken
- Revert "Fix 'makeSelectIsPlaying' to look at 'playing' instead of 'primary'." dabdc980a1.
- Revert "Fix 'isPlaying' to reflect 'playing' instead of 'primary' URI" 351890decf.
Reverting means "Deleting MD from downloads list causes spinning icon to run forever 4959" gets re-opened, but this is a way less severe issue to leave in.
Closes 5000: AutoPlay in Floating Player only works one time
Factor out the code that queries the recommendation. It needs to be called in two places:
(1) `RecommendedContent` - need to cover the case of floating player + visit another video page.
(2) When video is floating and autoplayed the next video.
## Issue
Closes#5720: Edit: channel-selector should re-populate with original channel
## Notes
'incognito' was not set to false, causing the 'ChannelSelector' to select Anonymous.
- remove anon option in channel dropdown when livestream tab is selected
- attempt to fill publish form with current active channel name just prior to publishing to (edge condition)
- edge condition occurs when user fills out form fully. User switches to Post (which allows anon in drop down selector). User selects Anon channel, then switches back to the livestream tab. The form was previously updated with `channel: undefined` but does not get changed when clicking the livestream tab. So we just updated the form one last time prior to publishing as a livestream
- Show most recent livestream claim on livestream setup page instead of first livestream claim
## Issue
Closes 5687: Ensure post mode has no text limit
## Changes
- `type="markdown"` can now have unlimited length if clients don't define `textAreaMaxWidth`.
- The internal default limit of 2000 is narrowed down to `type=textarea`.
## Issue
Closes 3661: Autoplay + Related go into loops ( infinite ) sometimes
## GUI
Push the actual "next" item into the top of the list.
## History search
1. Skip if the next item is itself.
2. The URL stored in the history comes in various forms, so a direct comparison won't work.
- There's also a weird case where the URL differs by just a little (p.09 vs p-09), but with the same claim ID:
lbry://vacuum-tube-computer-p.09-–-building#5212bc8bc63c373e2bf1ebc5b765595ed7b6514d
lbry://vacuum-tube-computer-p-09-–-building#5212bc8bc63c373e2bf1ebc5b765595ed7b6514d
Check the claim_id as well to cover cases like these.
## Changes
- Restore original code for how Volume and Mute is restored.
- Playback rate will be only change that gets "re-restored" in "loadedmetadata".
## Issue
5513: Video-setting persistence broken
## Notes
- Per videojs recommendation, the setting-restoration should be done after the video has been loaded, so the action was moved to `loadedmetadata`. This fixed the volume slider problem, and should have fixed the playbackRate too.
- For playbackRate, there is another special case where it gets reset to 1 (refer to comments in code).
## Issue
Closes 4936: Don't process markdown formatting as lbry:// url previews
## Approach
Preamble:
- We want to convert plain `https://lbry.tv/befreeonlbry` to an embed, but not `[blah](https://lbry.tv/befreeonlbry)`.
- At the markdown/remark level, both formats resolve to the same node type, having a `link` and a `text`, with the 'text' being auto-filled with the `href` if there is no label.
Fix by assuming the link is the non-labelled format if the `text` is the same as `href`.
This opens up one corner-case that we can't handle, which is when the user explicitly set the label using the href, e.g. `[https://lbry.tv/befreeonlbry](https://lbry.tv/befreeonlbry)`. This will still resolve to an embed. There's not enough data at the parsed level differentiate this case -- we would need to parse the content ourself before `remark`, which I think is not worth it.
## Aside/Reminder
If you see that the link doesn't resolve to an embed regardless of the format used, that's probably just due to `5636: Disable video previews in comments/posts made by channels below a certain channel staked level`
- Channel About
- description: seems handy to have a preview, so pulled in the "allowed" logic.
- email: shouldn't render preview at all
- website: shouldn't render preview at all
- Publish Preview:
- description: there's not enough height anyway, so don't render preview.
## Issue
- Closes "Wunder: Keyboard typing confusion" (https://discord.com/channels/362322208485277697/377895389992321064/784309720293965824)
- Closes 5316: "Home and End keys not working in search box"
## New behavior
Home/End key now behaves like it normally would in a typical text box, i.e.:
- Brings you to the start or end position.
- Adding a <Shift> key also selects the text from the current position.
To select the top or bottom item in the Suggestion Popup List, use Ctrl+Home/End instead (without this change, it was just Home/End previously).
## Approach
Adding the listener at the element level allows us to run it before the component's listener.
## Issue
Partially closes 3041: Display/hint what keyboard shortcuts are available in videos
(minus the "all shortcuts" overlay -- saving that for another day)
Closes 5597: batch resolves on channel search page
Do a batch-resolve immediate after getting the results and before setting the result variable, as the latter would result in the Claim* components resolving individually.
I enabled `returnCachedClaims` -- I assumed that's a reasonable thing to do. I don't see other places use it, though, so highlighting it here.
## Issue
5554: Video: loading circle sometimes does not appear until 2nd click
## What's happening
videojs behavior:
(a) A `src` change makes the Play button re-appear.
(b) An `onPlay` (or `play()`) makes the button go away.
Due to the `m3u8` header async fetch (i.e. return is potentially delayed), the initial `onPlay` (which cleared the button) that happened after user clicked Play gets negated by a potentially-delayed `src` change.
# Changes
- Manually hide the play button that is induced by the change in `src`. In the fetch-delay scenario mentioned above, the player continues to be in a 'playing' state anyway.
- But don't hide the button if paused externally (e.g. browser-level)
Restore video loading circle
## Issue
- Second attempt at 5500: Allow right click + report feature on tiles
- Related: PR_5531
## Notes
Although the link can already be easily copied on web, the menu item is still retained for consistency between the platforms.
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.