Skip to content

Conversation

NishPatel101
Copy link

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Closes #7207

Description

Enhances the playlist progress bar to be clickable so users can select a video in their playlist without needing to scroll through the videos playlist.

  • Expands bar for visibility when hovering
  • Has the playlist in ticks, with each tick corresponding to a video index
  • Shows the video thumbnail and title for the currently hovered video

Screenshots

Before
Screenshot 2025-08-04 200110
After
demo_fix

Testing

  • View playlist with videos
  • Hover over playlist progress bar and view preview thumbnails/titles
  • Select video in playlist through progress bar
  • Ensure index numbering and progress fill match current video's rank in playlist

Desktop

  • OS: Windows
  • OS Version: 11, 24H2
  • FreeTube version: 0.23.5 Beta

Additional context

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 5, 2025 05:48
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 5, 2025
@PikachuEXE
Copy link
Collaborator

I think what #7207 describes is to scroll to the video in the view not start watching clicked video
Progress bar clicking especially with long playlists is very easy to misclick (especially on mobile/with touchscreen
Scrolling to specific video much safer action

@absidue absidue added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Aug 6, 2025
@kommunarr
Copy link
Collaborator

I think what #7207 describes is to scroll to the video in the view not start watching clicked video
Progress bar clicking especially with long playlists is very easy to misclick (especially on mobile/with touchscreen
Scrolling to specific video much safer action

@NishPatel101 Yes, to confirm, what @PikachuEXE is suggesting is my original proposal. You can probably do this through something like calling scrollIntoView() on the selected video element.

Copy link
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

* development: (84 commits)
  Translated using Weblate (Chinese (Traditional Han script))
  Show more information on long playlists. (FreeTubeApp#7804)
  Translated using Weblate (French)
  Refactor/cleanup tray related code after PR merged (FreeTubeApp#7856)
  Translated using Weblate (Estonian)
  Translated using Weblate (Italian)
  Translated using Weblate (Afrikaans)
  Translated using Weblate (Latvian)
  Translated using Weblate (Lithuanian)
  Translated using Weblate (Norwegian Nynorsk)
  Translated using Weblate (Galician)
  Translated using Weblate (Korean)
  Translated using Weblate (Slovenian)
  Translated using Weblate (Danish)
  Translated using Weblate (Kurdish)
  Translated using Weblate (Catalan)
  Translated using Weblate (Indonesian)
  Translated using Weblate (Greek)
  Translated using Weblate (Slovak)
  Translated using Weblate (Spanish (Mexico))
  ...
@PikachuEXE
Copy link
Collaborator

Updated the progress bar click to scroll to playlist item instead of start watching that video
Also updated thumbnail style to be slightly larger and has 4/3 ratio like width < 768px one
Screenshot 2025-08-25 at 13 31 16

if (this.backendPreference === 'invidious') {
baseUrl = this.currentInvidiousInstanceUrl
}
return `${baseUrl}/vi/${videoId}/mqdefault.jpg`
Copy link
Member

Choose a reason for hiding this comment

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

As the thumbnail preview is tiny, lets use a smaller image.

Suggested change
return `${baseUrl}/vi/${videoId}/mqdefault.jpg`
return `${baseUrl}/vi/${videoId}/default.jpg`

updateProgressBarPreview: function (event) {
if (!this.showProgressBarPreview) return

const rect = event.currentTarget.querySelector('.playlistProgressBar').getBoundingClientRect()
Copy link
Member

Choose a reason for hiding this comment

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

You could probably replace this querySelector call with a template ref.


if (targetArrayIndex >= 0 && targetArrayIndex < this.playlistItems.length) {
const container = this.$refs.playlistItems
const targetPlaylistItemEl = (this.$refs.playlistItem || [])[targetArrayIndex]
Copy link
Member

Choose a reason for hiding this comment

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

Vue does not guarantee that template ref arrays created by v-for are in the same order as the elements on the page for performance reasons, as it is a lot faster to insert new elements at the end of an array or leave them in their current positions when the elements on the page move, than maintaining the correct order. So this code would only work if nobody modifies the playlist sort order or the playlist iteself from another window while you are on the watch page in this window.

In the chapters component we solve this by adding template ref to the parent element and using the .children property on the parent element.

Comment on lines +109 to +110
border-inline-start: 6px solid transparent;
border-inline-end: 6px solid transparent;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
border-inline-start: 6px solid transparent;
border-inline-end: 6px solid transparent;
border-inline: 6px solid transparent;

border: 1px solid var(--primary-border-color);
border-radius: 8px;
padding-block: 8px;
padding-inline: 12px; /* remove? */
Copy link
Member

Choose a reason for hiding this comment

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

If this line needs to be removed, please remove the line otherwise remove the comment.

@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 Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Click on playlist progress bar to scroll to index
5 participants