-
Notifications
You must be signed in to change notification settings - Fork 11
Settings and Actions Toolbar #170
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
base: 0.9.7-(under-construction)
Are you sure you want to change the base?
Settings and Actions Toolbar #170
Conversation
|
This is brilliant, and its hilarious why I have not thought of this when I worked on the tiles years ago :D We could even hide it dynamically like windows task bar (though this will require some gesture support for touchscreens or we just show it on any click anywhere that also works) on smaller screens. |
b4dc2c8 to
6bde3fa
Compare
|
Great work! What a space saver! I'll test this evening and accept the request when no issues are found |
|
I think new defaults are needed. And the local storage carries over. I could have sworn I removed it from the list, and I still haven’t removed the component from the code base 😅 Tested it myself during a workout today and I did notice some quirks. But overall seemed mostly functional! 12x on the tablet was glorious. |
|
You removed it from the defaults but since localStorage has it it will happily load it back: Here basically we just get whatever is in the store. here we load it from the store. const config = this._appState.config.guiConfigs
Object.keys(config).forEach(key => {
config[key] = JSON.parse(localStorage.getItem(key)) ?? config[key]
})We need a settings migration here, namely that if config has actions we need to override it and write this new config back to local storage. |
|
Heads up that I am also unhappy with the state of the CSS here; it looks ok but it's not very understandable atm. So I will probably be tinkering and testing that along with the state reset ^ |
|
Before I forget: One thing to look at is the update behaviour of the force curve. We only send new data on the flag isRecoveryStart is true (all subsequent updates repeat the same curve), but it keeps drawing CPU cycles when displayed. Perhaps it is redrawing too often? |
|
Alright y'all — sorry, I got a little carried away with the CSS. If the changes are out of scope, will happily pull into another PR. Tried to make the CSS more self explanatory, and addressed an iOS bug I ran into while working on something else. It's stricter/more defined now, and no longer has what I believe was unintentional overflow/scrolling. So. Here's the before (Saw this while testing #171 and prior): And here it is now (only tested locally):
|
08936de to
18cda3e
Compare
Relying heavily on the AI for this, but the solution makes sense to me! |
Or we need to clear the browser cache on update. There are some PR's regarding the cache and the browser anyway (if the user isn't named 'pi' there are install issues, and we might switch browser to something lighter as on the Zero2W there are memory issues), so clearing it will kill any CSS and caching issues? |
I think that is a bit heavy. I like the current migration. I think it is sufficient.
So this is one of the things that proper data layer would solve. When I was experimenting with rxjs it has distintcUntilChanged which is a breez (so I was checking data on each tile for changes and only update/render). Actually you should not worry about this for now, as I will review the updates to the lit framework and rework this data layer which will improve change detection (and trigger less rendering). I did more reading and it is going to be gradual but still robust. It will remove this passing down global state and make it more focused, that will reduce re-rendering. The issue currently is that we use the global state which is fully replaced on every new incoming data packet (250ms as per default gui update interval I think), hence triggering all components update. I think moving to update() will not help but you can check that with a logging statement (i.e. how many times the update() method runs). |
|
A practical remark/question: currently we have lit pinned to 2.8, as upgrading to 3.x will break the FE. If you want a higher version, just drop a line. If we can uograde to 3.x pkease also tell as it might unlock a bunch of dependent package updates. |
You realize we might change browser or cach store completely due to the outstanding issues (thus clearing any cache anyway)? |
Yes that is true and essentially it will result in the same effect for those that use a screen with the Pi. But we need to keep it mind that
|
Forgot about that one. Thanks! |
|
Alright, given how much back and forth is going on after trying to address this:
I thing we should just tighten the scope here and pull out all of that code for another PR. Seems like there are lots of things that need to be validated or confirmed, including what constitutes "fighting the framework" and benchmarking performance. |
…onent Extracted toolbar functionality from PerformanceDashboard into new DashboardToolbar component. Removed 'actions' from default dashboard metrics. Updated layout to use flexbox with separate toolbar and metrics grid sections.
… in localStorage. Remove deprecated DashboardActions component and migrate saved metrics Deleted DashboardActions.js component as functionality has been moved to DashboardToolbar.
Replaced dynamic inline style injection with CSS class-based approach for grid row configuration. Changed metrics container from div to semantic section element. Updated grid layout to use explicit grid-template-rows and added .rows-3 modifier class for 12-tile configuration.
…vements Reorganized CSS properties for better readability and consistency. Simplified button styles by removing redundant properties and using flex instead of inline-flex. Changed fullscreen/windowed icon containers from div with IDs to span with classes. Consolidated media query icon display rules into single-line declarations.
Added explicit grid-template-areas to PerformanceDashboard for clearer layout structure. Added min-height: 0 to metrics-grid and metric-tile to prevent grid blowout issues.
…rt legend. More reliable - Avoids Chart.js legend bugs on iOS and autoscaling issues Better for responsive design - HTML text naturally inherits the fluid typography Added host flex container styles and title styling at 80% font size with center alignment.
41b22f9 to
8db0227
Compare






WIP, first code contribution! Trying out an idea I had based on need expressed here:
#168 (reply in thread)
Also corrected a quirk in heigh calculation that led to the tiniest bit of scrolling.
Testing TBD, will try it on next workout.