Skip to content

More EuiPanel options - #4504

Merged
cchaos merged 11 commits into
elastic:masterfrom
cchaos:props/panels
Feb 18, 2021
Merged

cchaos merged 11 commits into
elastic:masterfrom
cchaos:props/panels

Conversation

@cchaos

@cchaos cchaos commented Feb 9, 2021 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@kibanamachine

Copy link
Copy Markdown
Contributor

@kibanamachine

Copy link
Copy Markdown
Contributor

Comment thread src/components/panel/panel.tsx Resolved
Comment thread src/components/panel/panel.tsx Resolved

@elizabetdev elizabetdev left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@chandlerprall chandlerprall left a comment •

Copy link
Copy Markdown
Contributor

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

cchaos commented Feb 18, 2021

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor

@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