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

Customise swipe actions #4858

Merged
merged 22 commits into from
Dec 19, 2024
Merged

Conversation

Abhinavreddy-B
Copy link

@Abhinavreddy-B Abhinavreddy-B commented Dec 9, 2024

Issue #4849

@Abhinavreddy-B Abhinavreddy-B marked this pull request as draft December 9, 2024 07:02
@Abhinavreddy-B Abhinavreddy-B marked this pull request as ready for review December 9, 2024 09:36
@Abhinavreddy-B
Copy link
Author

I need suggestions on what icon can we put for No Action.

@aneesh1122
Copy link

Have you implemented it only for queue?

Also, there are different pages like local playlists, online playlists, albums, songs tab.

I've set the right swipe to play next everywhere and for local playlists and queue left swipe deletes the songs and where ever it's not possible to delete the song it unlikes the song(like albums, online playlists)

Would be nice if there were separate options for

1)Right swipe(local playlists and queue) :-
Can add delete here

2)Right swipe(everywhere else) :-
Can't add delete here

3)Left swipe(local playlists and queue)
Can add delete here

4)Left swipe(everywhere else)
Can't add delete here

I know it's too much hard work that's why I didn't add these options and went with what most people would use for swipe.

@fast4x
Copy link
Owner

fast4x commented Dec 9, 2024

I think that customized actions in swipeable content must be not specific for queue but also for others swipeable content component.
I think also that isn't a priority... :)

@Abhinavreddy-B
Copy link
Author

Abhinavreddy-B commented Dec 10, 2024

I think that customized actions in swipeable content must be not specific for queue but also for others swipeable content component. I think also that isn't a priority... :)

As aneesh said, we can't generalise same options to everything. So will have to put seperate options for albums, online playlists etc.

Also for albums and online playlists, there are very few actions possible. Actions like add to playlist, listen on, etc will take a lot of refactoring of the pop-up menu.

Atleast for now, having this option for queue and local playlist will avoid accidental deletes if user sets left swipe to none

@fast4x
Copy link
Owner

fast4x commented Dec 10, 2024

Yes I agree, for now let's not do refactoring, too dangerous. I would tie the swipe in the queue to the lock, when the lock is open the swipe works.

@aneesh1122
Copy link

Could you please add 'Like' as one of the options?

@Abhinavreddy-B
Copy link
Author

Could you please add 'Like' as one of the options?

will add it. also let me do the same for Album item and Online playlist item, and anywhere else too. will be drafting this PR

@Abhinavreddy-B Abhinavreddy-B marked this pull request as draft December 12, 2024 10:13
@fast4x
Copy link
Owner

fast4x commented Dec 12, 2024

At this point I would say to add it, maybe this merge we will do after the release. I recommend not to "rewrite the wheel", only essential changes no code re-engineering.

@Abhinavreddy-B
Copy link
Author

Abhinavreddy-B commented Dec 15, 2024

These are the final options i am thinking of:

For Queue and Local playlist:

  1. NoAction,
  2. PlayNext,
  3. Download,
  4. Favourite,
  5. RemoveFromQueue

For Online playlists, albums, individual songs:

  1. NoAction
  2. PlayNext
  3. Download
  4. Favourite
  5. Enqueue

For Album (when searching ig):

  1. NoAction
  2. PlayNext
  3. Bookmark
  4. Enqueue

do tell me if I am missing anything.

@aneesh1122 @fast4x

@aneesh1122
Copy link

I think it's perfect but since you are adding enqueue as an option, for the consistency sake can you add enqueue option also to local playlists options?

@Abhinavreddy-B
Copy link
Author

I think it's perfect but since you are adding enqueue as an option, for the consistency sake can you add enqueue option also to local playlists options?

I thought of it, but the problem is same component is being used for queue and for local playlist. so adding that option only for local playlist will have to split into 2 components, and also add 2 new settings for customizing them.

@Abhinavreddy-B
Copy link
Author

Or maybe we can use the 2nd component for local playlist also. in that case delete option wont be there for local playlist. Only Queue will have delete action.

if that is fine, I can do that

@fast4x
Copy link
Owner

fast4x commented Dec 15, 2024

Use two components, it's better in debug...

@aneesh1122
Copy link

aneesh1122 commented Dec 15, 2024

Or maybe we can use the 2nd component for local playlist also. in that case delete option wont be there for local playlist. Only Queue will have delete action.

if that is fine, I can do that

When I asked about adding it in local playlists I included the queue too since both of them are using the same component.

If you add enqueue to local playlists the queue will end up having that too. Right now the queue doesn't have the 'enqueue' option in the long tap bottom sheet but I can see enqueue as an option for the queue too. It's not important though so leave it for now.

Please go ahead with your plans.

@aneesh1122
Copy link

Use two components, it's better in debug...

You mean total 2 components? It won't be possible man.

Albums have entirely different actions so it needs a component of its own.

If you mean different components for queue and local playlists then I don't think it's worth it. Either add enqueue option to the component which is used by both local playlists and queue so that both of them end up having the enqueue option or just drop the idea and let him continue with his plan.

@Abhinavreddy-B
Copy link
Author

If you add enqueue to local playlists the queue will end up having that too. Right now the queue doesn't have the 'enqueue' option in the long tap bottom sheet but I can see enqueue as an option for the queue too. It's not important though so leave it for now.

enqueue option in queue sounds a bit weird, but ya people can use it to enqueue already played songs from the queue. that sounds fine for me.
Will add enqueue option for Queue and local playlists as well

@Abhinavreddy-B
Copy link
Author

Use two components, it's better in debug...

I agree with aneesh, its not worth it to just have 2 separate components with almost same functionality. this will require separate settings option for each, separate enums, separate preference keys.
For now I will just add enqueue for both and use the same for both. in case really there is a need for separation in future, we can do it at that time.

@fast4x
Copy link
Owner

fast4x commented Dec 15, 2024

If only enqueue is valid for both, ok

@Abhinavreddy-B Abhinavreddy-B marked this pull request as ready for review December 19, 2024 05:34
@Abhinavreddy-B
Copy link
Author

Wanted a suggestion on the setting entry for 2nd category, (i.e everything except queue and local playlist)

currently it is named as playlist swipe action, but it is not just for playlist, it for for anywhere a list of songs appear, like in album, search results, artist page, playlist, podcast, etc. so we need a better name

@Abhinavreddy-B
Copy link
Author

Also there is some issue with enqueue icon, it is appearing too big. i couldn't debug why it happens. any idea?

@aneesh1122
Copy link

everything except queue and local playlist

This will do. Just use this

And try to add 'all' padding to decrease the icon's size.

@fast4x fast4x merged commit f46bf58 into fast4x:master Dec 19, 2024
@twistios
Copy link

"PlayNext" for Queue at least makes sense I think because it reorders the queue s.t. the song is played next.

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.

4 participants