nick42d / youtui

TUI and API for YouTube Music written in Rust
MIT License
46 stars 4 forks source link

RFE: Make the line cursor in playlist move as playlist progresses #142

Closed rkratky closed 3 months ago

rkratky commented 3 months ago

It'd be nice to have the cursor move along the playlist during playback, i.e. to have the cursor always on the track/line that's currently playing.

nick42d commented 3 months ago

Hi there, I'm not too keen to take control of the cursor and move it to the currently playing track, as clashes with the mechanic to select and play/delete tracks in the playlist. Is the reason this would be useful to give you a better visual indicator of which track is now playing?

rkratky commented 3 months ago

clashes with the mechanic to select and play/delete tracks in the playlist

I see. Then perhaps there could a new element that would just denote the currently playing track while the cursor would be unaffected and stay for the user to move around? Perhaps a diff. background color and the ⯈ symbol to the left of the currently playing track?

Is the reason this would be useful to give you a better visual indicator of which track is now playing?

Yes; it seems it's the default UI behavior in apps that use some form of a playlist (some indicator of where you are in the playlist). Not seeing it is counterintuitive for me.

nick42d commented 3 months ago

clashes with the mechanic to select and play/delete tracks in the playlist

I see. Then perhaps there could a new element that would just denote the currently playing track while the cursor would be unaffected and stay for the user to move around? Perhaps a diff. background color and the ⯈ symbol to the left of the currently playing track?

Is the reason this would be useful to give you a better visual indicator of which track is now playing?

Yes; it seems it's the default UI behavior in apps that use some form of a playlist (some indicator of where you are in the playlist). Not seeing it is counterintuitive for me.

Sounds good. Let me come up with a design for this.

nick42d commented 3 months ago

@rkratky keen to get your thoughts on the below ideas or a combination;

Marker replacing playlist track number (if I used the playing icon I'd also want it to change between playing and paused state which is a little more effort, and it clashes a little with buffering state). image

Bolden/italicise playing track (I quite like this but it's a little hard to see) image

Change BG color: image

Change FG color: image

rkratky commented 3 months ago

@rkratky keen to get your thoughts on the below ideas or a combination;

Marker replacing playlist track number

I like this a lot, esp. if the paused state would be also indicated.

Bolden/italicise playing track (I quite like this but it's a little hard to see)

This depends on having a terminal that supports bold/italic chars (and having it configured to use a font that has them), so I don't it should be the first option.

Change BG color:

I thought I'd like this the most, but it's actually confusing (which is which). I think it would only work if the secondary bg color was much more subtle (e.g. a few shades lighter/darker than the terminal bg color).

Change FG color:

This works the best, I think. Ideally in combination with option no. 1 -- but if that would be too difficult, this is enough.

nick42d commented 3 months ago

Implemented in #156. I went with the playing/paused icons and the bold/italic chars - wasn't a big fan of the different coloration. In future I'd like to make this themable, so that a user that would prefer colours over the bold/italic could set this in their theme.

rkratky commented 3 months ago

Thank you!

Would it be possible to have the same indication also in the Browser view? Of course, provided that what's being played is actually still visible in the Browser.

nick42d commented 3 months ago

Thank you!

Would it be possible to have the same indication also in the Browser view? Of course, provided that what's being played is actually still visible in the Browser.

This would require quite a large change, since currently the Browser rendering function can't access the Playlist state to know what track is playing. I think that I need to implement other search types first and then I can come to revisit this; feel like the solution is related.