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

[Feature]: Ability to further customize layout #535

Open
NickTheWilder opened this issue Aug 7, 2024 · 6 comments
Open

[Feature]: Ability to further customize layout #535

NickTheWilder opened this issue Aug 7, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@NickTheWilder
Copy link

NickTheWilder commented Aug 7, 2024

Describe the solution you'd like
I personally never use Albums & Artists in Spotify, only playlist to sort songs. It would be nice to be able to

  1. Remove columns
  2. Add different columns to replace them (seems more complicated but a nice to have)

Describe alternatives you've considered
Adjusting the layout of playlists/albums in the config to potentially hide the columns

ℹ️ FWIW the layout settings don't work for me, Win11 - PowerShell v7.4.4 - scoop v0.19.1
Current settings:

# omitted other settings above
[layout]
library = { playlist_percent = 75, album_percent = 12 }
playback_window_position = "Top"

Additional context
I'd start working on this if I had experience with Rust and open a PR but no experience here. Really enjoy what's going on so far.

Example to further describe what I'm talking about

Current view:
image

Proposed view: (or smth similar)
image

@NickTheWilder NickTheWilder added the enhancement New feature or request label Aug 7, 2024
@apprehensions
Copy link
Contributor

Would love to see this, it bridges the gap between the official spotify client and the better TUI counterpart.

@DOD-101
Copy link
Contributor

DOD-101 commented Aug 13, 2024

I'm looking into implementing this.

FWIW the layout settings don't work for me, Win11 - PowerShell v7.4.4 - scoop v0.19.1

That's strange. Are you on the latest git?

@arvvnd
Copy link

arvvnd commented Aug 14, 2024

The playback settings don't seem to work for me either, but in my case I tried to change the playback_window_position = Bottom.
I run kitty on arch and I'm using the AUR package spotify-player-full-pipe.

inside my app.toml :

[layout]
library = { playlist_percent = 40, album_percent = 40 }
playback_window_position = "Bottom"
#playback_position = "Bottom"
playback_window_height = 6
#playback_window_height = 12

I launch spotify-player in kitty using the command spotify_player and connect to my own client ID. I am able to edit other settings on the app.toml file like theme, icons, etc., and observe these changes. However, when I edit the [layout] settings, nothing changes. I even changed playback_window_height from its default value of 6 to 12 to see if the [layout] settings would take effect, but the playback window size remained the same. After making changes to app.toml, I save the file, restart kitty, and open the player with the spotify_player command to check for changes.

I can open a separate issue if needed. I'm adding a comment here since the OP of this issue also mentions that their layout settings are not working. Also, I am not completely sure if it's a fault on my end or an actual bug. I can provide my entire app.toml file if anyone wants to review it!

@DOD-101
Copy link
Contributor

DOD-101 commented Aug 14, 2024

This Issue primarily focuses on implementing the requested feature. So there should be a separate issue if there are any bugs with the existing code.

That being said, it sounds like this isn't an actual bug in the code, at least in your case @arvvnd.
The problem is that spotify-player-full-pipe is built off of the latest stable release, and the changes to the layout config haven't yet been released. They are only available if you build from source on the master branch.

@arvvnd
Copy link

arvvnd commented Aug 14, 2024

Thanks for the clarification @DOD-101 I guess it was indeed an error on my part. I prefer to install packages wherever possible and the playback window positioning is only a QoL upgrade(for me). I'm okay with waiting for the layout config update to spotify-player-full-pipe.

DOD-101 added a commit to DOD-101/spotify-player that referenced this issue Aug 14, 2024
This addresses the first request in aome510#535. The change is mainly in
adjusting how the borders are drawn.
@aome510
Copy link
Owner

aome510 commented Aug 17, 2024

The library page in the official Spotify shows a side bar listing all playlists, albums, etc and a main window to display the selected item.

My idea to implement this feature for spotify_player is to add a "preview" window to the library page which renders a context window for the selected item. There are a few things to be considered:

  • this preview window should be configurable and opt-in/opt-out.
  • this preview window can be rendered vertically or horizontally w.r.t the main library page. For example, in the official app, the main display window is rendered horizontally.
  • should this window be not focusable (preview only)? In other words, user will need to ChooseSelected to go into the corresponding page
  • how to re-use codes in render_context_page to render the preview window?
    pub fn render_context_page(
  • how to handle long playlists, i.e. should it just load the first page of the playlist? Currently, the client does load all the pages of a playlist to render a playlist page (also true for artists, albums, etc). However, loading all data is not ideal for preview because it's slow.

This seems to be a complicated yet interesting feature to add into spotify_player. That said, I'll not work on this cause I don't really need one, but anyone feels free to pick it up. I'll try to assist as much as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants