Hiding Watched Videos on Channel View#7366
Hiding Watched Videos on Channel View#7366FreeTubeBot merged 55 commits intoFreeTubeApp:developmentfrom
Conversation
…, and helper variable/function created
… function; considering moving the check logic to outside the function and call it without checks inside of it
…mmented out filtering implementation for now as I debug the code further
…an event watched to update the video list if the toggle is pressed; separated variable check from inside the filter function (still not working)
…ryCache from the store, and iterate through the videos arrray filtering out entries that exist in the History
|
hi @palharesf in the testing section you mainly are mentioning how you tested it. It would be nice if you could provide some testcases (ofcourse we will be testing outside of those cases too but would be nice to have some kind of baseline) |
|
Oh, of course @efb4f5ff-1298-471a-8973-3d47447115dc - I thought the request was for information on how I tested it hahaha For a specific Channels page, the feature is differentiating between four kinds of states:
If I were to write an automated test for this, I would implement these four test cases. Is that what you were alluding to, @efb4f5ff-1298-471a-8973-3d47447115dc ? |
efb4f5ff-1298-471a-8973-3d47447115dc
left a comment
There was a problem hiding this comment.
The Shorts and the Live tab also contains videos that can marked as watched so it would be a more consistent user experience to also include the toggle on these tabs
|
I didn't originally touch Shorts and Live as I felt those were outside the scope of the feature, but I'm happy to incorporate those changes soon to harmonize the experience. I'll work on that tomorrow unless told otherwise |
Maybe that section has to be revised so its more clear that those need to be provided, ill look into it.
Sorry i had to provide examples. From looking at your cases they look good. Everyone in our team does it a bit different depending on what type of PR they're sending in but these examples should give you a good view with what i meant with testcases. |
|
Also just a tip make sure your branch is up to date with the latest changes from the development branch before opening your PR. |
efb4f5ff-1298-471a-8973-3d47447115dc
left a comment
There was a problem hiding this comment.
- Sort by
Most Popular - Mark a few videos as Watched
- Enable Hide Watched
- See that it doesnt hide the videos
- Disable Hide Watched
- See that it does hide the videos
VirtualBoxVM_yaodKSyJOF.mp4
|
Ok, I updated the 'Testing' section of the PR to reflect the examples provided, thank you for those. I did run And the case you mentioned (i.e. marking videos as watched and having them only hidden in the next refresh) was mentioned in my PR as something intentional - I decided against refreshing the video Panel every time one video was marked as watched because I considered it excessive. That said, I can work on an event watcher that tracks videos being marked as 'Watched' manually and forcing a refresh of the Video Panel if that's the preferred way moving forward. I'll include that in my next batch of changes along with the Live and Shorts pages. Thank you! |
I think you interpreted my comment wrong. I pointed out a bug. Look at the screen recording again and try the steps to reproduce for yourself. It hides the videos when the toggle is OFF and doesnt hide them when the toggle is ON |
You're right, I had misunderstood your request. I apologize. I believe forcing the video panel to refresh once a video is marked as watched would fix this issue. I've been trying to implement that, but the code for marking as watched is in 'ft-list-video.js' and the code for refreshing the video panel on the Channel page is, naturally, on Channel.vue. I don't want to tightly couple the two pages, so what's the preferred approach here? Using the Vuex store to manage state? I don't have a lot of familiarity with Vuex, but I know how to create an event emitter and listener more generally and I assume that's the preferred route here. Any pointers would be welcome. I'll implement the toggle on the Live and Shorts pages when this is working |
* development: (50 commits) add rules to issue templates (FreeTubeApp#7516) Translated using Weblate (Romanian) Translated using Weblate (Serbian) Translated using Weblate (Russian) Move settings to `more` menu on smaller mobile devices (FreeTubeApp#7506) Translated using Weblate (Russian) Migrate WatchVideoLiveChat to the composition API (FreeTubeApp#7494) Translated using Weblate (Basque) Translated using Weblate (Russian) Bump shaka-player from 4.14.14 to 4.14.15 (FreeTubeApp#7501) Bump electron from 36.3.1 to 36.3.2 (FreeTubeApp#7500) Bump sass from 1.89.0 to 1.89.1 (FreeTubeApp#7499) Bump the eslint group with 3 updates (FreeTubeApp#7498) Bump the stylelint group with 2 updates (FreeTubeApp#7497) Bump @babel/core from 7.27.1 to 7.27.4 in the babel group (FreeTubeApp#7496) Translated using Weblate (Japanese) Translated using Weblate (German) Implement context menu item "search X in new window" (FreeTubeApp#7477) Translated using Weblate (Portuguese (Brazil)) Translated using Weblate (French) ... # Conflicts: # static/locales/da.yaml
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
* development: Translated using Weblate (English (United Kingdom)) add beta to asset name (FreeTubeApp#7512) Translated using Weblate (Dutch) Translated using Weblate (Dutch) Fix builds failing due to broken Weblate keys (FreeTubeApp#7560) Translated using Weblate (Persian) Translated using Weblate (Welsh) Migrate FtListVideoLazy to the composition API (FreeTubeApp#7534) Bump electron-builder from 26.0.15 to 26.0.16 (FreeTubeApp#7539) Bump eslint-plugin-vue from 10.1.0 to 10.2.0 in the eslint group (FreeTubeApp#7537) Bump webpack-dev-server from 5.2.1 to 5.2.2 (FreeTubeApp#7538) Bump electron from 36.3.2 to 36.4.0 (FreeTubeApp#7540) Translated using Weblate (Hungarian) Migrate FtPlaylistAddVideoPrompt and FtPlaylistSelector to the composition API (FreeTubeApp#7511) Speed up the loading of the geolocation data (FreeTubeApp#7527) Remove unnecessary barrel file in store (FreeTubeApp#7522) Translated using Weblate (Bulgarian) # Conflicts: # static/locales/fa.yaml
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
Solved merge conflict again and made changes for #7366 (review) since it's not worth waiting weeks just a for a few changes to review this fully |
|
Tested a bit and realized that we should show the sort select when there are > 1 fetched entries (instead of shown=unwatched entries) |
|
@palharesf No continuation and dropdown still showing if only one video in the tab present |
|
@efb4f5ff-1298-471a-8973-3d47447115dc I still don't understand the issue with continuations. As per my comment here (#7366 (comment)), it seems to me the original array didn't check for continuation for deciding when to show the "Fetch More" button, so I kept the same logic for the computed array. If we want to change that logic I think it's fine, but it seems to me it's a different issue from hiding watched videos altogether. If I'm wrong, I'd appreciate understanding how, since from my current point of view that doesn't seem like an issue. I'm less stuck on code and more stuck on comprehension here. Regarding the dropdown, it's still visible when there's only one video being displayed on the channel because of the last change made by PikachuEXE (b232adf). I tested this just now and this is happening because the array responsible for displaying videos on the screen is filteredVideos, whereas the array responsible for displaying the Sort element is latestVideos. They don't match when we have the 'Hide Videos on Watch' setting enabled, so naturally you'll have situations like this one, where the size of the arrays differ and hence the logic doesn't work as intended. My proposed solution here is to revert and let filteredVideos command whether the Sort element would be displayed or not, but naturally I'd like @PikachuEXE two cents here since he's the one that changed this bit of logic and can show me the shortcomings of my suggestion. Apologies if it seemed I was MIA, but I honestly did not know you all were waiting on me for the pending changes and I already forgot most of what I worked on in this PR since I dove into it a while ago. |
… visible entries <= 1
|
Updated display logic for sort element again |
|
@palharesf thank you so much for you contribution and bearing with us. Normally merging a PR doesn't take this long. Let me know if you want to work on another issue and i can help you find one that fits your criteria |
|
@efb4f5ff-1298-471a-8973-3d47447115dc thank you all for the patience and bearing with someone doing their first ever contribution to an open source project, hopefully the first of many. I will accept your offer, so feel free to @ me in any other non-critical or time sensitive issues you feel I could contribute. Happy to continue contributing with the project! |


Issue 4497 - Hiding Watched Videos on Channel View
Pull Request Type
Related issue
Closes #4497
Description
The 'Hide Videos on Watch' setting has been moved from the 'Subscription' section to the 'Distraction Free' section. Now, it not only hides watched videos (and shorts and lives) from the subscription page, but also from the channel page (from the videos, shorts and lives tab, but not from the home tab).
Screenshots
Current implementation:



Proposed change (settings page):


Channel pages (untoggled):



Channel pages (toggled):



Tooltip:

Testing
(A)
(B)
Desktop
Windows 10 Pro
OS Build: 19045.5796
Freetube v0.23.4 Beta
Additional context