-
Notifications
You must be signed in to change notification settings - Fork 122
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
docs: fix filterSeriesInTooltip predicate #552
Conversation
Codecov Report
@@ Coverage Diff @@
## master #552 +/- ##
==========================================
+ Coverage 71.49% 71.49% +<.01%
==========================================
Files 208 208
Lines 6118 6119 +1
Branches 1169 1169
==========================================
+ Hits 4374 4375 +1
Misses 1727 1727
Partials 17 17
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, finally, has this day actually come where we remove all getXXXId
??
Side note: I think we should have a react linting rule in place for string and boolean props, what do you think?
// bad
id={'bottom'}
// good
id="bottom"
// bad
showLegend={true}
// good
showLegend
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 also remove the function definitions and make this a breaking change with the tooltip logic? That would finish this once and for all.
elastic-charts/src/utils/ids.ts
Lines 1 to 17 in 2242fca
export function getGroupId(id: string): string { | |
return id; | |
} | |
export function getAxisId(id: string): string { | |
return id; | |
} | |
export function getSpecId(id: string): string { | |
return id; | |
} | |
export function getAnnotationId(id: string): string { | |
return id; | |
} | |
export type GroupId = string; | |
export type AxisId = string; | |
export type SpecId = string; | |
export type AnnotationId = string; |
@nickofthyme Sure will do, I will open up a PR for this
@rshen91 do you want to include also this eslint rule on your PR? |
Summary
This PR fix a small bug on storybook (story
BarChart - 2y1g
) where an example was using a wrong FilterPredicate on thefilterSeriesInTooltip
props.I've also took the opportunity of this PR to remove all the
getSpecId
andgetAxisId
calls as they are no longer neededChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] Any consumer-facing exports were added tosrc/index.ts
(and stories only import from../src
except for test data & storybook)[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Unit tests were updated or added to match the most common scenarios