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

[EuiDescriptionList] New gutterSize prop #6175

Merged
merged 15 commits into from
Aug 26, 2022

Conversation

breehall
Copy link
Contributor

@breehall breehall commented Aug 24, 2022

Summary

Fixes #5834

Creates the gutterSize prop for EuiDescriptionList which is responsible for adjusting vertical spacing between Description List elements. gutterSize accepts the t-shirt sizes s and m (default) to add a top margin to Description List elements. When no gutterSize is provided, size m is used by default.

Small gutterSize
image


Medium gutterSize
image

Checklist

  • Checked 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 any docs examples
  • Added or updated jest and cypress 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

@kibanamachine
Copy link

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

@breehall breehall marked this pull request as ready for review August 24, 2022 20:42
@breehall breehall marked this pull request as draft August 24, 2022 20:50
@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

@breehall breehall marked this pull request as ready for review August 25, 2022 15:07
Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM!
Just one suggestion

@cee-chen
Copy link
Contributor

cee-chen commented Aug 25, 2022

2 thoughts:

  1. Should gutterSize also affect the left/right padding on type="column" align="center" description lists?

  2. Should compressed DescriptionLists default to a gutterSize of s instead of m? If not / if we're OK with making people manually do compressed gutterSize="s", I think we should document gutterSize in the Centered and compressed section instead of creating a new section for it. It feels like it generally belongs in the concept of "further tailor[ing] the look of a description list" and does not need its own section.

PR otherwise looks great to me (esp tests!) CC @miukimiu for thoughts on the above

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
@breehall
Copy link
Contributor Author

Should gutterSize also affect the left/right padding on type="column" align="center" description lists?

I don't believe so because the prop is intended to be for vertical spacing only, but may I ask why it should?

Should compressed DescriptionLists default to a gutterSize of s instead of m?

Possibly, but I think it would affect current iterations of DescriptionList. I think I'd be ok with allowing consumers to make that decision on their own instead of us making it for them. But I'll wait for Elizabet to chime in.

@kibanamachine
Copy link

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

@cee-chen
Copy link
Contributor

I don't believe so because the prop is intended to be for vertical spacing only, but may I ask why it should?

That's not my personal intepretation of "gutter" - when I read "gutterSize", I would assume it applies the sizing to both horizontal and vertical gutters, not just vertical. That's how EuiFlexGroup works, for example. If we want to be extremely specific and only apply this change to vertical gutters, then we should name the prop accordingly, e.g. rowGutterSize.

I think I'd be ok with allowing consumers to make that decision on their own instead of us making it for them.

Same, but in that case, let's combine the Centered and compressed section/example with the new gutter example and name it something more generic Customizing appearance. It might also make sense to add toggles for all the props being demo'd in that section (compressed, align, and gutterSize).

@breehall
Copy link
Contributor Author

Ok, gotcha. So as far as current take aways:

  1. Update gutterSize prop name to be more specific (like `rowGutterSize)
  2. Combine DescriptionList appearance modifiers into one example

@cee-chen
Copy link
Contributor

I'd hang tight on 1. to see if @miukimiu thinks we're OK to apply the size change to the horizontal spacing as well as vertical, but you should be good to move ahead on 2.!

…criptionList example for the gutterSize, align, and compressed props.
…hall/eui into description-list/gutterSize

Pulling in latest code from description-list/gutterSize
@breehall
Copy link
Contributor Author

I updated the Centered & Compressed example to be Customizing Appearance. I've also added toggles for the align, compressed, and gutterSize props.

@kibanamachine
Copy link

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

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.

🎉 🎉 Love the UX for the new docs!! I'll open a follow-up issue for @miukimiu to consider when she gets back about gutterSize and the horizontal gutter.

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.

[EuiDescriptionList] Add option for vertical spacing
4 participants