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

[EUI+] Initial typography and doc content updates #7848

Merged

Conversation

mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Jun 25, 2024

Summary

closes: elastic/eui-private#113
relates to #7822

Important

Parts of this PR (anything related to the ColorModeToggle) was added as a separate PR here but kept in this PR as well for testing purposes. That previous PR for ColorModeToggle should be reviewed and merged before this one. Update: The PR was merged and this PR rebased.

This PR updates the base global styles for the new EUI+ docs and additionally adds the first style updates for doc content components.

Changes:

  • swizzles MDXContent (wrap) and updates it to use EuiText + custom EUI+ adjustments to ensure markdown content styling (text, lists etc)
  • swizzles DocItem/Content (wrap) and adds custom styles for the document heading
  • swizzles MDXComponents/A and MDXComponents/Code (wrap) and uses Eui components instead (EuiLink and EuiCode/EuiCodeBlock)
  • swizzles MDXComponents/Heading and uses a wrapping EuiText to apply EUI heading styles
  • adds a custom EUI+ CallOut component and uses it to wrap Docusaurus admonition components (Note, Info, Tip, Warning, Danger) and apply custom styles
  • updates swizzled Footer component theme to ensure static dark theme (independent from global colorMode)

Screenshot 2024-06-25 at 11 56 55

Screenshot 2024-06-25 at 11 57 08

QA

  • checkout this PR gh pr checkout 7848, build the theme in /packages/docusaurus-theme with yarn build and run the EUI+ docs page in packages/website with yarn start
    • review docs pages and styles and verify that they look as currently expected based on initial designs (link)

@mgadewoll mgadewoll marked this pull request as ready for review June 25, 2024 10:01
@mgadewoll mgadewoll requested a review from a team as a code owner June 25, 2024 10:01
@mgadewoll mgadewoll force-pushed the eui+/7795-content-typography-changes branch from c78d6c2 to 239668d Compare June 26, 2024 16:21
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@tkajtoch tkajtoch self-requested a review June 27, 2024 15:08
@@ -4,10 +4,10 @@ slug: /guidelines/testing
id: testing-introduction
---

<p style={{ fontSize: '22px' }}>
<div style={{ fontSize: '22px' }}>
Copy link
Member

Choose a reason for hiding this comment

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

We may need to address this since document subtitles would need to be p tags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The output for any text is as a <p>. That's why it resulted in a p nested in another p tag.
We might want to use a separate component for applying font style changes in the mdx files instead of inline styles?

Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

The changes look great! We can address some of the things like the subtitle p tag in a separate PR.

@mgadewoll mgadewoll merged commit 4937751 into elastic:main Jul 2, 2024
5 checks passed
@mgadewoll mgadewoll deleted the eui+/7795-content-typography-changes branch July 2, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants