Skip to content

[#8190] [EUI+] Missing Utilities content - #8348

Closed
weronikaolejniczak wants to merge 5 commits into
elastic:mainfrom
weronikaolejniczak:fix/8190-eui-plus-missing-utilities
Closed

weronikaolejniczak wants to merge 5 commits into
elastic:mainfrom
weronikaolejniczak:fix/8190-eui-plus-missing-utilities

Conversation

@weronikaolejniczak

@weronikaolejniczak weronikaolejniczak commented Feb 25, 2025 •

Copy link
Copy Markdown
Contributor

Summary

#8190

I added the Utilities section to the new docs. The docs should have content parity except for any "Sass" references, including the dynamic section on the Scroll page.

Potential improvements

I outlined in the ticket possible improvements and created appropriate issues in M1/M2:

Additionally, I created issues for UX improvements:

It's also worth to point out that locally the error gets caught and the red screen appears when accessing Utilities > Error Boundary. This likely won't happen in staging and production because it's not a development environment, therefore doesn't display the red screen. For better DX though, this could be improved to not be caught by the upper-most Error Boundary.

Fixing examples

ReferenceError: exports is not defined

I came to a conclusion that you can only export default in a <Demo> component. You cannot use named exports and you cannot use them alongside export default. Otherwise, the preview will throw "exports is not defined".

Named export Named export and default export Only default export
Screenshot 2025-02-25 at 14 54 24 Screenshot 2025-02-25 at 14 55 07 Screenshot 2025-02-25 at 14 53 52

ReferenceError: require is not defined

Importing a locally defined component from within the <Demo> component doesn't work. It's better to provide it in the scope prop.

Import within <Demo> Using scope prop
Screenshot 2025-02-25 at 14 58 10 Screenshot 2025-02-25 at 14 58 26 Screenshot 2025-02-25 at 14 59 46 Screenshot 2025-02-25 at 14 59 32

css prop

At times, the styles are not as expected in the .mdx files. It turns out that Emotion css works only in .tsx files, otherwise in MDX we can leverage style.

QA

Checklist:

  • Compare the content between the old docs and the staging.
  • Verify that links redirect as expected (internally, within the same tab; externally, in a new tab).
  • Verify that examples work as expected.
  • Make sure the prop tables is displayed for all relevant component.

Pages to test:

  • Accessibility
  • Auto-sizer
  • Beacon
  • Color palettes
  • Copy
  • CSS utility classes
  • Delay
  • Error boundary
  • Focus trap
  • Highlight and mark
  • HTML ID generator
  • Inner text
  • I18n
  • Mutation observer
  • Outside click detector
  • Overlay mask
  • Portal
  • Pretty duration
  • Provider
  • Resize observer
  • Scroll
  • Text diff
  • Text truncation
  • Window events

@weronikaolejniczak
weronikaolejniczak requested a review from a team as a code owner February 25, 2025 14:10
@weronikaolejniczak weronikaolejniczak self-assigned this Feb 25, 2025
@weronikaolejniczak weronikaolejniczak added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Feb 25, 2025
@weronikaolejniczak weronikaolejniczak mentioned this pull request Feb 25, 2025
33 tasks done
@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

cc @weronikaolejniczak

@tkajtoch

tkajtoch commented Feb 26, 2025 •

Copy link
Copy Markdown
Contributor

Hi @weronikaolejniczak! This PR feels too large to be reviewed as a single piece. We usually try to have up to 1k changed lines per PR. Do you think it would be possible to split it into smaller chunks?

If there are any change requests, it might take a long time to get them all sorted out, and they would block this PR from being merged.

It'll also be far easier to review your work as a team and not have a single reviewer who'd need to review it all file by file.

@weronikaolejniczak

Copy link
Copy Markdown
Contributor Author

@tkajtoch Thank you for the feedback! I agree, I will close this PR then and open one PR per page.

@weronikaolejniczak
weronikaolejniczak deleted the fix/8190-eui-plus-missing-utilities branch April 16, 2025 06:46
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.

4 participants