-
Notifications
You must be signed in to change notification settings - Fork 829
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
Add titleSize prop to EuiStep #3340
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3340/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3340/ |
Great start @andreadelrio! I've removed the strikethrough on some PR checklist items that really should be checked/added since this changes the visuals. For instance, mobile should really be checked. In the docs example you add, I'd write it like a guideline suggesting particular sizes are better than others. Other things to consider:
|
@cchaos I actually haven't added an example but I will 🙂
This did cross my mind. I think it'd be useful but what to do if they set
I think we could exclude the largest and smallest sizes from the options. For all the other sizes, I would think consumers would adjust the size of the body accordingly. This led me to another thought, would it make sense to add another size for steps (the circle + number)? I'm thinking of 1 more size. I'd look something like this |
The lower level prop, the one on
Would the EuiStep automatically resize the EuiStepNumber based on |
@cchaos I think that for flexibility, consumers would pass it manually. Maybe they want smaller titles and smaller circles but maybe they just want smaller titles. In the use case we had, steps were inside a medium flyout so smaller steps would have been nice but I don't think that will always be the case. |
Hmmm, I think this is where flexibility and out-of-the-box good design will clash. I think it's ok for us to make a judgement call that says, "Hey, we are allowing you to change the title size, which allows you to place this at the prominence and hierarchical level that you need, but we're going to make some decisions around how that affects the overall sizing of the elements within." I think your intuition of needing to adjust the step size with the smaller titles is correct and I would lean towards making it automatic. That way consumers don't also have to think about matching one-to-one since I don't see a very good used case for having mismatched numbers to titles. |
6e92c16
to
3568f96
Compare
@cchaos I think that finding the right balance between flexibility and good design can be tricky. I do see how it'd make sense for us to ensure good out-of-the-box design with smaller titles so I went in this direction: title sizes ( Adjusted icons for status when title is Note: there's a couple of TS doubts that came up that I'll try to clear up with @thompsongl tomorrow. Mainly I wanted to name the prop the same for |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3340/ |
Changing `parentTitleSize` to `titleSize`
@cchaos I updated the example to get rid of any mention of |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3340/ |
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.
Awesome, so close! Just a few more comments, but really just nit-picky at this point.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3340/ |
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.
🎉 Fantastic! LGTM! I would just make sure to do a quick pass in IE, Firefox, and Safari to make sure they're still good as well.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3340/ |
Summary
Add
titleSize
prop toEuiStep
to allow for custom title sizes.Fixes #3324
Checklist
- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes