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

Embeddable API V2 #37510

Merged

Conversation

stacey-gammon
Copy link
Contributor

This is all the new code for the new Actionable Embeddable API. It does not switch any code over to actually using it. It is possible, see #35622 for proof, but putting it all together creates a giant PR, so stage 1 will be checking this new code in, currently unused except for the sample plugin that is functionally tested. Jest tests are included as well.

To run the sample plugin, start via:

yarn start --plugin-path test/plugin_functional/plugins/kbn_tp_embeddable_explorer

Then navigate to the Embeddable Explorer app.

Screen Shot 2019-05-30 at 11 01 27 AM

Jest test coverage numbers:

Screen Shot 2019-05-30 at 11 07 36 AM

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@stacey-gammon stacey-gammon force-pushed the 2019-05-30-embeddable-api-plugin branch 3 times, most recently from cc8eb7c to 13fe695 Compare May 30, 2019 18:19
@stacey-gammon stacey-gammon force-pushed the 2019-05-30-embeddable-api-plugin branch from 13fe695 to 3ab2f83 Compare May 30, 2019 18:54
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon force-pushed the 2019-05-30-embeddable-api-plugin branch from 92ae180 to 8471233 Compare May 30, 2019 22:31
@elastic elastic deleted a comment from elasticmachine May 30, 2019
@elastic elastic deleted a comment from elasticmachine May 30, 2019
@elastic elastic deleted a comment from elasticmachine May 30, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon
Copy link
Contributor Author

The mere existence of my sample plugin somehow causes other functional plugin tests to fail, but only on jenkins, it works fine locally.

             └- ✖ fail: "app plugins app navigation "before all" hook"

I will have to dig deeper to see what exactly is causing the issue.

@stacey-gammon stacey-gammon force-pushed the 2019-05-30-embeddable-api-plugin branch from 84fac68 to e2d0859 Compare May 31, 2019 01:27
@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon stacey-gammon force-pushed the 2019-05-30-embeddable-api-plugin branch from e2d0859 to 64e2c03 Compare May 31, 2019 02:53
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@stacey-gammon stacey-gammon force-pushed the 2019-05-30-embeddable-api-plugin branch from b0446bf to df48ee9 Compare May 31, 2019 15:45
@stacey-gammon
Copy link
Contributor Author

can someone from @elastic/kibana-operations look at the changes I did to get rxjs working with multiple bundles. @spalger maybe?

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

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

Thanks for addressing review comments so quickly, would like to see tests pass but otherwise LGTM.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon
Copy link
Contributor Author

Retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

LGTM

@ppisljar
Copy link
Member

ppisljar commented Jun 7, 2019

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@stacey-gammon
Copy link
Contributor Author

maps sample data test has failed a couple times in this PR and in a typescript one.

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

src/setup_node_env/index.js Outdated Show resolved Hide resolved
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@stacey-gammon stacey-gammon merged commit bd48439 into elastic:master Jun 7, 2019
@stacey-gammon stacey-gammon added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes backport pending labels Jun 10, 2019
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Jun 10, 2019
* Embeddable API plugin

* Expose new embeddableActions uiExport endpoint

* Add missing getInjectedUIAppVars to Server type

* Add jest tests

* Most basic skeleton of the sample plugin to see if it still kills ci

* strip even more out to see if it passes ci

* It passed, put back init fn

* add back in a uiExport to see if that is what is killing ci

* Passed again, add back embeddableActions uiExports and require kibana line

* Add everything back but the sass import

* Found two bugs with customize panel title action, added jest test coverage and fixes

* Functionally test embeddable explorer plugin

* Addressing review feedback part 1

* Simplify action context menu - remove support for nested actions/child panels, which was never exposed anyway.

* More review feedback

* Spread out orders to let developers inject their own actions in the middle.

* Remove check for overwriting ApplyFilterAction

* use createRegistry for EmbeddableFactoryRegistry

* Add comment for getInheritedInput

* Use kbn-es-query Filter types

* Fix missed file after createRegistry switch over for EmbeddableFactoryRegistry

* Use delete instead of setting to undefined

* upgrade EUI to match kibana version

* Add getIsContainer on base embeddable class

* Run functional tests of sample plugin

* move all tests classes outside __test__ and inside test_samples folder so not to potentially create issues with mocha

* fix: 🐛 remove unused imports

