-
Notifications
You must be signed in to change notification settings - Fork 843
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
[FEATURE] CSS-in-JS via emotion
, initial release
#4511
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
d2cec03
to
8a1787e
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
* poc * tidy * proxy set handler * default theme; docs setup * table colors via css-in-js * exports * withEuiTheme; useEuiTheme return shape; some types * export and proxy fixes * use without provider; some test setup * prevent unnecessary updates * refactor colorMode calc; move computation to provider * utils refactor * clean up * compute default theme for initial context value * snapshot update preview * axe ignore temporary docs page * theme: colorVis and borders, sizes update * coupled types * some utils tests * start to amsterdam; name in theme obj * Revert "table colors via css-in-js" This reverts commit 5614b0f. * eslintrc * readme Co-authored-by: cchaos <caroline.horn@elastic.co>
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
* allow custom properties via overrides; type clean up * add some tests * update canopy * overrides -> modify * clean up * Update src/services/theme/README.md Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> * update readme * Update src/components/common.ts Co-authored-by: Chandler Prall <chandler.prall@gmail.com> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
…to feature/css-in-js
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
* convert useEuiTheme to return object; refactor withEuiTheme types * readme update * update docs * Quick update to the docs Co-authored-by: cchaos <caroline.horn@elastic.co>
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
* convert numbers to strings with units * docs * fewer calc() * Updating consuming example to show `calc()` Co-authored-by: cchaos <caroline.horn@elastic.co>
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
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.
😲 this LGreatTM; cannot observe additional page load weight in Kibana, value updates take 2-4 frames (24-40ms) to compute an updated theme, trigger the React context updates, and re-paint in Emotion. Further perf testing would need to be done outside Kibana, but this is absolutely fine to go 🎉
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.
I contributed a lot of the code here, so I'm signing off from the perspective that I plan on making no further changes and am very pleased with how the theme shape came together.
Thanks for all the work, @cchaos! Can't wait to keep moving with this approach 🥳
Sorry, I just realized I'm not sure if my approval is blocking merge - I'll be honest that 6k is a lot of lines to review and I mostly did a skim of the docs 🙈 From everything that I've heard from Greg's high-level walkthrough and the syncs, the underlying work sounds solid+super impressive to me! API and usage looks good as well - I'm sure we'll find either pain points or improvement areas as we start the process of converting our components over, and can continue to improve as we go. TL;DR 🚀 🚀 🚀 |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4511/ |
This is the initial release of Emotion (docs only; devDependencies) and the new EuiThemeProvider.
Components
The themes (#4643)
theme.colors.euiPrimary
or simplify totheme.colors.primary
? (Survey results)Docs
EuiThemeProvider
global theme switching #5072)Checklist
- [ ] Checked in mobile- [ ] Checked Code Sandbox works for the any docs examples