Skip to content

[Docs] Empty states use cases don't render #9062

Closed

Description

@kyrspl

Describe the bug
Empty states use-cases don't render on the page when we select a use case

Image

Impact and severity
A user cannot see how the empty prompt can be used within a particular use-case

Environment and versions

  • EUI version: 106.60
  • React version:
  • Browser: Brave, Chrome
  • Operating System: MacOS

To Reproduce

Steps to reproduce the behavior:

  1. Go to Empty prompt page on eui.elastic.co
  2. Click on a use case
  3. Click on "Show source"
  4. See error
Image

Expected behavior
Each individual use-case selected should render the relevant example

Activity

  1. added theissue type on Sep 29, 2025
  2. added
    ⚠️ needs validation
    on Sep 29, 2025
  3. removed
    ⚠️ needs validation
    on Sep 30, 2025
  4. self-assigned this
    on Sep 30, 2025
  5. JasonStoltz commented on Oct 8, 2025

    @JasonStoltz
    Contributor

    Notes from our Triage session:

    The problem is that code examples in the documentation appear correct in development but "break" in the production build, likely due to minification. Lene was able to verify this behavior.

    The team discussed potential solutions. A worst-case but viable fix would be to rewrite the examples to avoid the problematic pattern.

    We have a similar issue with svgs -- (I believe it's this issue #8969)

    It was determined that the issue needed a more thorough investigation to understand the root cause before a solution could be implemented.

    Next Step: The issue was assigned to @tkajtoch for a deeper investigation to better define the problem and potential solutions.

  6. tkajtoch commented on Oct 14, 2025

    @tkajtoch
    Contributor

    The underlying issue for this bug is the usage of convertToJsxString to generate the code snippet passed to the <Demo> component. This was likely done due to the simplicity of this approach, but it results in broken demos whenever the JSX input to that function gets minified.

    We should use the regular MDX examples and avoid dynamically generated code like this.

  7. removed their assignment
    on Oct 14, 2025
  8. changed the title [-][Eui docs] Empty states use cases don't render[/-] [+][Docs] Empty states use cases don't render[/+] on Oct 14, 2025
  9. added
    documentation
    on Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

documentation

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions