Repository navigation
Initial framework for data plugin. - #34350
Conversation
There was a problem hiding this comment.
The shape of what's returned here is completely arbitrary and something we'll need to design on a per-service basis, though I do think we can work to establish some conventions over time.
Like in this case, I've put a React component that index patterns already exports under ui, and also grouped fields, constants, fixtures... but this could really be designed however we feel is best.
I'm also not sure how we want to deal with exporting one-off types that aren't part of the Setup interface... currently they are nested under types
There was a problem hiding this comment.
right now nothing will use this so i am ok with merging it as it is. we will explore the actual interface as part of deangularization pr (in which we will also update all the consumers of index pattern service to import from this new place)
There was a problem hiding this comment.
Yep, that makes sense to me. For some future services where we end up exporting stuff like this as an interim step, the way it is structured will become more important. But in the case of index patterns, this was mostly meant to be illustrative.
|
I think this is ready for review & an initial merge now so that we can continue adding more services to it. @ppisljar @lizozom I've updated the index patterns service to export what I think are all of the current public contracts, but of course those will keep evolving as we finish de-angularizing in #34418. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
7ab8503 to
6554589
Compare
💔 Build Failed |
6554589 to
acd9f56
Compare
💚 Build Succeeded |
| } | ||
|
|
||
| /** @public */ | ||
| export type IndexPatternsSetup = ReturnType<IndexPatternsService['setup']>; |
There was a problem hiding this comment.
Looks like the approach to exporting types in Core is changing in #34725. We might consider revisiting this part when we actually move index patterns over so that we can keep things consistent.
💔 Build Failed |
b0074f1 to
5fe462f
Compare
💚 Build Succeeded |
We've had some conversations around the idea of creating a new platform plugin that is owned by @elastic/kibana-app-arch and houses any services that apps might rely on for retrieving & managing data in kibana:
At the same time, we are trying to sort out the best path forward for consolidating items from
ui/publicinto their respective locations.The idea here is pretty straightforward:
dataplugin mentioned aboveplugins/orui/public)datapluginHere's an example of what importing would look like:
This has the benefit of giving the service the general shape of the new platform, where everything will be injected in the plugin's
setup()method asdata.For unstable items, or things we know will have an API changed in the near future, we could consider adding a legacy namespace so you would import like:
And then move items out of legacy when we sort out a longer-term API.
Still TBD:
Setuptypes, which I think we should mirror over time and I've tried to mimic heresetupwithin each service for now, inside atypesobjectui/public)