[PR #419] [MERGED] Refactor ui and event modules #1696

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

📋 Pull Request Information

Original PR: https://github.com/aome510/spotify-player/pull/419
Author: @aome510
Created: 4/21/2024
Status: Merged
Merged: 4/21/2024
Merged by: @aome510

Base: masterHead: misc-refactor


📝 Commits (9)

  • c027ccf update command description for OpenCommandHelp and Queue
  • 60ffaf4 refactor page event handling codes, add handlers for queue and popup pages
  • 89551f4 move Queue, CommandHelp from PopupState to PageState
  • fd08c67 update event handling codes
  • e4a907f update UI rendering codes
  • 6fd0e5b lock UIState only once when handling terminal key event
  • bbb2942 add command handle function for playlist track table
  • 13658a3 construct track table's playback on premise
  • e49f236 cleanup codes in UI module

📊 Changes

15 files changed (+599 additions, -748 deletions)

View changed files

📝 README.md (+3 -3)
📝 spotify_player/src/command.rs (+2 -2)
📝 spotify_player/src/event/mod.rs (+25 -36)
📝 spotify_player/src/event/page.rs (+80 -56)
📝 spotify_player/src/event/popup.rs (+74 -196)
📝 spotify_player/src/event/window.rs (+127 -129)
📝 spotify_player/src/state/data.rs (+5 -4)
📝 spotify_player/src/state/ui/mod.rs (+1 -3)
📝 spotify_player/src/state/ui/page.rs (+12 -0)
📝 spotify_player/src/state/ui/popup.rs (+2 -14)
📝 spotify_player/src/ui/mod.rs (+13 -20)
📝 spotify_player/src/ui/page.rs (+230 -79)
📝 spotify_player/src/ui/playback.rs (+19 -21)
📝 spotify_player/src/ui/popup.rs (+3 -171)
📝 spotify_player/src/ui/utils.rs (+3 -14)

📄 Description

Breaking changes

  • OpenCommandHelp and Queue commands were updated to go to a new page instead of opening a popup

Changes

This PR refactors ui and event modules, which involves

  • update comment and documentation styles for consistency
  • simplify codes, reduce duplications and complexity

🔄 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/419 **Author:** [@aome510](https://github.com/aome510) **Created:** 4/21/2024 **Status:** ✅ Merged **Merged:** 4/21/2024 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `master` ← **Head:** `misc-refactor` --- ### 📝 Commits (9) - [`c027ccf`](https://github.com/aome510/spotify-player/commit/c027ccf618e6bc1101a31074ef4f4df3c37efade) update command description for `OpenCommandHelp` and `Queue` - [`60ffaf4`](https://github.com/aome510/spotify-player/commit/60ffaf4f0bea7767e51e4fdbe44078a0631f6250) refactor page event handling codes, add handlers for queue and popup pages - [`89551f4`](https://github.com/aome510/spotify-player/commit/89551f4f610a22f7a8af77ec9222b82dfe303f74) move `Queue`, `CommandHelp` from `PopupState` to `PageState` - [`fd08c67`](https://github.com/aome510/spotify-player/commit/fd08c6733a7bfb942bda75fbf55e6342e5dbbd16) update event handling codes - [`e4a907f`](https://github.com/aome510/spotify-player/commit/e4a907fcedbf7260d0173518ac20a997263bb8ec) update UI rendering codes - [`6fd0e5b`](https://github.com/aome510/spotify-player/commit/6fd0e5bcabbc340438df220372af4dbda72f6bd2) lock `UIState` only once when handling terminal key event - [`bbb2942`](https://github.com/aome510/spotify-player/commit/bbb2942bcbddcdf611507b96a33787daae5184ec) add command handle function for playlist track table - [`13658a3`](https://github.com/aome510/spotify-player/commit/13658a329ab1bfb691b386d0d421ba845f67bbb3) construct track table's playback on premise - [`e49f236`](https://github.com/aome510/spotify-player/commit/e49f236f861702855fea354317b9fb9c31b77b0e) cleanup codes in UI module ### 📊 Changes **15 files changed** (+599 additions, -748 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+3 -3) 📝 `spotify_player/src/command.rs` (+2 -2) 📝 `spotify_player/src/event/mod.rs` (+25 -36) 📝 `spotify_player/src/event/page.rs` (+80 -56) 📝 `spotify_player/src/event/popup.rs` (+74 -196) 📝 `spotify_player/src/event/window.rs` (+127 -129) 📝 `spotify_player/src/state/data.rs` (+5 -4) 📝 `spotify_player/src/state/ui/mod.rs` (+1 -3) 📝 `spotify_player/src/state/ui/page.rs` (+12 -0) 📝 `spotify_player/src/state/ui/popup.rs` (+2 -14) 📝 `spotify_player/src/ui/mod.rs` (+13 -20) 📝 `spotify_player/src/ui/page.rs` (+230 -79) 📝 `spotify_player/src/ui/playback.rs` (+19 -21) 📝 `spotify_player/src/ui/popup.rs` (+3 -171) 📝 `spotify_player/src/ui/utils.rs` (+3 -14) </details> ### 📄 Description ## Breaking changes - `OpenCommandHelp` and `Queue` commands were updated to **go to a new page** instead of **opening a popup** ## Changes This PR refactors `ui` and `event` modules, which involves + update comment and documentation styles for consistency + simplify codes, reduce duplications and complexity --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 15:28:01 +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#1696
No description provided.