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

More EuiPanel options #4504

Merged
merged 11 commits into from
Feb 18, 2021
Merged

More EuiPanel options #4504

merged 11 commits into from
Feb 18, 2021

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Feb 9, 2021

Final 🤞 Updates to EuiPanel

1. Added all the color options to the default theme

Before, the only color options the default theme respected were plain, and subdued. Now it supports all the other colors by also forcing all the non-plain options to remove the border and shadow.

2. Added hasBorder prop

This is mainly to allow the Amsterdam theme, which by default does not include a border, to allow borders. This helps reduce the shadow within shadow issues.

There is some heavy handed allowance of combinations of these props (by ignoring certain props) on purpose because they just don't do well with each other. I've added a callout to the docs to try to get ahead of this and communicate it specifically.

Screen Shot 2021-02-09 at 15 06 16 PM

I also changed the name of one of the classes hence the updates to lots of snaps.

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

@cchaos cchaos changed the title Props/panels More EuiPanel options Feb 9, 2021
@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

@kibanamachine
Copy link

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

Copy link
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.

Tested in Chrome, Safari, Firefox, and, Edge and I looked at the code. It LGTM! 🎉

The hasBorder prop is a great new option for Amsterdam. The shadow was creating a lot of distraction in a few scenarios. One example is the icons doc page. What do you think of changing the panels to have hasBorder={true}?

icons@2x

I also created a PR cchaos#42 with an idea to solve the hasBorder={true} example. Let me know what you think.

Panel with border only for amsterdam theme
@kibanamachine
Copy link

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

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

❤️ LGTM! Pulled and [over-] tested locally

@cchaos
Copy link
Contributor Author

cchaos commented Feb 18, 2021

Yeah I didn't want to overbloat this PR with more panel usage changes. We can do an audit of our docs usages in a different PR. Maybe in #4449

@kibanamachine
Copy link

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

@cchaos cchaos merged commit 1297cd4 into elastic:master Feb 18, 2021
@cchaos cchaos deleted the props/panels branch February 18, 2021 20:39
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.

4 participants