Skip to content

Conversation

@mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Nov 21, 2025

Summary

This PR adds a tiny fix to the pretty format button in EuiSuperDatePicker to ensure the text can be truncated if not enough space is available.
The underlying EuiFormControlButton has truncation by default for the value prop, but if custom content is passed via children, truncation needs to be handled manually.

Additional changes

Why are we making this change?

💅 UI consistency: This change ensures that the element behaves as expected and inline with other related elements.

Screenshots #

before after
Screenshot 2025-11-21 at 10 54 51 Screenshot 2025-11-21 at 10 54 29

Impact to users

🟢 There are no code changes required on consumer side.

ℹ️ Due to the updated DOM structure, snapshot tests might require updates.

QA

  • verify that overflowing content in the pretty format button (superDatePickerShowDatesButton) is correctly truncated
  • verify there is no other unexpected regression

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)
    • If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)
  • 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)

@mgadewoll mgadewoll self-assigned this Nov 21, 2025
@mgadewoll mgadewoll changed the title [EuiSuperDatePicker] Fix pretty duration button truncation [EuiSuperDatePicker] Fix pretty format button truncation Nov 21, 2025
@mgadewoll mgadewoll force-pushed the superdatepicker/fix-pretty-format-truncation branch from 0625c71 to 1877fc9 Compare November 21, 2025 10:31
- the underlying EuiFormControlButton has truncation by default for the value prop, but if custom content is passed via children, truncation would need to be handled manually
@mgadewoll mgadewoll force-pushed the superdatepicker/fix-pretty-format-truncation branch from 1877fc9 to 2dc27a5 Compare November 21, 2025 11:11
@mgadewoll mgadewoll marked this pull request as ready for review November 21, 2025 13:33
@mgadewoll mgadewoll requested a review from a team as a code owner November 21, 2025 13:33
@tkajtoch tkajtoch self-requested a review November 21, 2025 13:57
Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

The changes work as expected when testing in Storybook.

I left one comment about a class usage, but it's something we do all around EUI, so if you feel like leaving it as-is until we can improve it globally, I'm fine with that choice. LMK!

@tkajtoch
Copy link
Member

Code changes look great! I'll give the stories another go when they build, and we should be good to go 🎉

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

Everything looks great! Thank you for addressing my comment 💯

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@mgadewoll mgadewoll merged commit cb98479 into elastic:main Nov 21, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants