Make adding duplicate disabled by default
Pull Request Type
- [ ] Bugfix
- [x] Feature Implementation
- [ ] Documentation
- [ ] Other
Related issue
Closes https://github.com/FreeTubeApp/FreeTube/pull/4818
Description
Disable adding duplicate videos to playlists by default (cannot select playlists with all to be added videos already present) Can be enabled via new toggle only visible on prompt when any duplicate detected
Screenshots
Nothing changed for video when absent in all playlists, only screenshots of adding video(s) with some/all already present in playlists
Adding single video
Adding multiple videos (duplicate disallowed)
Adding multiple videos (duplicate allowed)
Testing
(A) Add one video (A1) Video absent from all playlists (A2) Video present in some playlists (B) Add multiple videos (B1) Videos absent from all playlists (B2) Some but not all videos present in some playlists (B3) All videos present in some playlists
Desktop
- OS:
- OS Version:
- FreeTube version:
Additional context
Style/UI/Text not finalized
Yeah not sure about the placement of that. The Add to Playlist prompt is already very overcrowded as is. Also still not sure if we should go this way at all
The idea is that user need to be able to enable the option before potentially tabbing into the playlists so they can select the potentially disabled playlist(s) instead of finding out playlists disabled and go back to enable it
No idea where to place it best
Could you justify the three controls at the top all next to each other on the right? It's not a perfect solution for now, but we can reassess in the future.
Here is my imagined flow:
- Enter query text
- Optionally search for playlists with matching video title instead of just matching playlist names
- Optionally realize that it's already added but want to add duplicate anyway
- Sort it when playlist cannot be found
Ideally it should be (4) then (3) but it might look strange if there is an extra row just for one toggle on desktop
Sorry, to clarify, I mean right-justify the controls so they're grouped
Like this?
Only thing im missing tbh is a remove duplicates button within a playlist. Make it only appear when we know there are duplicates in the playlists other wise do not show it
Preventing duplicates to be added and removing duplicates are different features IMO I will open another PR for that
I agree left align look more natural / consistent with existing design in FT & in other places
Especially the Playlist with Matching Videos is meant to be grouped with search input above
Question is do you want it to look like OP screenshots or
Hiding my code here since not committed yet
.optionsRow {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
align-items: center;
}
.tightOptions {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(100px, max-content));
column-gap: 16px;
align-items: center;
}
@media only screen and (width <= 800px) {
.optionsRow {
/* Switch to rows from columns */
grid-template-columns: auto;
grid-template-rows: repeat(auto-fit, auto);
align-items: stretch;
}
.tightOptions {
/* Switch to rows from columns */
grid-template-columns: auto;
grid-template-rows: repeat(auto-fit, auto);
align-items: stretch;
}
}
I prefer the screenshots in your recent comment
I'd prefer if we move the sort box over to the left as well if we do that, because I don't like the cognitive aspect of the UX of requiring the user's eyes to dart to parse the meaning, but again, not a blocking issue, and does not matter much if we're going to pursue more expansive changes to the modal in the future
Putting sort box in the right is existing design in FT and I consider that as a separate issue which should not be the concern of this PR
Putting sort box in the right is existing design in FT and I consider that as a separate issue which should not be the concern of this PR
I agree.