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

Add Unlisted badge on watch page for unlisted videos #5856

Merged

Conversation

OothecaPickle
Copy link
Contributor

@OothecaPickle OothecaPickle commented Oct 12, 2024

Add Unlisted badge on watch page for unlisted videos

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #1475

Description

This adds a badge if the currently playing video is unlisted.

Screenshots

Before:
wo-unlisted-badge
After:
w-unlisted-badge

Testing

Tested with both Local and Invidious APIs

Desktop

  • OS: macOS
  • OS Version: 10.15.7
  • FreeTube version: 0.21.3

Additional context

Unlisted videos for testing can be found at https://unlistedvideos.com/

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 12, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 12, 2024 21:05
@OothecaPickle OothecaPickle changed the title Add Unlisted badge for unlisted videos Add Unlisted badge on watch page for unlisted videos Oct 12, 2024
@OothecaPickle
Copy link
Contributor Author

I'd appreciate any input on adding an unlisted badge in the form of a videoTag class for videos in playlists and watch history as well

Copy link
Member

@absidue absidue left a comment

Choose a reason for hiding this comment

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

In addition to my other review comments, I also noticed that you only added the functionality to the local API and as the pull request description doesn't provide any information on why you didn't implement it for the Invidious API, I am assuming you forgot to implement it and didn't test both APIs. Please implement it for the Invidious API too.

@absidue
Copy link
Member

absidue commented Oct 12, 2024

I'd appreciate any input on adding an unlisted badge in the form of a videoTag class for videos in playlists and watch history as well

That information isn't available there, so you would first have to add logic to save that information when a video is watched or added to a playlist (keep in mind that if someone adds the video to a playlist or marks it as watched from anywhere other than the watch page for that specific video, the information will be unavailable too) before you could show a badge and even then it would only apply to videos added after your changes.

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Oct 12, 2024
auto-merge was automatically disabled October 13, 2024 00:03

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 13, 2024 00:03
auto-merge was automatically disabled October 13, 2024 01:22

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 13, 2024 01:23
@OothecaPickle
Copy link
Contributor Author

@absidue I've removed the hardcoded color and font values and implemented the functionality for the Invidious API

@ChunkyProgrammer ChunkyProgrammer added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: changes requested labels Oct 13, 2024
auto-merge was automatically disabled October 13, 2024 02:50

Head branch was pushed to by a user without write access

@OothecaPickle OothecaPickle force-pushed the feature/unlisted-indicator branch from b48db0d to 66888bf Compare October 13, 2024 02:50
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 13, 2024 02:50
@OothecaPickle OothecaPickle requested a review from absidue October 14, 2024 21:22
@PikachuEXE
Copy link
Collaborator

My IV instance only says content unavailable for unlisted videos
Need an instance that works to test IV API

@OothecaPickle
Copy link
Contributor Author

OothecaPickle commented Oct 14, 2024

My IV instance only says content unavailable for unlisted videos Need an instance that works to test IV API

@PikachuEXE https://yt.drgnz.club/ works for me, but Invidious instances have always worked unreliably for me in FreeTube; I often have to reload the video a bunch of times for it to play

@PikachuEXE
Copy link
Collaborator

Thanks, turns out the instance I use got strange issue and report content unavailable for all videos not just unlisted

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

Size unit acceptable?

Comment on lines 31 to 32
font-size: 0.8rem;
line-height: 0.5rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if we want to use rem as unit (for other devs)

auto-merge was automatically disabled October 15, 2024 05:18

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 15, 2024 05:18
auto-merge was automatically disabled October 16, 2024 03:24

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 16, 2024 03:24
auto-merge was automatically disabled October 16, 2024 03:25

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 16, 2024 03:25
use pixels instead of rems for font-size
remove line-height
use non-fractional font-size value
add vertical padding
auto-merge was automatically disabled October 16, 2024 03:42

Head branch was pushed to by a user without write access

@OothecaPickle OothecaPickle force-pushed the feature/unlisted-indicator branch from 769e6b8 to 95fd51d Compare October 16, 2024 03:42
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) October 16, 2024 03:43
@absidue absidue added the DO NOT MERGE UNTIL AFTER RELEASE Do not merge before the next release as this is not a bug fix label Oct 16, 2024
@ChunkyProgrammer ChunkyProgrammer removed the DO NOT MERGE UNTIL AFTER RELEASE Do not merge before the next release as this is not a bug fix label Oct 27, 2024
@FreeTubeBot FreeTubeBot merged commit 0d836ab into FreeTubeApp:development Oct 27, 2024
6 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 27, 2024
Soham456 pushed a commit to Soham456/FreeTube that referenced this pull request Dec 5, 2024
* Add badge to watch page indicating whether video is unlisted (FreeTubeApp#1475)

* minor updates to unlistedBadge CSS

use pixels instead of rems for font-size
remove line-height
use non-fractional font-size value
add vertical padding
SuperAKWA pushed a commit to SuperAKWA/FreeTube that referenced this pull request Jan 24, 2025
* Add badge to watch page indicating whether video is unlisted (FreeTubeApp#1475)

* minor updates to unlistedBadge CSS

use pixels instead of rems for font-size
remove line-height
use non-fractional font-size value
add vertical padding
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.

[Feature Request] Indicate if video is unlisted
6 participants