-
Notifications
You must be signed in to change notification settings - Fork 121
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
fix(theme): fix grid position check #373
Conversation
Update grid type check and update util naming closes elastic#372
Codecov Report
@@ Coverage Diff @@
## master #373 +/- ##
==========================================
+ Coverage 98.27% 98.27% +<.01%
==========================================
Files 38 38
Lines 2782 2784 +2
Branches 657 657
==========================================
+ Hits 2734 2736 +2
Misses 44 44
Partials 4 4
Continue to review full report at Codecov.
|
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.
LGTM, indeed it was flipped and it fixes it, merge away once it passes and ticks are filled
@@ -638,10 +638,10 @@ export function isVerticalAnnotationLine(isXDomainAnnotation: boolean, isHorizon | |||
export function getAnnotationLineTooltipXOffset(chartRotation: Rotation, axisPosition: Position): number { | |||
let xOffset = 0; | |||
|
|||
const isHorizontalAxis = isHorizontal(axisPosition); | |||
const isHorizontal = isHorizontalAxis(axisPosition); |
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.
Super minor, don't bother if this would be the only code change suggestion: as it's a single-use value, whose name is similar to the name of the function, might as well be inlined as if(isHorizontalAxis(axisPosition))
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.
Great point, I was unsure about the naming. Fixed in 33477f7
@@ -538,7 +538,7 @@ export function getAxesSpecForSpecId(axesSpecs: Map<AxisId, AxisSpec>, groupId: | |||
if (axisSpec.groupId !== groupId) { | |||
continue; | |||
} | |||
if (isVertical(axisSpec.position)) { | |||
if (isVerticalAxis(axisSpec.position)) { |
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.
like here 😃
🎉 This PR is included in version 12.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [12.0.1](elastic/elastic-charts@v12.0.0...v12.0.1) (2019-09-12) ### Bug Fixes * **theme:** fix grid position check ([opensearch-project#373](elastic/elastic-charts#373)) ([cf4464f](elastic/elastic-charts@cf4464f)), closes [opensearch-project#372](elastic/elastic-charts#372)
Summary
Update grid type check and update util naming
closes #372
Checklist