-
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
[CSS-in-JS] [Breaking] Better Getting Started page #5299
[CSS-in-JS] [Breaking] Better Getting Started page #5299
Conversation
- Duplicates variables, but makes it actually capable of customization - New files for code & vis colors that weren’t theme specific
…js/breaking_getting-started
Preview documentation changes for this PR: https://eui.elastic.co/pr_5299/ |
Just fixed the failing snapshot tests. Merge/rebase the |
…js/breaking_getting-started
Preview documentation changes for this PR: https://eui.elastic.co/pr_5299/ |
Jenkins, test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5299/ |
…js/breaking_getting-started
Preview documentation changes for this PR: https://eui.elastic.co/pr_5299/ |
This PR continues to fail on Cypress in CI and I don't know how to fix it. |
@import '@elastic/eui/src/theme_light.scss'; | ||
``` | ||
|
||
### Fonts |
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.
Just trying to make sure I understand the overall intention with .md
files vs. docs site pages, and the distinction being made with removals like this.
Is it that everything now in Getting Started shouldn't exist in a markdown file anymore? Are we tying to push people more towards the site for documentation?
Seems like we have mixed bag of documentation and consumers have to visit both the repo and the docs site for a full picture (this was the case before this PR, too 😄). Wondering if you have a broader strategy in mind.
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.
Yeah so my broader strategy is that for purely consumer style docs (using in your own projects), all those instructions need to live on our docs site, not buried in .md files. So I'm trying now to focus those .md
files purely on contributors to EUI. Eventually we'll want to import our entire wiki folder to be displayed on our docs site too.
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.
Unless that is, the .md file goes into very technical issues like icon failings and such. Those I haven't found a good place for yet in our docs site, so just pointing consumers in the general direction of .md if they get stuck and this PR just creates some high-level intro-style instructions.
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 was also removing mostly what has been duplicated in both places since we're not good at keeping 2 places up to date.
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.
Makes sense to me; thanks for clarifying.
Eventually we'll want to import our entire wiki folder to be displayed on our docs site too.
Yes, I think that would solve a lot of confusion about where docs should go.
I think there's a fix on master that just hasn't made its way into the feature branch yet |
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.
LGTM with the additional README change
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Preview documentation changes for this PR: https://eui.elastic.co/pr_5299/ |
* emotion as peerDep; babel and typescript * jest config * isDefaultTheme util * CL TODO * update snapshots * [CSS-in-JS] [Breaking] Deprecating EUI theme to Legacy (#5222) * [CSS-in-JS] Global style reset with `emotion` (#5122) * global reset with emotion * amsterdam overrides * text-size-adjust * ams reset * invert ::selection * Renamed `isDefaultTheme` utility to `isLegacyTheme` Default will mean something different when Amsterdam becomes default so I want to head this off now by checking for “Legacy” * Quick cleanup * Fixed up scrollbar function * Removed `useEuiFont` in favor of a single reset on the elements that need it * Added `body` key to global `font` for setting base body font settings at the global level * Some more fixes based on new diff * global reset with emotion * amsterdam overrides * text-size-adjust * ams reset * invert ::selection * Renamed `isDefaultTheme` utility to `isLegacyTheme` Default will mean something different when Amsterdam becomes default so I want to head this off now by checking for “Legacy” * Quick cleanup * Fixed up scrollbar function * Removed `useEuiFont` in favor of a single reset on the elements that need it * Added `body` key to global `font` for setting base body font settings at the global level * Some more fixes based on new diff * Pulling our reset from global styles * SVG `hacks` directly in reset file * Fixed reset import * euiprovider; reset styles * use euiprovider with emotion/cache in docs * Decision clean up * Fixing a few things for legacy dark mode based on not having a provider * Revert "Fixing a few things for legacy dark mode based on not having a provider" This reverts commit 127f12e. * Actually keeping `colorMode` even if `theme = null` * Fixing merge * Moved reset sass folder to `legacy` * fix wiki * euiprovider docs * fix provider docs * remove commented import Co-authored-by: cchaos <caroline.horn@elastic.co> * [CSS-in-JS] Add provider to generated codesandbox examples (#5253) * add provider to generated codesandbox examples * indentation * euithemeprovider -> euiprovider * legacy theme * fix snapshot tests * [CSS-in-JS] Provider for fullscreen examples; Context refactor (#5309) * refactor to extract context component * refactor for fewer updates on route changes * refactor AppView to function component * [CSS-in-JS] [Breaking] Better Getting Started page (#5299) * Moved all color Sass files to their respective theme folders - Duplicates variables, but makes it actually capable of customization - New files for code & vis colors that weren’t theme specific * Remove outdated theming wiki page * Cleanup (in MD files too) * fix heading level * update changelog page regex to fully remove the master section * manual merge * update release script changelog regex * Cleanup some docs * Hide LanguageSelector tour on Getting Started page * Some GS page cleanup * PR feedback * cl * Apply suggestions from code review Co-authored-by: Constance <constancecchen@users.noreply.github.com> * lint fix * make amsterdam default * provider updates * fix cypress styles * PR feedback: - Removed blank mixins file - Added `yarn add` block for dependencies - Added props table to bottom of Provider docs page * move keydown inside useeffect * Reusing correct Sass customization snippet under Customizing * fix cypress path * update export Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com> Co-authored-by: cchaos <caroline.horn@elastic.co> Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Updated the Getting Started page with clearer instructions based on theme and best practices
And cleaned up some MD files to remove duplicate/outdated content
🔔 Breaking: Fixed customizability of each theme
The way we were originally handling theme colors was with a base set of color tokens in
global_styling
that used the Sass!default
mechanism. Then in our subsequent themes we were overriding these tokens by declaring a new set before their import which did not have the!default
. This actually made it impossible for consumer to customize on top of that. So the only truly customizable theme was the legacy light theme.This fixes that by moving all color tokens (whether duplicative or not) to their respective
themes/name/_colors_light.scss
andthemes/name/_colors_dark.scss
files. I also then deleted the one that exists inglobal_styling
and updated any docs around that import.Checklist
[ ] Checked in mobile[ ] Checked in Chrome, Safari, Edge, and Firefox[ ] Props have proper autodocs and playground toggles[ ] Checked Code Sandbox works for any docs examples[ ] Added or updated jest and cypress tests[ ] Checked for accessibility including keyboard-only and screenreader modes[ ] A changelog entry exists and is marked appropriately