Skip to content
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

[Emotion] Organizing files by type vs values and added euiTheme.levels #5827

Merged
merged 15 commits into from
Apr 25, 2022

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Apr 20, 2022

Summary

Primarily the idea is that exports leading with an underscore, _EuiThemeVars, are Typescript types and those without are constants, EuiThemeVar. The values only live within the themes/Amsterdam/ folder while the top level global_styling/ folder will contain only the theme types & non-value based functions.

Checklist

  • Checked in both light and dark modes
  • [ ] Checked in mobile
  • [ ] Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Added documentation
  • [ ] Checked Code Sandbox works for any docs examples
  • Added or updated jest and cypress tests
  • [ ] Checked for breaking changes and labeled appropriately
  • [ ] Checked for accessibility including keyboard-only and screenreader modes
  • [ ] Updated the Figma library counterpart
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5827/

@miukimiu miukimiu self-requested a review April 21, 2022 15:28
Copy link
Contributor

@miukimiu miukimiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

I just found one small issue.

src-docs/src/views/theme/other/_levels_js.tsx Outdated Show resolved Hide resolved

return (
<>
<ThemeValuesTable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this example also have a <ThemeExample />?

Screenshot 2022-04-21 at 17 12 51

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would the actual example be though?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an idea: cchaos#55

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miukimiu , I'm going to merge this PR to specifically get these file organization changes in to reduce conflict management. We can follow up with the example snippets.

cchaos added 3 commits April 21, 2022 16:13
# Conflicts:
#	src/global_styling/functions/index.ts
#	src/global_styling/variables/index.ts
#	src/services/theme/index.ts
#	src/services/theme/types.ts
#	src/themes/amsterdam/global_styling/mixins/shadow.ts
#	src/themes/amsterdam/global_styling/variables/_typography.ts
#	src/themes/amsterdam/global_styling/variables/title.ts
#	src/themes/amsterdam/theme.ts
@cchaos cchaos requested a review from thompsongl April 21, 2022 20:28
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5827/

@thompsongl
Copy link
Contributor

I didn't touch the _typography files because I didn't want to conflict with my other PR.

Any additional work to do in this PR now that the typography PR has merged? Or is this comment outdated?

@cchaos
Copy link
Contributor Author

cchaos commented Apr 25, 2022

Outdated, as I already merged in those changes. But looks like I have another conflict I'll need to resolve locally.

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; this is a great change!

@cchaos
Copy link
Contributor Author

cchaos commented Apr 25, 2022

Jenkins, test this

@cchaos cchaos enabled auto-merge (squash) April 25, 2022 16:39
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5827/

@cchaos cchaos merged commit 2d99775 into elastic:main Apr 25, 2022
@cchaos cchaos deleted the css-in-js/organize_types branch May 8, 2022 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants