[PR #13] [MERGED] Add show actions on item #1513

Closed
opened 2026-03-14 15:18:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/13
Author: @aome510
Created: 10/10/2021
Status: Merged
Merged: 10/11/2021
Merged by: @aome510

Base: masterHead: add-show-actions-on-item


📝 Commits (10+)

  • 0c06435 remove browse selected track's artist/album commands
  • b8d66da add ActionList popup state
  • 16bffb2 add ShowActionsOnSelectedItem and event/item.rs for handling commands on items
  • 6e13e4d add todo!() for PopupState::ActionList and reduce the refresh
  • 075f901 add command::Action represents an action on an item
  • 5d42100 refactor the list popup rendering codes and add rendering logic for ActionList popup
  • e168291 handle ShowActionsOnSelectedItem command for album,playlist,artist
  • 6bda474 fix clippy large enum variant error
  • 3a4addc move the action list event handler to a separate helper function
  • fabf255 add ShowActionsOnSelectedItem to README

📊 Changes

12 files changed (+615 additions, -354 deletions)

View changed files

📝 README.md (+38 -39)
📝 spotify_player/src/client.rs (+109 -35)
📝 spotify_player/src/command.rs (+12 -7)
📝 spotify_player/src/config/keymap.rs (+8 -16)
📝 spotify_player/src/event/mod.rs (+11 -3)
📝 spotify_player/src/event/popup.rs (+164 -18)
📝 spotify_player/src/event/window.rs (+88 -101)
📝 spotify_player/src/main.rs (+24 -5)
📝 spotify_player/src/state/player.rs (+57 -4)
📝 spotify_player/src/state/ui.rs (+13 -3)
📝 spotify_player/src/token.rs (+5 -1)
📝 spotify_player/src/ui/popup.rs (+86 -122)

📄 Description

Brief description of changes

  • add ShowActionsOnSelectedItem to show a popup containing of possible actions to act on a Spotify item (Track, Album, Artist, Album, Playlist)
  • add command::Action to represent an action to act on a Spotify item.
  • implement Spotify client handler functions for
    • get current user
    • adding track to a user's playlist
    • save a Spotify item to user's library.
  • update the authorization token's scopes to add user's library modify permissions
  • replace the use of playlist::SimplifiedPlaylist with state::Playlist
  • simplify the init codes to get Spotify data to run the application on startup.
  • remove BrowseSelectedTrack(Album|Artist) commands.
  • decrease the refresh duration for the player event handling thread.
  • small refactors, remove code duplications, etc

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/spotify-player/pull/13 **Author:** [@aome510](https://github.com/aome510) **Created:** 10/10/2021 **Status:** ✅ Merged **Merged:** 10/11/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `add-show-actions-on-item` --- ### 📝 Commits (10+) - [`0c06435`](https://github.com/aome510/spotify-player/commit/0c06435f14b9882def6b167bdb6050a5c33c6d82) remove browse selected track's artist/album commands - [`b8d66da`](https://github.com/aome510/spotify-player/commit/b8d66da33eb70f5736992b4e577e71e6370a1822) add `ActionList` popup state - [`16bffb2`](https://github.com/aome510/spotify-player/commit/16bffb23235ba5710cf2e9636cfd458a6a212cf9) add `ShowActionsOnSelectedItem` and `event/item.rs` for handling commands on items - [`6e13e4d`](https://github.com/aome510/spotify-player/commit/6e13e4d4e87fcf62ff5e3eaddc66d8509c3b8883) add `todo!()` for `PopupState::ActionList` and reduce the refresh - [`075f901`](https://github.com/aome510/spotify-player/commit/075f901061225d8516182703e6292689ff74339e) add `command::Action` represents an action on an item - [`5d42100`](https://github.com/aome510/spotify-player/commit/5d421003e4f8b3b6b943a83227b8cd8e9be33340) refactor the list popup rendering codes and add rendering logic for `ActionList` popup - [`e168291`](https://github.com/aome510/spotify-player/commit/e168291e0bf6e7553ce97612fbe23a6b80d270a3) handle `ShowActionsOnSelectedItem` command for album,playlist,artist - [`6bda474`](https://github.com/aome510/spotify-player/commit/6bda4745b70862fb0d3ceee19094d124c6895e16) fix clippy large enum variant error - [`3a4addc`](https://github.com/aome510/spotify-player/commit/3a4addcdcff1c2166ae8d96d331bc56b43fb6977) move the action list event handler to a separate helper function - [`fabf255`](https://github.com/aome510/spotify-player/commit/fabf255bf3cb17dbe5229bb677378d2f406d64e2) add `ShowActionsOnSelectedItem` to `README` ### 📊 Changes **12 files changed** (+615 additions, -354 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+38 -39) 📝 `spotify_player/src/client.rs` (+109 -35) 📝 `spotify_player/src/command.rs` (+12 -7) 📝 `spotify_player/src/config/keymap.rs` (+8 -16) 📝 `spotify_player/src/event/mod.rs` (+11 -3) 📝 `spotify_player/src/event/popup.rs` (+164 -18) 📝 `spotify_player/src/event/window.rs` (+88 -101) 📝 `spotify_player/src/main.rs` (+24 -5) 📝 `spotify_player/src/state/player.rs` (+57 -4) 📝 `spotify_player/src/state/ui.rs` (+13 -3) 📝 `spotify_player/src/token.rs` (+5 -1) 📝 `spotify_player/src/ui/popup.rs` (+86 -122) </details> ### 📄 Description ## Brief description of changes - add `ShowActionsOnSelectedItem` to show a popup containing of possible actions to act on a Spotify item (Track, Album, Artist, Album, Playlist) - add `command::Action` to represent an action to act on a Spotify item. - implement Spotify client handler functions for - get current user - adding track to a user's playlist - save a Spotify item to user's library. - update the authorization token's scopes to add user's library modify permissions - replace the use of `playlist::SimplifiedPlaylist` with `state::Playlist` - simplify the init codes to get Spotify data to run the application on startup. - remove `BrowseSelectedTrack(Album|Artist)` commands. - decrease the refresh duration for the player event handling thread. - small refactors, remove code duplications, etc --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 15:18:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-player#1513
No description provided.