Setting up Presentation Util; Create Service Abstraction API#88112
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
|
@elasticmachine merge upstream |
|
Looks like this is breaking in Kibana if you go to Lens and try to save in a way that will bring up the The error is that |
crob611
left a comment
There was a problem hiding this comment.
Left a few thoughts, and the issue with the plugins not being started needs to be resolved, but the code as a whole looks good. This is going to be great to build on going forward.
stacey-gammon
left a comment
There was a problem hiding this comment.
I love the concept, I'm just not sure if these interfaces/classes belong in the platform, or if we should consider this a recommended "best practice", and leave it up to each plugin author to build the service how they need.
c57d5a2 to
9f6444e
Compare
5507b7c to
6b2c96c
Compare
47bf073 to
8ca4297
Compare
poffdeluxe
left a comment
There was a problem hiding this comment.
Found a bug with the refactor of the modal but otherwise I'm fine with the setup
|
Love seeing more mdx docs!! I'll add the Team:Docs label so this gets included in the docs challenge. One thing though - can you nest this under the |
|
Pinging @elastic/kibana-docs (Team:Docs) |
| tagOptions={tagOptions} | ||
| objectType={'visualization'} | ||
| onClose={() => {}} | ||
| savedObjectsClient={savedObjectsClient} |
There was a problem hiding this comment.
It seems that now savedObjectsClient it is not used for getTopNavConfig so no need to exist and it can be removed from the props here:
export const getTopNavConfig = (
{
hasUnsavedChanges,
setHasUnsavedChanges,
openInspector,
originatingApp,
setOriginatingApp,
hasUnappliedChanges,
visInstance,
stateContainer,
savedObjectsClient,
visualizationIdFromUrl,
stateTransfer,
embeddableId,
}
It should be cleared from the visualize_top_nav.tsx too
💔 Build Failed
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
This PR completes a number of items:
Canvas has a bespoke method of providing simplified services to the plugin, (rather than consume
useKibanaor similar, which are notoriously difficult to track/mock). This PR extracts and improves upon that approach to be used in Dashboard, Canvas and elsewhere, (PR next). The net benefit is that plugins consuming Presentation Utility components don't need to provide full implementations of Kibana services, (particularly if they weren't present to begin with). In other words, there's no need to addsavedObjectsto thekibana.jsonfor your plugin just to consumepresentationUtil.While working on the new service architecture, I added and refactored to provide Storybook to the Presentation Utility plugin.
I also took the opportunity to write docs using the new docs system, (a PR to add the items to the docs is forthcoming).