[Visualize] Shim with local application service#49891
[Visualize] Shim with local application service#49891maryia-lapata merged 180 commits intoelastic:masterfrom
Conversation
💔 Build Failed |
💚 Build Succeeded |
flash1293
left a comment
There was a problem hiding this comment.
This looks good to me, tested in Chrome and everything seems to work as expected
| this.handler.update(this.expression, expressionParams); | ||
| } | ||
|
|
||
| this.vis.emit('apply'); |
There was a problem hiding this comment.
@ppisljar is this the right place to notify the app about changes going on in the embeddable? not super familiar with the control flow here
There was a problem hiding this comment.
@ppisljar is OOO for a while now.
I'm going to take over this, lets take a look together and try to figure this out.
💚 Build Succeeded |
crob611
left a comment
There was a problem hiding this comment.
Visualizations still work great when embedded in Canvas. 👍
# Conflicts: # src/legacy/core_plugins/kibana/public/visualize/editor/editor.js # src/legacy/core_plugins/kibana/public/visualize/kibana_services.ts
lizozom
left a comment
There was a problem hiding this comment.
Tested and working on Ubuntu / Chrome
However, I don't get why we in some places the getServices() pattern in removed this PR and replaced by passing down dependencies explicitly.
src/legacy/core_plugins/kibana/public/visualize/embeddable/get_index_pattern.ts
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/visualize/embeddable/get_index_pattern.ts
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable_factory.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/visualize/embeddable/visualize_embeddable_factory.tsx
Outdated
Show resolved
Hide resolved
| }); | ||
| instance.start(npStart.core, { | ||
| ...npStart.plugins, | ||
| data, |
There was a problem hiding this comment.
index patterns were moved to NP already, so I think you can use only the NP version of data plugin (and call it plainly data)
There was a problem hiding this comment.
I think you can delete both npData and data from this list.
data is defined when you deconstruct plugins
src/legacy/core_plugins/kibana/public/visualize/listing/visualize_listing.js
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/visualize/global_state_sync.ts
Outdated
Show resolved
Hide resolved
| this.handler.update(this.expression, expressionParams); | ||
| } | ||
|
|
||
| this.vis.emit('apply'); |
There was a problem hiding this comment.
@ppisljar is OOO for a while now.
I'm going to take over this, lets take a look together and try to figure this out.
# Conflicts: # src/legacy/core_plugins/kibana/public/visualize/editor/editor.js # src/legacy/core_plugins/kibana/public/visualize/index.js
|
@lizozom thank you for the comments. |
src/legacy/core_plugins/kibana/public/visualize/kibana_services.ts
Outdated
Show resolved
Hide resolved
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Add dashboard updates * Use I18nProvider instead of I18nContext * remove unused dependencies * Centralizing and cleaning up legacy imports * Fix merge conflict * fix merge bugs and rename main dynamic entrypoint * Rename app to legacy_app * Clear deps * fix jest tests * fix saved object finder bug * Fix unit tests * Ignore TS * revert using stateless component for this PR * fix types * Fix merge conflicts * Update deps * Revert filter bar export * Revert ts-ignore * Clean up * Refactoring * Fix test * Remove global_state_sync * Refactoring * Remove uiExports/embeddableFactories * Trigger digest cycle in local angular when vis is changed. * Fix TS * Revert back syncOnMount * Add missed import * Revert import 'uiExports/embeddableFactories' * Update app navigation func test * Update app navigation func test * Update app navigation func test * Remove 'kibana-install-dir' arg in pluginFunctionalTestsRelease * Fix review comments * Fix code review comments * Rename alias * Fix indexPatterns * Use IndexPatternsContract interface
Summary
Shims Visualize plugin and uses local angular instance instead of references to global angular to be able to move this to the new platform without getting rid of angular first.
I didn't touch
embeddableandsaved_visualizationssince they will be moved. For this reason centralizing dependencies forembeddablewas reverted.