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

Misc fixes #473

Merged
merged 3 commits into from
Mar 13, 2018
Merged

Misc fixes #473

merged 3 commits into from
Mar 13, 2018

Conversation

pugnascotia
Copy link
Contributor

  • Don't propagate a null onClick on EuiPanels. This helps avoid noise in Jest snapshots.
  • Use 1.1px for the default horizontal line height, in order to work around strange Chrome height calculations.

Copy link
Contributor

@cjcenizal cjcenizal left a 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
Copy link
Contributor

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

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"?

className: classes
}

// Avoid passing down this props if is hasn't been supplied, in order to
Copy link
Contributor

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"


// Avoid passing down this props if is hasn't been supplied, in order to
// avoid noise in snapshots.
if (onClick != null) {
Copy link
Contributor

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?

@snide
Copy link
Contributor

snide commented Mar 8, 2018

@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.

@pugnascotia
Copy link
Contributor Author

@cjcenizal I've made the fixes you pointed out. Re: testing, the issue shows up if you're using react-test-renderer, which we do for a lot of tests in Cloud UI, but not with enzyme apparently.

@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.

Copy link
Contributor

@cjcenizal cjcenizal left a 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.

@pugnascotia pugnascotia merged commit 229de17 into elastic:master Mar 13, 2018
@pugnascotia pugnascotia deleted the misc-fixes branch March 13, 2018 16:04
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