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

[CM] Add content onboarding docs #154453

Merged

Conversation

sebelga
Copy link
Contributor

@sebelga sebelga commented Apr 5, 2023

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.

Screenshot 2023-04-05 at 15 19 02

Fixes #154456

@sebelga sebelga self-assigned this Apr 5, 2023
@sebelga sebelga marked this pull request as ready for review April 5, 2023 14:24
@sebelga sebelga requested a review from a team as a code owner April 5, 2023 14:24
@sebelga sebelga added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Apr 5, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@sebelga sebelga added docs Feature:Content Management User generated content (saved objects) management release_note:skip Skip the PR/issue when compiling release notes labels Apr 5, 2023
@sebelga sebelga requested a review from Dosant April 5, 2023 14:35
@sebelga sebelga requested a review from mattkime April 5, 2023 15:36
Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

👍

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
@sebelga
Copy link
Contributor Author

sebelga commented Apr 10, 2023

I'll go ahead and merge this. We can make changes at any point if there are unclear sections @mattkime

@sebelga sebelga merged commit f6a7b6c into elastic:main Apr 10, 2023
@sebelga sebelga deleted the content-management/docs-content-onboarding branch April 10, 2023 09:56
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting docs Feature:Content Management User generated content (saved objects) management release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CM] Add Saved object onboarding to CM documentation
4 participants