[CM] Add content onboarding docs#154453
Merged
sebelga merged 4 commits intoelastic:mainfrom Apr 10, 2023
Merged
Conversation
Contributor
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
Dosant
reviewed
Apr 6, 2023
Dosant
added a commit
that referenced
this pull request
Apr 6, 2023
…154464) ## Summary Partially addresses #152224 [Tech Doc (private)](https://docs.google.com/document/d/1ssYmqSEUPrsuCR4iz8DohkEWekoYrm2yL4QR_fVxXLg/edit#heading=h.6sj4n6bjcgp5) Introduce `mSearch` - temporary cross-content type search layer for content management backed by `savedObjects.find` Until we have [a dedicated search layer in CM services](https://docs.google.com/document/d/1mTa1xJIr8ttRnhkHcbdyLSpNJDL1FPJ3OyK4xnOsmnQ/edit), we want to provide a temporary solution to replace client-side or naive server proxy usages of `savedObjects.find()` across multiple types with Content Management API to prepare these places for backward compatibility compliance. Later we plan to use the new API together with shared components that work across multiple types like `SavedObjectFinder` or `TableListView` The api would only work with content types that use saved objects as a backend. To opt-in a saved object backed content type to `mSearch` need to provide `MSearchConfig` on `ContentStorage`: ``` export class MapsStorage implements ContentStorage<Map> { // ... mSearch: { savedObjectType: 'maps', toItemResult: (ctx: StorageContext, mapsSavedObject: SavedObject<MapsAttributes>) => toMap(ctx,mapsSavedObject), // transform, validate, version additionalSearchFields: ['something-maps-specific'], } } ``` *Out of scope of this PR:* - tags search (will follow up shortly) - pagination (as described in [the doc]([Tech Doc](https://docs.google.com/document/d/1ssYmqSEUPrsuCR4iz8DohkEWekoYrm2yL4QR_fVxXLg/edit#heading=h.6sj4n6bjcgp5)) server-side pagination is not needed for the first consumers, but will follow up shortly) - end-to-end / integration testing (don't want to introduce a dummy saved object for testing this, instead plan to wait for maps CM onboard and test using maps #153304) - Documentation (will add into #154453) - Add rxjs and hook method
Contributor
Author
|
I'll go ahead and merge this. We can make changes at any point if there are unclear sections @mattkime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR I'v added the documentation to onboard content to the Content Management architecture.
The markdown file is best view by opening the file and displaying the outline.
Fixes #154456