platelet-app / platelet

Dispatch system for emergency volunteer couriers.
https://platelet.app
Apache License 2.0
38 stars 10 forks source link

Swap out material makeStyles for tss-react makeStyles #127

Closed duckbytes closed 1 year ago

duckbytes commented 1 year ago

This pull request swaps out makeStyles imported from material UI and replaces it with makeStyles from the tss-react package.

This should improve performance and reduce or eliminate slowdown of the app over time.

makeStyles is left over from MUI V4 and apparently has problems with memory leaks and slow performance.

tss-react provides an almost drop in replacement and a script for automatically updating the code.

I'd like to test this build more to make sure there are no unintended side-effects or issues with the layout, but I think it should be merged before we do any live shifts (we only have training planned for now so that gives some time).

A temporary demo build with the changes: https://dev.d43cb9esdfjwv.amplifyapp.com/

duckbytes commented 1 year ago

@joetooker95 @RezTy-BBW when you next have some time can you please load the demo and play around with it a bit? I can't see any problems but would like more eyes on it if anything looks wrong or breaks.

codecov-commenter commented 1 year ago

Codecov Report

Merging #127 (16018a8) into master (7914304) will decrease coverage by 0.06%. The diff coverage is 60.82%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #127      +/-   ##
==========================================
- Coverage   58.92%   58.86%   -0.06%     
==========================================
  Files         298      298              
  Lines        9825     9811      -14     
  Branches     2483     2481       -2     
==========================================
- Hits         5789     5775      -14     
- Misses       3670     3671       +1     
+ Partials      366      365       -1     
Impacted Files Coverage Δ
src/components/ContextMenus/UserContextMenu.js 0.00% <0.00%> (ø)
src/components/ContextMenus/VehicleContextMenu.js 0.00% <0.00%> (ø)
src/components/CustomizedDialogs.js 0.00% <0.00%> (ø)
src/components/UserCard.js 0.00% <0.00%> (ø)
src/components/UsersSelect.js 0.00% <0.00%> (ø)
src/navigation/Components/ExpandableTaskFilter.js 0.00% <0.00%> (ø)
src/navigation/MainWindow.js 0.00% <0.00%> (ø)
src/navigation/MenuMainContainer.js 0.00% <0.00%> (ø)
src/navigation/MobileNavigationDrawer.js 0.00% <0.00%> (ø)
...nControl/Components/AdminAddRiderResponsibility.js 0.00% <0.00%> (ø)
... and 73 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

duckbytes commented 1 year ago

I'm going to merge this now with an aim to do more testing and eventually push it into production ahead of the trial sessions. Since I'd rather if any problems crop up it would be during testing rather than live.