[Discover] Migrate context AppState / GlobalState to use new app state helpers #57078
Conversation
…-07-context-new-app-state
This comment has been minimized.
This comment has been minimized.
|
Retest |
|
@elasticmachine merge upstream |
…om:kertal/kibana into kertal-pr-2020-02-07-context-new-app-state
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
…-07-context-new-app-state
…-07-context-new-app-state
|
Jenkins, test this ... last test ran into a timeout |
|
@elasticmachine merge upstream |
|
ACK. will review and test later today |
@flash1293 excellent catch! |
|
FYI @flash1293 @Dosant I managed to fix the problem @flash1293 reported, but I need to further investigate the app's behavior. Seems a missing |
src/legacy/core_plugins/kibana/public/discover/np_ready/angular/context.js
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/discover/np_ready/angular/context_state.ts
Outdated
Show resolved
Hide resolved
…-07-context-new-app-state
|
@flash1293 @Dosant @sulemanof Context was built around What I did is improve the code, remove state subscriptions (since: change of state => change of url => controller reload => reinitialize state), and add more tests. It's nice to write unit tests concerning state <-> url syncing. Hope this is fine now. |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Dosant
left a comment
There was a problem hiding this comment.
Code LGTM. Nice work!
I noticed an issue, similar to one I had in dashboard - #56284
Looks like 'state:storeInSessionStorage' doesn’t take effect for without full page reload.
It is likely caused by kbnStateStorage is created once when angular is initialised and then when you get back to Context App, it is not recreated with new 'state:storeInSessionStorage' value.
flash1293
left a comment
There was a problem hiding this comment.
Tested and works fine for me. Great work 🎉
…e helpers (elastic#57078) * Remove globalState, migrate to the new helpers * Remove appState, migrate to the new helpers * Add tests
|
@Dosant when I change |


Summary
Remove legacy
AppState&GlobalStatefrom Discover's Context application, replace with our shiny new state syncing utils #56479Testing
Check if changed settings in the URL are propagated to UI and vice versa, and whether reloading of data takes place.
Checklist
Delete any items that are not applicable to this PR.