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

docs(EuiEmptyPrompt): Fix missing icons in EUI+ docs #8488

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

tkajtoch
Copy link
Member

@tkajtoch tkajtoch commented Mar 24, 2025

Summary

Resolves #8312

This fixes icon rendering in EUI+ EuiEmptyPrompt docs. Utilizing both iconType and icon props felt easiest to achieve what we want.

QA

Please note that EuiEmptyPrompt guidelines use renderToJSXString, which is incompatible with Docusaurus and our Demo component when used in prod builds. Additionally, EuiPageTemplate's sidebar gets rendered incorrectly as reported here. These pages currently work only when running locally, which is unrelated to this PR.

  1. Checkout this PR - gh pr checkout <id> && yarn
  2. Build website dependencies - yarn workspace @elastic/eui-website run build:workspaces
  3. Run Docusaurus - yarn workspace @elastic/eui-website run start
  4. Ensure the EuiEmptyPrompt's Types of empty states example works comparably to the current docs site

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@tkajtoch tkajtoch added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Mar 24, 2025
@tkajtoch tkajtoch self-assigned this Mar 24, 2025
@tkajtoch tkajtoch marked this pull request as ready for review March 24, 2025 12:59
@tkajtoch tkajtoch requested a review from a team as a code owner March 24, 2025 12:59
@weronikaolejniczak
Copy link
Contributor

@tkajtoch there's a reference error:

Screenshot 2025-03-24 at 18 41 44

@tkajtoch
Copy link
Member Author

@weronikaolejniczak I know, I mentioned it in the description. main has the same error and it's related to convertToJsxString usage when code is minified for production. It works locally and will need to be fixed globally.

@weronikaolejniczak
Copy link
Contributor

@tkajtoch ah, I'm sorry, I read the description but didn't connect those two. Let me checkout the branch and test locally then 😄

Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉 Thanks for figuring this out, Tomasz!

Screen.Recording.2025-03-25.at.12.07.33.mov

@tkajtoch tkajtoch merged commit bab8912 into elastic:main Mar 25, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EUI+] [EuiEmptyPrompt] Fix missing icons in the code snippet preview
4 participants