-
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: react/redux issue with specParser #723
Conversation
- update react versions to ^16.3.0 - add redux middleware for debugging - add broken code example to playground
One possible fix is the following:
specs: {
...state.specs,
[DEFAULT_SETTINGS_SPEC.id]: state.specs[DEFAULT_SETTINGS_SPEC.id] ?? DEFAULT_SETTINGS_SPEC,
},
specsInitialized: false,
chartRendered: false, This should solve the issue without causing any major problem on our current "parsing" mechanism |
- remove specParsing action and reducer - move default settings spec into parsed reducer - add tests for spec swapping with different ids - fix unit tests based on changes
Codecov Report
@@ Coverage Diff @@
## master #723 +/- ##
==========================================
- Coverage 74.80% 74.23% -0.58%
==========================================
Files 265 267 +2
Lines 8541 8588 +47
Branches 1714 1732 +18
==========================================
- Hits 6389 6375 -14
- Misses 2099 2161 +62
+ Partials 53 52 -1
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
🎉 This PR is included in version 19.6.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This commit reset the chart state to not initialized when removing a spec. After elastic#723 PR that reduced the number of steps on the state machine when parsing, the removeSpec action wasn't accounted on that refactoring causing side effects when removing/switching a spec on the chart configuration due to the state being in an wrong status. fix elastic#738
This commit reset the chart state to not initialized when removing a spec. After #723 PR that reduced the number of steps on the state machine when parsing, the removeSpec action wasn't accounted on that refactoring causing side effects when removing/switching a spec on the chart configuration due to the state being in an wrong status. fix #738
# [19.8.0](v19.7.0...v19.8.0) (2020-07-06) ### Bug Fixes * set uninitialized state when removeSpec action is called ([#739](#739)) ([35b8caf](35b8caf)), closes [#723](#723) [#738](#738) ### Features * **annotation:** enable marker positioning on LineAnnotation ([#737](#737)) ([ab5e413](ab5e413)), closes [#701](#701) * add custom annotation tooltip ([#727](#727)) ([435c67c](435c67c))
## [19.6.2](elastic/elastic-charts@v19.6.1...v19.6.2) (2020-06-29) ### Bug Fixes * react/redux issue with specParser ([opensearch-project#723](elastic/elastic-charts#723)) ([ee0aba3](elastic/elastic-charts@ee0aba3)), closes [opensearch-project#720](elastic/elastic-charts#720)
# [19.8.0](elastic/elastic-charts@v19.7.0...v19.8.0) (2020-07-06) ### Bug Fixes * set uninitialized state when removeSpec action is called ([opensearch-project#739](elastic/elastic-charts#739)) ([9c49c90](elastic/elastic-charts@9c49c90)), closes [opensearch-project#723](elastic/elastic-charts#723) [opensearch-project#738](elastic/elastic-charts#738) ### Features * **annotation:** enable marker positioning on LineAnnotation ([opensearch-project#737](elastic/elastic-charts#737)) ([2fa5a0b](elastic/elastic-charts@2fa5a0b)), closes [opensearch-project#701](elastic/elastic-charts#701) * add custom annotation tooltip ([opensearch-project#727](elastic/elastic-charts#727)) ([f03d566](elastic/elastic-charts@f03d566))
Summary
Fixes #720