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

[Canvas] Only fire appState changes when there is a change #56183

Merged
merged 2 commits into from
Jan 30, 2020

Conversation

crob611
Copy link
Contributor

@crob611 crob611 commented Jan 28, 2020

Summary

Fixes #55916

There was a bug where, if any of the app state values were set, certain actions that would cause a page navigation (such as adding a new page) would throw an error.

The root of this error was that on route change, our router component would potentially dispatch a redux action. In the context of adding a page, this would occur while the addPage action was still in the reducer, which is not allowed.

The fix here is to not dispatch those actions if the appState already matches what is in the store.

Summarize your PR. If it involves visual changes include a screenshot or gif.

@crob611 crob611 added review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort v8.0.0 release_note:skip Skip the PR/issue when compiling release notes impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. v7.5.0 v7.7.0 v7.6.0 labels Jan 28, 2020
@crob611 crob611 requested a review from a team as a code owner January 28, 2020 16:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas (Team:Canvas)

Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and worked great. Bonus points for typescript conversion 🎉

@crob611
Copy link
Contributor Author

crob611 commented Jan 30, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@crob611 crob611 merged commit 349851c into elastic:master Jan 30, 2020
crob611 pushed a commit to crob611/kibana that referenced this pull request Jan 30, 2020
crob611 pushed a commit to crob611/kibana that referenced this pull request Jan 30, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 31, 2020
* master: (53 commits)
  Fix setting filters without $store value (elastic#56304)
  kuery_autocomplete -> convert remaining items to TS/Jest (elastic#56316)
  [Reporting] New Platform: moves most of our libs/constants and utils to np shims (elastic#55935)
  [reporting] remove a legacy cross-plugin import (elastic#56354)
  [DOCS] Updates example in Timelion doc (elastic#56444)
  [APM] Service map center button (elastic#56434)
  [skip-ci] Add example for migrating pre-handlers (elastic#56080)
  [ML] Fix Data Visualizer responsive layout  (elastic#56372)
  Add missing docker settings (elastic#56411)
  [Endpoint] Add Endpoint Details route (elastic#55746)
  chore(NA): delete data/optimize with kbn clean (elastic#55890)
  System index templates can't be edited (elastic#55229)
  Sync badge (elastic#55113)
  Only fire appState changes when there is a change (elastic#56183)
  Import appropriate files to setup plugin system at the correct time (elastic#55956)
  [Monitoring] Change all configs to `monitoring.*` (elastic#56215)
  [ML] conditional rison encoding for query params (elastic#56380)
  Move tsvb server to new platform (elastic#55310)
  exclude tutorial resources from code ownership (elastic#55987)
  [Watcher] Follow up on flaky functional test (elastic#56384)
  ...
crob611 pushed a commit that referenced this pull request Jan 31, 2020
Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
crob611 pushed a commit that referenced this pull request Jan 31, 2020
Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v7.5.0 v7.6.0 v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot add a new page to canvas workpad
4 participants