Skip to content
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

Fix hide/show channel in ft-list-video #5149

Merged
merged 2 commits into from
May 23, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented May 21, 2024

Fix hide/show channel in ft-list-video

Pull Request Type

  • Bugfix

Related issue

Description

The ft-list-video component was never updated to the new (well not very new anymore) structure of the hidden channels. This pull request corrects that so that it now works as expected.

Testing

(Adapted from the bug reproduction steps in the linked issue)

  1. Hover over a video thumbnail
  2. Click on the kebab menu
  3. Click on Hide Channel
  4. Go to Distraction Free Settings -> Hide Videos From Channels to verify the channel is listed
  5. Repeat step 1 and 2
  6. Check that it says Hide Channel

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.20.0

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label May 21, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 21, 2024 21:19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works like intended but this PR does remove the channel icon in the blocklist

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels May 21, 2024
@absidue
Copy link
Member Author

absidue commented May 21, 2024

It doesn't remove it per se, the distraction free settings just no longer fetches it for some reason, when the channel is hidden through the dropdown. I need to figure out why.

@absidue absidue added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels May 22, 2024
@absidue
Copy link
Member Author

absidue commented May 22, 2024

Fixed it. Turns out it was two issues, firstly it was only fetching the thumbnail if the channel name wasn't set, so I've made it check if the thumbnail URL is missing too and secondly it was randomly failing because it wasn't parsing the channel header correctly.

@PikachuEXE
Copy link
Collaborator

For Testing section (6) do you mean Show channel?

I also tested show channel item actually removes channel from Distraction Free Settings -> Hide Videos From Channels

kommunarr
kommunarr previously approved these changes May 23, 2024
Copy link
Collaborator

@kommunarr kommunarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Unrelated issue(?): hiding a channel in recommended videos does not cause the videos from those channels to be hidden automatically; you have to change routes for it to take effect

@kommunarr
Copy link
Collaborator

Don't code at night (I pushed to the wrong branch because I mistyped my checkout)

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented May 23, 2024

For Testing section (6) do you mean Show channel?

@PikachuEXE Yes

@FreeTubeBot FreeTubeBot merged commit ad981b3 into FreeTubeApp:development May 23, 2024
9 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label May 23, 2024
@absidue absidue deleted the fix-hide-channel branch May 23, 2024 06:39
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request May 26, 2024
* development:
  Fix channel sort values to show the values they are (FreeTubeApp#5162)
  Translated using Weblate (Russian)
  Translated using Weblate (French)
  Quick bookmark button RTL & hover fixes (FreeTubeApp#5157)
  Use addVideo instead of addVideos for quick bookmark button (FreeTubeApp#5168)
  Cache quick bookmark playlist to reduce the amount of lookups (FreeTubeApp#5169)
  Translated using Weblate (Arabic)
  Translated using Weblate (Indonesian)
  Fix hide/show channel in ft-list-video (FreeTubeApp#5149)

# Conflicts:
#	src/renderer/components/ft-list-video/ft-list-video.js
#	src/renderer/components/watch-video-info/watch-video-info.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Users can be hide a channel mutiple times
5 participants