Skip to content

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

Merged
tkajtoch merged 2 commits intoelastic:mainfrom
tkajtoch:docs/eui-empty-prompt-missing-icons
Mar 25, 2025
Merged

docs(EuiEmptyPrompt): Fix missing icons in EUI+ docs#8488
tkajtoch merged 2 commits intoelastic:mainfrom
tkajtoch:docs/eui-empty-prompt-missing-icons

Conversation

@tkajtoch
Copy link
Copy Markdown
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
Copy Markdown

Preview staging links for this PR:

@elasticmachine
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@tkajtoch there's a reference error:

Screenshot 2025-03-24 at 18 41 44

@tkajtoch
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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