Add UI redesign #15
Conversation
…olConfig, P2PoolStatus, LNConfig, LNStatus, SharesMarket screens
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
we should move all these render.* functions as submodules of ui #16 |
Thank you! Separate components for each view |
| use std::env::temp_dir; | ||
| use std::fs::{File, create_dir}; | ||
| //use std::env::temp_dir; | ||
| use std::fs::File; //{ , create_dir}; |
There was a problem hiding this comment.
instead of commenting out unused imports , we should remove it.
| Span::styled("[api] ", Style::default().fg(Color::Blue)), | ||
| Span::raw(format!("port = {}", cfg.api.port)), | ||
| ]))); | ||
| } |
There was a problem hiding this comment.
maybe we can collapse all that boilerplate into a data array + a single loop
something like
let fields: &[(&str, String)] = &[
("[stratum] ", format!("hostname = {}", cfg.stratum.hostname)),
("[stratum] ", format!("port = {}", cfg.stratum.port)),
("[stratum] ", format!("start_difficulty = {}", cfg.stratum.start_difficulty)),
etc...
This way the rendering logic is identical and the loop can just run the same ListItem constructions once
There was a problem hiding this comment.
Looks great , i have left some comments.
and also i have one architectural thought , in future as the project grows ,we potentially add more stateful moduless ,it might be useful to separate concerns by keeping stateful / logic-bearing modules under components/, and moving pure UI rendering into a dedicated ui/ folder , two folders for two separate concerns.
But we can do this in followup prs if needed. But for now it looks great.
Thankyou @framicheli
UI redesign as described in the wiki wireframes showing all the views with placeholders for now