-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Feat clickable playlist progress bar #7782
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
base: development
Are you sure you want to change the base?
Feat clickable playlist progress bar #7782
Conversation
I think what #7207 describes is to scroll to the video in the view not start watching clicked video |
@NishPatel101 Yes, to confirm, what @PikachuEXE is suggesting is my original proposal. You can probably do this through something like calling |
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)) ...
…e small width one
if (this.backendPreference === 'invidious') { | ||
baseUrl = this.currentInvidiousInstanceUrl | ||
} | ||
return `${baseUrl}/vi/${videoId}/mqdefault.jpg` |
There was a problem hiding this comment.
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.
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() |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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.
border-inline-start: 6px solid transparent; | ||
border-inline-end: 6px solid transparent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? */ |
There was a problem hiding this comment.
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.
Pull Request Type
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.
Screenshots
Testing
Desktop
Additional context