-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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 cleanup #60207
Embeddable API cleanup #60207
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed changes include
- Renaming some interfaces (
IEmbeddableStart
-->EmbeddableStart
) - Using
EmbeddableStart['getEmbeddableFactory']
instead ofGetEmbeddableFactory
- Making
isEditable
async - Using embeddable setup contract instead of start
- Defining dashboard plugin's start dependecies
LGTM once green
const getStartServices = async () => { | ||
const [coreStart, deps] = await core.getStartServices(); | ||
|
||
const useHideChrome = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this is going to be re-used in visualize and discover.
Maybe we want to put this in kibana_react?
@@ -27,17 +27,19 @@ import { Embeddable } from './embeddable'; | |||
import { SavedObjectIndexStore, DOC_TYPE } from '../../persistence'; | |||
import { getEditPath } from '../../../../../../plugins/lens/common'; | |||
|
|||
interface StartServices { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not relevant for this PR, but this object is a great example of how inconsistent our naming is
xxxContract
,xxxType
,xxxSetup
and a type with no suffix at all - in the same object :)
I guess we should choose and stick to one or two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree! I called this startServices
based off the naming of core.getStartServices()
.
@elasticmachine merge upstream |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
…bed-interface-cleanup
52686f1
to
b81e54f
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
@oatkiller - if you could take a peek, just made a change to the embeddable api so your code got touched. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discover and Lens changes LGTM. Did not test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* wip * Remove test in legacy functional plugin
registerEmbeddableFactory
from start contractisEditable
async as that is based off capabilities which is retrieved from CoreStart, so needs to be available async.GetEmbeddableFactory/ies
typescreateApi
semantics, go with a simpler approach.