-
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(line_annotation): keep the spec in state after chart rerender #605
fix(line_annotation): keep the spec in state after chart rerender #605
Conversation
The `LineAnnotation` component doesn't use the `specComponentFactory` because it render the marker if available. We have to always keep the spec updating the state on every lifecycle thus removing the deepEqual check on the shouldComponentUpdate did the trick. fix elastic#604
Codecov Report
@@ Coverage Diff @@
## master #605 +/- ##
=========================================
Coverage ? 70.79%
=========================================
Files ? 220
Lines ? 6409
Branches ? 1224
=========================================
Hits ? 4537
Misses ? 1853
Partials ? 19
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 with the couple of changes—deletion of the commented out sCU
and threashold->threshold
# [18.2.0](v18.1.0...v18.2.0) (2020-03-26) ### Bug Fixes * **line_annotation:** keep the spec in state after chart rerender ([#605](#605)) ([43c13f1](43c13f1)), closes [#604](#604) ### Features * **partition:** stroke configuration and linked label value font format ([#602](#602)) ([7dce0a3](7dce0a3))
🎉 This PR is included in version 18.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 18.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [18.2.0](elastic/elastic-charts@v18.1.0...v18.2.0) (2020-03-26) ### Bug Fixes * **line_annotation:** keep the spec in state after chart rerender ([opensearch-project#605](elastic/elastic-charts#605)) ([22296c6](elastic/elastic-charts@22296c6)), closes [opensearch-project#604](elastic/elastic-charts#604) ### Features * **partition:** stroke configuration and linked label value font format ([opensearch-project#602](elastic/elastic-charts#602)) ([24d0e71](elastic/elastic-charts@24d0e71))
Summary
The
LineAnnotation
component doesn't use thespecComponentFactory
because it render the markerif available. We have to always keep the spec updating the state on every lifecycle thus removing
the deepEqual check on the shouldComponentUpdate did the trick.
fix #604
Checklist
Delete any items that are not applicable to this PR.