mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 17:35:50 +03:00
[PR #31] [MERGED] Rewrite UI codes #1524
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1524
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/aome510/spotify-player/pull/31
Author: @aome510
Created: 2/26/2022
Status: ✅ Merged
Merged: 2/27/2022
Merged by: @aome510
Base:
master← Head:rewrite-UI-codes📝 Commits (10+)
4ee5fc7improve documentation for UI state structs/functionsf10a770renamePageState::SearchingtoPageState::Search, wip remove window state1665dcbupdate the ui states as-inui/mod.rse48dc74add page ui state struct/enum for each page982fb1dwip refactor, render only search page6adad74wip, rewrite UI states8efb7cerender the library page1e002e1add back event global handler4099e25request data for library page on startup27ddc66add back event handler for library page📊 Changes
18 files changed (+1525 additions, -1612 deletions)
View changed files
📝
spotify_player/src/client/handlers.rs(+41 -6)📝
spotify_player/src/client/mod.rs(+11 -19)📝
spotify_player/src/event/mod.rs(+38 -46)➕
spotify_player/src/event/page.rs(+286 -0)📝
spotify_player/src/event/popup.rs(+133 -154)📝
spotify_player/src/event/window.rs(+74 -392)📝
spotify_player/src/main.rs(+10 -2)📝
spotify_player/src/state/data.rs(+2 -2)📝
spotify_player/src/state/mod.rs(+0 -22)📝
spotify_player/src/state/model.rs(+1 -2)➖
spotify_player/src/state/ui.rs(+0 -395)➕
spotify_player/src/state/ui/mod.rs(+84 -0)➕
spotify_player/src/state/ui/page.rs(+338 -0)➕
spotify_player/src/state/ui/popup.rs(+68 -0)➖
spotify_player/src/ui/help.rs(+0 -125)📝
spotify_player/src/ui/mod.rs(+92 -187)📝
spotify_player/src/ui/page.rs(+210 -231)📝
spotify_player/src/ui/popup.rs(+137 -29)📄 Description
Brief description of changes
state::ui::WindowStateand made it a component ofstate::ui::PageStatestate::uimodule (initially a single file) into multiple smaller modules (page,popup)event::pagemodule for handling page-scale events, madeevent::windowfor handling window-scale eventsclient::handlers::start_player_event_watchersui::helpmodule and moved its help render functions toui::popupmoduleui::windowmodule toui::pagemoduleCaches::recommendationstoCaches::tracksto make it more reusabledrop(ui)and redundant UI state locking🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.