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

LB-1742 Notify user if they're adding a duplicate to a playlist #3166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fettuccinae
Copy link
Contributor

Problem

When a user adds a track which is already present in the playlist, there is no indication about it.
https://tickets.metabrainz.org/browse/LB-1742

Solution

Added logic to check if the track is already present in the playlist, and if it is then render DuplicateTrackModal.

@fettuccinae
Copy link
Contributor Author

Duplicate model UI
image

@mayhem mayhem requested review from anshg1214 and MonkeyDo February 10, 2025 11:56
Copy link
Member

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Looks good!

If you want to make all users happy, adding a "don't ask me again until I close this page" checkbox to the modal would ensure you don't make it miserable for creative users that want the same track 30 times in a playlist (not that I know anyone who would do that...).

Than you can save that boolean into the playlist page state, and skip the confirmation or not accordingly. Probably ideally passing the saved state back to the modal component to allow users to change their mind by unticking the checkbox.

Another option, different from the solution you opted for, would be to show a toast message instead of a modal.
So it would require no extra interaction to confirm anything, but would instead give you the option (in the toast message) to remove the duplicate entry.
Make that toast message not self-closing, and you've got another working solution.

I leave it as an exercise to the reader to figure out which one they would like more themselves.

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.

2 participants