-
Notifications
You must be signed in to change notification settings - Fork 19
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
RFCT: Start breaking up the UI into components #96
Conversation
32d9057
to
0374cf6
Compare
Rebased it on the latest main. Do you plan on adding more to this PR, or should I merge it? IMO it seems complete as a PR for the clock widget. |
0374cf6
to
9136573
Compare
It is complete, but I haven't tested the rebased version. |
Sorry for the delay, life happened and I forgot to come back to this. So, looking at the diff before and after, it seems that the only change is the #54 merging. I will try out this rebased version, but I doubt it will be broken. |
9136573
to
a90a7ce
Compare
LGTM for the rebase. As for the CI failure, well, this seems to be a Rust version specific issue? The suggestion from clippy not only doesnt exist on my machine, it fails to complile if applied. |
I also rebased this onto master so this should be ready to merge now... The CI is bugging me though, because it will probably keep failing all the later checks. |
29b9e28
to
6223c2a
Compare
I got it to compile with the CI-suggested fix with Rust 1.75. Could you try it out and see if it compiles for you now? |
- Separate the clock from the Greeter component - Replace chrono with jiff - Add TOML config options for the clock widget - Update the README with config options - Minor misc. improvements
6223c2a
to
b85168f
Compare
I forgot to do a |
Yup, it compiles |
This PR is part of my implementation of #85. I've noticed that it is not easy to "just do X", pretty much everything is tangled up into about 3 functions (a single
fn update
that does everything in the app, the clock, the power buttons, the login, everything; a view generated by Relm; and the init function that sets absolutely every component up) that are "broken up" into separate steps (functions), but when you try to pull out one step into a separate component something else needs to be pulled out as well.So I decided it would be easiest to move as much of the UI components out of the
Greeter
component before tackling the mess of a grid in the login ui.Anyways, here are the changes:
The key benefit is the customizability of the clock and use of
jiff
crate, which, unlikechrono
, doesn't require timezones to be initialized before threading.