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

Pass EuiSuperSelect's popoverClassName to the popover's panel #2068

Merged
merged 3 commits into from
Jun 20, 2019

Conversation

zumwalt
Copy link
Contributor

@zumwalt zumwalt commented Jun 20, 2019

Summary

This PR passes EuiSuperSelect's popoverClassName to the popover's panel if it exists. This change will make it easier to target elements within the popover panel via CSS selectors.

Checklist

  • [ ] This was checked in mobile
  • [ ] This was checked in IE11
  • [ ] This was checked in dark mode
  • [ ] Any props added have proper autodocs
  • [ ] Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • [ ] This was checked for breaking changes and labeled appropriately
  • [ ] Jest tests were updated or added to match the most common scenarios
  • [ ] This was checked against keyboard-only and screenreader scenarios
  • [ ] This required updates to Framer X components

@zumwalt zumwalt force-pushed the zumwalt/super-select-panel-classname branch from c9d2a57 to 7e0748d Compare June 20, 2019 19:42
@@ -176,6 +176,10 @@ export class EuiSuperSelect extends Component {
popoverClassName
);

const popoverPanelClasses = classNames('euiSuperSelect__popoverPanel', {
[`${popoverClassName}__popoverPanel`]: !!popoverClassName,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the brackets necessary? Shouldn't it just be:

Suggested change
[`${popoverClassName}__popoverPanel`]: !!popoverClassName,
`${popoverClassName}__popoverPanel`: !!popoverClassName,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, I guess this is the first time we've used this pattern. 👍

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

LGTM, though is there something you're trying to "fix" about the popover panel that this allows you to do? I know this component is super buggy, so just wondering if we need to be aware of something or need an issue.

@zumwalt
Copy link
Contributor Author

zumwalt commented Jun 20, 2019

No, not trying to fix anything with this, we just need it for some ill-advised theming 😭

@cchaos
Copy link
Contributor

cchaos commented Jun 20, 2019

Got it. Whew... 😉

@zumwalt zumwalt merged commit 82f22d8 into elastic:master Jun 20, 2019
@zumwalt zumwalt deleted the zumwalt/super-select-panel-classname branch June 20, 2019 21:00
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.

2 participants