-
Notifications
You must be signed in to change notification settings - Fork 311
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
Console redesign ground work - css refactor #6692
Conversation
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.
Very nice work. It's especially nice to see how much we can shave off the styling modules.
So indeed there is a problem now with the build time. This is very likely because of all the complex logic required to build the utility classes. I believe we have to look into caching these and only rebuild them when needed. The best way to do this, I believe, is to outsource all utility classes into a separate CSS module. Then it will only be rebuild when changed (which shouldn't happen often), all other modules can be bundled as usual. We just need to include both modules in the HTML then.
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.
Wow, 8MB, that's massive. Is there a way to shrink this by only using some weights or so?
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.
The thing with the new Material Symbols is that they are a variable font, which means you can set whatever weights and styles you wish using FILL, GRAD, opsz and wght:
.material-symbols-outlined {
font-variation-settings:
'FILL' 1,
'wght' 400,
'GRAD' 0,
'opsz' 0
}
Also, I see that the resulting CSS is now waaaaaaay too big, with 1.7 million lines 😅, which also explains the build time issue. I believe we have some overzealous loop in the class generation there somewhere. Please have another look to see what it might be. It can happen quite quickly when generating classes per breakpoint, per size and per type all at once. Also note that the TTUI CSS only has 825kb, as opposed to 32MB of this Console bundle. EDIT: Looking through the bundle, I can see that there is a lot of duplicate definitions in there. Search for |
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!
Summary
This PR updates the colors and introduces new utility classes.
References: https://github.com/TheThingsIndustries/product-management/issues/29
Changes
Notes for Reviewers
To-do:
mixin.styl
page to see if we still want to use all of them or we want to drop sometools/bin/mage js:serve
and loading the page, takes a really long time to completeGET http://localhost:8080/console/
sometimes does not complete at all witherror Command failed with signal "SIGABRT"
Checklist
README.md
for the chosen target branch.CHANGELOG.md
.CONTRIBUTING.md
, there are no fixup commits left.