-
Notifications
You must be signed in to change notification settings - Fork 862
[EuiSuperDatePicker] Fix pretty format button truncation #9231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiSuperDatePicker] Fix pretty format button truncation #9231
Conversation
0625c71 to
1877fc9
Compare
- 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
1877fc9 to
2dc27a5
Compare
packages/eui/src/components/date_picker/super_date_picker/super_date_picker.tsx
Outdated
Show resolved
Hide resolved
tkajtoch
left a comment
There was a problem hiding this 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!
|
Code changes look great! I'll give the stories another go when they build, and we should be good to go 🎉 |
💚 Build SucceededHistory
cc @mgadewoll |
tkajtoch
left a comment
There was a problem hiding this 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 💯
💚 Build Succeeded
History
cc @mgadewoll |
Summary
This PR adds a tiny fix to the pretty format button in
EuiSuperDatePickerto ensure the text can be truncated if not enough space is available.The underlying
EuiFormControlButtonhas truncation by default for thevalueprop, but if custom content is passed viachildren, 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 #
Impact to users
🟢 There are no code changes required on consumer side.
ℹ️ Due to the updated DOM structure, snapshot tests might require updates.
QA
superDatePickerShowDatesButton) is correctly truncatedGeneral checklist
@defaultif default values are missing) and playground toggles