Skip to content

Conversation

@ryankeairns
Copy link
Contributor

Summary

This PR implements component tokens for EuiEmptyPrompt spacing configuration, following the established euiTheme.components.* pattern.

Changes

  • Added component token types: Created _EuiThemeEmptyPrompt type and added to _EuiThemeComponents
  • Implemented component tokens: Added emptyPrompt spacing configuration to both Amsterdam and Borealis themes
  • Updated EuiEmptyPrompt: Changed from custom spacing property to euiTheme.components.emptyPrompt with proper TypeScript types
  • Borealis theme spacing: Reduced spacing values (titleBodySpacing: 's', bodyActionsSpacing: 'm', paddingSize: 'm')
  • Amsterdam theme: Uses default spacing values (titleBodySpacing: 'm', bodyActionsSpacing: 'l', paddingSize: 'l')
  • Cleanup: Removed custom spacing property and _spacing.ts file

Amsterdam theme remains unchanged

Screenshots

Borealis before (left) and after (right)

CleanShot 2025-09-19 at 14 01 55@2x CleanShot 2025-09-19 at 14 02 17@2x

Amsterdam before and after (unchanged)

CleanShot 2025-09-19 at 14 03 13@2x

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

- Decrease title-to-body spacing from 'm' to 's' (16px → 8px)
- Decrease body-to-actions spacing from 'l' to 'm' (24px → 16px)
- Decrease default padding from 'l' to 'm' (24px → 16px)
- Create _spacing.ts file following established theme patterns
- Extend EuiThemeShape to include custom spacing property
- Update both light and dark Borealis theme JSON files
- Modify EuiEmptyPrompt to use theme-based spacing values
- Update snapshot tests to reflect new spacing values
- Amsterdam theme remains unchanged

Addresses #9039
- Update .loki reference images to reflect reduced spacing in Borealis theme
- Add changelog entry for emptyPrompt spacing theme defaults
- Add emptyPrompt to _EuiThemeComponents type definition
- Create _EuiThemeEmptyPrompt type and component token definitions
- Update Borealis theme to use component tokens instead of custom spacing property
- Update EuiEmptyPrompt to use euiTheme.components.emptyPrompt with proper TypeScript types
- Add emptyPrompt component tokens to Amsterdam theme with default values
- Remove custom spacing property and _spacing.ts file
- Update changelog to reflect component tokens approach

This follows the established pattern of euiTheme.components.* tokens
and provides better type safety and discoverability.
- Update PNG snapshots to reflect reduced spacing in Borealis theme
- EuiEmptyPrompt spacing changes from (m, l, l) to (s, m, m)
- Includes both desktop and mobile view updates
- Covers High Contrast, Transparent, Page Template, and Playground variants
@ryankeairns ryankeairns force-pushed the rk/9039-empty-prompt-spacing-component-tokens branch from c708bb7 to 5effc1d Compare September 24, 2025 18:50
@ryankeairns ryankeairns marked this pull request as ready for review September 24, 2025 18:50
@ryankeairns ryankeairns requested a review from a team as a code owner September 24, 2025 18:50
- Update changelog file names to match new PR number
- Rename both Borealis theme and EUI changelog files
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.

Just a couple of comments. Thanks for updating the VRT images 🙌🏻

I verified that for Amsterdam, EuiEmptyPrompt remains the same 😄

- Add missing changelog entry for eui-theme-common package
- Fix changelog formatting with proper bullet points and newlines
- Specify the actual component tokens added (titleBodySpacing, bodyActionsSpacing, paddingSize)
- Correct EUI changelog to reference component tokens instead of emptyPromptSpacing
- Add missing changelog entry for eui-theme-common package
- Fix changelog formatting with proper bullet points and newlines
- Specify the actual component tokens added (titleBodySpacing, bodyActionsSpacing, paddingSize)
@ryankeairns
Copy link
Contributor Author

CHANGELOGESES updated!

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

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.

✅ snapshots updated
✅ VRT images updated
✅ changelogses in all the packages: eui, eui-theme-common, eui-theme-borealis
✅ the change doesn't affect Amsterdam
✅ code looks okay

Thanks for contributing, Ryan! 🟢 We're good to go!

I also got an idea to use our componentDefaults for this. But this is just fine and I don't want to block it anymore.

@ryankeairns ryankeairns merged commit f1de314 into main Sep 26, 2025
5 checks passed
@ryankeairns ryankeairns deleted the rk/9039-empty-prompt-spacing-component-tokens branch September 26, 2025 14:33
mgadewoll added a commit that referenced this pull request Sep 30, 2025
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