* fix: 🐛 set to undefined explicitly

* chore: refactored getRoot functionality

* fix: refactor miss from folder rename __test__ -> test_samples

* fix: add eui switch to let the user indicate “hide this title” to improve ux.

* fix: customize panel flout test

* Try to fix issue with multiple rxjs bundles I hit before.

See ReactiveX/rxjs#3828

* Use an rxjs polyfill to work around the issue of multiple rxjs bundles

* chore: change customize panel flyout to modal post design feedback

* capitalize Reset

* fix: type errors in customize panel modal

* fix: remove extra line added to prevent EUICallout overflow from spilling over panel edges

The bug this was intended to fix doesn’t appear yet because dashboard isn’t using this, and it causes other issues, so for now, just remove.

* Clean up some classes and SASS

* Inline styles needed to get the containers to take up the full height of the app.

* Use the same old style of error messaging in panels

* chore: add untilEmbeddableLoaded tests, expose on interface, and use in embeddable_child_panel

* Remove unused styles, add padding

* Verify trigger Context containers an array of Filters for apply filter action

* Remove panel.embeddableId param, use panel.explicitInput.id instead

* Check `isCompatible` as well as the type guard needed for typescript.

* executeTriggerActions should account for getHref

* Remove unnecessary check for context being defined

* use npStart instead of getNewPlatform

* Conform to latest NP changes

* Use new np_mocks in all the tests

* Address review feedback on rxjs polyfill
stacey-gammon added a commit that referenced this pull request Jun 10, 2019
* Embeddable API plugin

* Expose new embeddableActions uiExport endpoint

* Add missing getInjectedUIAppVars to Server type

* Add jest tests

* Most basic skeleton of the sample plugin to see if it still kills ci

* strip even more out to see if it passes ci

* It passed, put back init fn

* add back in a uiExport to see if that is what is killing ci

* Passed again, add back embeddableActions uiExports and require kibana line

* Add everything back but the sass import

* Found two bugs with customize panel title action, added jest test coverage and fixes

* Functionally test embeddable explorer plugin

* Addressing review feedback part 1

* Simplify action context menu - remove support for nested actions/child panels, which was never exposed anyway.

* More review feedback

* Spread out orders to let developers inject their own actions in the middle.

* Remove check for overwriting ApplyFilterAction

* use createRegistry for EmbeddableFactoryRegistry

* Add comment for getInheritedInput

* Use kbn-es-query Filter types

* Fix missed file after createRegistry switch over for EmbeddableFactoryRegistry

* Use delete instead of setting to undefined

* upgrade EUI to match kibana version

* Add getIsContainer on base embeddable class

* Run functional tests of sample plugin

* move all tests classes outside __test__ and inside test_samples folder so not to potentially create issues with mocha

* fix: 🐛 remove unused imports

* fix: 🐛 set to undefined explicitly

* chore: refactored getRoot functionality

* fix: refactor miss from folder rename __test__ -> test_samples

* fix: add eui switch to let the user indicate “hide this title” to improve ux.

* fix: customize panel flout test

* Try to fix issue with multiple rxjs bundles I hit before.

See ReactiveX/rxjs#3828

* Use an rxjs polyfill to work around the issue of multiple rxjs bundles

* chore: change customize panel flyout to modal post design feedback

* capitalize Reset

* fix: type errors in customize panel modal

* fix: remove extra line added to prevent EUICallout overflow from spilling over panel edges

The bug this was intended to fix doesn’t appear yet because dashboard isn’t using this, and it causes other issues, so for now, just remove.

* Clean up some classes and SASS

* Inline styles needed to get the containers to take up the full height of the app.

* Use the same old style of error messaging in panels

* chore: add untilEmbeddableLoaded tests, expose on interface, and use in embeddable_child_panel

* Remove unused styles, add padding

* Verify trigger Context containers an array of Filters for apply filter action

* Remove panel.embeddableId param, use panel.explicitInput.id instead

* Check `isCompatible` as well as the type guard needed for typescript.

* executeTriggerActions should account for getHref

* Remove unnecessary check for context being defined

* use npStart instead of getNewPlatform

* Conform to latest NP changes

* Use new np_mocks in all the tests

* Address review feedback on rxjs polyfill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport pending release_note:skip Skip the PR/issue when compiling release notes v7.3.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants