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

[Shareable Saved Objects] Add Spaces column to TableListView #172028

Closed
wants to merge 22 commits into from

Conversation

nickpeihl
Copy link
Member

@nickpeihl nickpeihl commented Nov 27, 2023

Fixes #171461
Part of #167901

Summary

This updates the TableListViewTable component to optionally show the Spaces List component.

Consumers of the TableListViewTable component can pass the SpacesAPI and an itemIsShareable handler to display the Spaces column in the table listing. The mSearch developer example app shows how this works. Currently, the only shareable saved objects are Data views (index-pattern type).

Start Kibana with yarn start --run-examples and view the developer example at http://localhost:5601/app/contentManagementExamples/msearch.

No customer-facing changes are included in this PR.

Dashboard, Event annotation Groups, Files, Graph, and Maps plugins were updated to retrieve the required namespaces saved object property. They are not made shareable in this PR. Edit: I removed the namespaces retrieval for these plugins by making namespaces optional in 0b0c990.

msearch-spaces-column.mp4

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@@ -22,7 +22,7 @@ export const applicationServiceFactory: ApplicationServiceFactory = ({ coreStart
navigateToApp,
navigateToUrl,
getUrlForApp,
capabilities: { advancedSettings, maps, navLinks, visualize },
capabilities: { advancedSettings, maps, navLinks, visualize, savedObjectsManagement },
Copy link
Member Author

Choose a reason for hiding this comment

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

The savedObjectsManagement capabilities need to be passed to the TableListViewTable component to enable or disable the share to space flyout.

Alternatively, we could probably use an assertion operator as I think all saved objects will have the namespaces property.
@nickpeihl nickpeihl added release_note:skip Skip the PR/issue when compiling release notes Project:ShareToSpace labels Nov 29, 2023
@nickpeihl nickpeihl marked this pull request as ready for review November 29, 2023 14:37
@nickpeihl nickpeihl requested review from a team as code owners November 29, 2023 14:37
@@ -228,6 +236,9 @@ export const TableListViewKibanaProvider: FC<TableListViewKibanaDependencies> =
>
<TableListViewProvider
canEditAdvancedSettings={Boolean(core.application.capabilities.advancedSettings?.save)}
canShareToSpaces={Boolean(
core.application.capabilities.savedObjectsManagement.shareIntoSpace
Copy link
Member Author

Choose a reason for hiding this comment

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

cc @cqliu1 Is it necessary to disable the share to space flyout like this?

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dashboard 388 389 +1
eventAnnotationListing 460 461 +1
filesManagement 137 138 +1
graph 256 257 +1
maps 1097 1098 +1
visualizations 365 366 +1
total +6

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/content-management-tabbed-table-list-view 15 16 +1
@kbn/content-management-table-list-view 10 11 +1
@kbn/content-management-table-list-view-table 41 43 +2
total +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 377.3KB 378.5KB +1.2KB
eventAnnotationListing 197.0KB 198.1KB +1.1KB
filesManagement 89.9KB 91.1KB +1.2KB
graph 388.2KB 389.4KB +1.2KB
maps 2.9MB 2.9MB +1.2KB
visualizations 268.2KB 269.3KB +1.1KB
total +7.0KB
Unknown metric groups

API count

id before after diff
@kbn/content-management-tabbed-table-list-view 15 16 +1
@kbn/content-management-table-list-view 10 11 +1
@kbn/content-management-table-list-view-table 59 63 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nickpeihl nickpeihl removed request for a team November 30, 2023 14:47
@nickpeihl nickpeihl marked this pull request as draft December 5, 2023 16:54
@nickpeihl
Copy link
Member Author

Closing this as priorities have shifted.

@nickpeihl nickpeihl closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project:ShareToSpace release_note:skip Skip the PR/issue when compiling release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add spaces to TableListView
3 participants