-
Notifications
You must be signed in to change notification settings - Fork 842
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
Misc fixes #473
Misc fixes #473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I just had a couple minor comments.
CHANGELOG.md
Outdated
@@ -1,6 +1,8 @@ | |||
# [`master`](https://github.com/elastic/eui/tree/master) | |||
|
|||
No public interface changes since `0.0.25`. | |||
- Don't propagate a null `onClick` on EuiPanels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add links to this PR in these notes, like in the other notes?
CHANGELOG.md
Outdated
@@ -1,6 +1,8 @@ | |||
# [`master`](https://github.com/elastic/eui/tree/master) | |||
|
|||
No public interface changes since `0.0.25`. | |||
- Don't propagate a null `onClick` on EuiPanels | |||
- Use 1.1px for the default horizontal line height, in order to work around |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change "default horizontal line height" to "EuiHorizontalRule height"?
src/components/panel/panel.js
Outdated
className: classes | ||
} | ||
|
||
// Avoid passing down this props if is hasn't been supplied, in order to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a couple typos here: "props" -> "prop" and "is" -> "it"
src/components/panel/panel.js
Outdated
|
||
// Avoid passing down this props if is hasn't been supplied, in order to | ||
// avoid noise in snapshots. | ||
if (onClick != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried checking out master
and updating the test for this component to use shallow
and mount
, in an effort to reproduce the problem we're fixing here. But I wasn't able to generate a snapshot with an onClick
printed out. Where are you encountering this issue?
@pugnascotia Can someone show me where you're seeing the 1px thing? I'd love to replicate it so I can find the root cause. Setting it to 1.1px seems pretty hacky and I'm sure there's something else at play that's causing it. |
This works around strange Chrome height calculations.
@cjcenizal I've made the fixes you pointed out. Re: testing, the issue shows up if you're using @snide I don't have a demo to hand, but I'll be working in that area again soon, so I'll unapply the local fix and see what I can pass to you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying @pugnascotia! LGTM.
onClick
on EuiPanels. This helps avoid noise in Jest snapshots.