-
Notifications
You must be signed in to change notification settings - Fork 127
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
Adds a status page to Library and Playlists pages. #315
Conversation
Here's how it looks as of f2bc8a5 |
Hi! Thanks for taking a look at this! :) Wording: maybe drop the "it seems..." to make them more consistent/easier to translate? As for the icon, I don't really know -- I guess the emblem-music-symbolic icon could do! You forgot to commit the UI files however |
Great. I'll change some of the wording and add the icons.
I dindn't edit them. AFAIK they are descriptions of how a widget should look like, right? The status pages are shown dynamically. I'm not sure what needs to be changed in that case, |
Thanks! When we're done with choosing the wordings I'll add them to POEditor.
Oh right, missed how you implemented this. It works I guess, but for instance if you were to remove albums from your saved albums so as to go back to the empty state, it wouldn't hide the flowbox and use the status page instead. I think it'd be better to have an overlay, with the status page and the flowbox, and then switch the visible widget in on_event. Hopefully that makes sense! (oh and it looks like the CI complains about formatting) |
In that case I will be doing what you said instead :) Edit: wording |
11a004e
to
2a591fe
Compare
I'll open another PR once I complete the .ui file changes.
What would be a good way of knowing if the user has no albums or playlists? |
You can reopen this one if you want to, that's fine!
A quick overview of the project's architecture:
Therefore you could wait for specific events related to the state of these screens, and read the current state at that point. |
* add batch loader * start songlist * update playback state to use songlist * update album to use songlist * handle load artist tracks * start work on new shuffle mode * fix insertion range * some clippy fixes * more clippy fixes * fix track number * fix issue when playing track at some position from other source
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/tokio-rs/tokio/releases) - [Commits](tokio-rs/tokio@tokio-1.10.0...tokio-1.11.0) --- updated-dependencies: - dependency-name: tokio dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump serde from 1.0.128 to 1.0.130 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.128 to 1.0.130. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](serde-rs/serde@v1.0.128...v1.0.130) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump async-std from 1.9.0 to 1.10.0 Bumps [async-std](https://github.com/async-rs/async-std) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/async-rs/async-std/releases) - [Changelog](https://github.com/async-rs/async-std/blob/master/CHANGELOG.md) - [Commits](async-rs/async-std@v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: async-std dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Bump thiserror from 1.0.26 to 1.0.29 Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.26 to 1.0.29. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](dtolnay/thiserror@1.0.26...1.0.29) --- updated-dependencies: - dependency-name: thiserror dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Bump serde_json from 1.0.66 to 1.0.68 Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.66 to 1.0.68. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](serde-rs/json@v1.0.66...v1.0.68) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
I reset my branch to master and it accidentally closed so I went with it lol
Neat, seems like I might finish today :) |
The status page is triggered for Library when the user doesn't have any saved albums, and triggered for Saved Playlists when they have no saved playlists.
I edited the .ui files and added a GtkOverlay as you mentioned and it was surprisingly clean :) Since I can't remove all my playlists, I can't test this right now unfortunately |
Sorry forgot about this! I'll have a look tomorrow! |
Don't sweat it, I'm on summer break anyways :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job overall, just minor nitpicks :p thank you!
@@ -131,6 +134,13 @@ impl EventListener for Library { | |||
AppEvent::LoginEvent(LoginEvent::LoginCompleted(_)) => { | |||
let _ = self.model.refresh_saved_albums(); | |||
} | |||
AppEvent::BrowserEvent(BrowserEvent::LibraryUpdated) => { | |||
if let Some(list) = self.model.get_list_store() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) you could add a has_albums method to the model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? I think a get_albums would be better as returning Option
indicates the possibility of not having any album
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depends how you see it I guess, but what you care about locally is whether there are albums or not (and this avoids having to deal with the option here) but im fine with either :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true. I overlooked it and refreshing the albums is done elsewhere so a has_albums
method is actually the better for this case :)
(the diff is weird, maybe you need to update your master branch, but its fine as there was only one commit to review.) |
oh wait I forgot! you need to update the terms with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little something I found while testing
About the diff being weird: I'm more or less intermediate with git. I tried pulling your changes from master to make it easy to merge but it probably got worse lol I'll ask a friend to help me fix this weird history before merge |
no worries I think it's fine on your branch, which is all that really matters, but maybe not on the master branch of your fork! |
I'll have a look to see why the pipeline fails, this is not on you I believe Oh and sorry but you have to run the spot-pot thing again since you added the periods :p |
That's on me, I should definitely stick to a specific revision of libadwaita. I'll fix it later! |
Hi! you should be able to rebase on master, CI should be good now :) |
Alrighty! I'll just add the |
Done! I hope master is alright now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect!
There is still that weird diff, I don´t know why, have you been able to figure out whats happening? it should be fine to merge but still weird |
Probably because I pulled from master and it messed the history. I won't do it again from now on lol Also, it was a pleasure to work on this with you! Thanks for the kindness and patience :D |
It's been a pleasure as well, thanks for your contribution! :) |
This PR will hopefully fix #305. I'm new to the project and am still getting used to the codebase so I might have edited the wrong files.
Unresolved stuff