Skip to content
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

Added euiTextBreakWord mixin to the euiTitle mixin #5107

Merged
merged 5 commits into from
Aug 30, 2021

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Aug 30, 2021

Closes #5105

Ensures that anywhere we use the title mixin to create titles, it will break on really long words if need be. This doesn’t affect those that use it with truncation.

Screen Shot 2021-08-28 at 18 21 14 PM

Testing

I've also pushed a REVERT ME commit that adds a really long string to the end of content that uses the mixin to test all the usages.

Found breaks with fixes

EuiTable header cell wasn't using the full `euiTextTruncate` mixin

This was a really old style, before we had the mixin, where there title mixin was used at more parent element than the truncation mixin. But there was a style that was applying nowrap at the same level, which I just changed to the whole euiTextTruncate mixin.

Before
Screen Shot 2021-08-28 at 18 15 27 PM

After
Screen Shot 2021-08-28 at 18 16 16 PM


Added `euiTextTruncate` mixin to EuiFormLabel

It doesn't actually use the euiText mixin, but I saw it was only getting the word-wrap when used in a horizontal form row. I've moved it to apply to ALL form row labels.

Before
Screen Shot 2021-08-28 at 18 08 13 PM

After
Screen Shot 2021-08-28 at 18 08 59 PM


Known breaks that need a follow up

EuiHeader has general truncation/max-width control issues. #5110 Screen Shot 2021-08-28 at 17 58 30 PM
EuiCallOut and EuiToast's left alignment isn't great #5111 Screen Shot 2021-08-28 at 18 21 41 PM Screen Shot 2021-08-28 at 18 25 16 PM
Should EuiTour max it's width? #5112 Screen Shot 2021-08-28 at 18 26 22 PM

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox

- [ ] Props have proper autodocs and playground toggles
- [ ] Added documentation
- [ ] Checked Code Sandbox works for the any docs examples
- [ ] Added or updated jest tests
- [ ] Checked for breaking changes and labeled appropriately
- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately
  • Revert test commit

cchaos added 3 commits August 28, 2021 17:54
Closes elastic#5105
Ensures that anywhere we use the title mixin to create titles, it will break on really long words if need be. This doesn’t affect those that use it with truncation.
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5107/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5107/

Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

This looks great to me! Love the simplification/DRYness and Enterprise Search definitely would've loved this! 🎉

@cchaos
Copy link
Contributor Author

cchaos commented Aug 30, 2021

I've moved all those "known bugs" to respective issues and I'll now revert the testing commit.

This reverts commit 8ccb36f.
@cchaos cchaos enabled auto-merge (squash) August 30, 2021 18:39
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5107/

@cchaos cchaos merged commit 97bdc46 into elastic:master Aug 30, 2021
@cchaos cchaos deleted the fix/title_breakword branch August 30, 2021 19:34
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.

[EuiCallOut] Title does not wrap long text
3 participants