Skip to content

[EuiEmptyPrompt] Remove grow from EuiPanel#5907

Merged
cchaos merged 2 commits intoelastic:mainfrom
cchaos:empty_prompt/fix_grow
May 18, 2022
Merged

[EuiEmptyPrompt] Remove grow from EuiPanel#5907
cchaos merged 2 commits intoelastic:mainfrom
cchaos:empty_prompt/fix_grow

Conversation

@cchaos
Copy link
Copy Markdown
Contributor

@cchaos cchaos commented May 18, 2022

Summary

In Kibana, we're using the shared No Data View empty prompt in a lot more locations. Because EuiPanel comes with grow=true by default and the prop has been excluded from EuiEmptyPrompt, it's been difficult to override this behavior when the prompt is placed in flex-direction: column containers (which is a lot in Kibana).

Screen Shot 2022-05-18 at 08 37 12 AM

I couldn't think of a scenario where we'd want the prompt to grow to fill it's container's height especially since the prompt's contents are centered in itself. So I just set grow=false directly in the component.

To test, you'll need to set flex-direction: column on a parent container.

Before
Screen Shot 2022-05-18 at 09 58 24 AM

After
Screen Shot 2022-05-18 at 09 58 49 AM

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
  • [ ] Updated the Figma library counterpart
  • A changelog entry exists and is marked appropriately

@cchaos cchaos requested a review from elizabetdev May 18, 2022 14:03
@kibanamachine
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

Tested in Chrome. A CL entry is missing.

@cchaos cchaos enabled auto-merge (squash) May 18, 2022 16:25
@kibanamachine
Copy link
Copy Markdown

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

@cchaos
Copy link
Copy Markdown
Contributor Author

cchaos commented May 18, 2022

Flakey?

Jenkins, test this

@kibanamachine
Copy link
Copy Markdown

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

@cchaos cchaos merged commit 8a6c1fc into elastic:main May 18, 2022
@cchaos cchaos deleted the empty_prompt/fix_grow branch May 18, 2022 18:30
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