Skip to content

[Visualize] Shim with local application service#49891

Merged
maryia-lapata merged 180 commits intoelastic:masterfrom
maryia-lapata:vis-shim
Dec 10, 2019
Merged

[Visualize] Shim with local application service#49891
maryia-lapata merged 180 commits intoelastic:masterfrom
maryia-lapata:vis-shim

Conversation

@maryia-lapata
Copy link
Contributor

@maryia-lapata maryia-lapata commented Oct 31, 2019

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 embeddable and saved_visualizations since they will be moved. For this reason centralizing dependencies for embeddable was reverted.

flash1293 and others added 30 commits October 18, 2019 09:24
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

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');
Copy link
Contributor

Choose a reason for hiding this comment

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

@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

Copy link
Contributor

Choose a reason for hiding this comment

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

@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.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@crob611 crob611 left a comment

Choose a reason for hiding this comment

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

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
Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

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.

});
instance.start(npStart.core, {
...npStart.plugins,
data,
Copy link
Contributor

Choose a reason for hiding this comment

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

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)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can delete both npData and data from this list.
data is defined when you deconstruct plugins

this.handler.update(this.expression, expressionParams);
}

this.vis.emit('apply');
Copy link
Contributor

Choose a reason for hiding this comment

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

@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
@maryia-lapata
Copy link
Contributor Author

@lizozom thank you for the comments.
The visualize embeddables will be moved out of visualize soon. That's why I reverted usage of kibana_services for the embeddable folder.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

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

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

LGTM

@maryia-lapata maryia-lapata merged commit 33989b0 into elastic:master Dec 10, 2019
@maryia-lapata maryia-lapata deleted the vis-shim branch December 10, 2019 10:51
maryia-lapata added a commit that referenced this pull request Dec 10, 2019
* 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
@sulemanof sulemanof mentioned this pull request Dec 19, 2019
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported Feature:NP Migration Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.6.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants