Open ninoslavmiskovic opened 1 year ago
Pinging @elastic/appex-sharedux (Team:SharedUX)
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)
it seems this part of the code (saved_objects_management) is owned by @elastic/kibana-core ? Rem
Hey Mr. @sebelga, It smells to me that the copy functionality is not ours, but a glitch that deactivates the action menu on multi select may very well be. Can you please investigate and see where the plumbing has gone wrong so we can triage?
it seems this part of the code (saved_objects_management) is owned by https://github.com/orgs/elastic/teams/kibana-core
Yes saved object management is owned by the core team.
The fact that the action menu gets deactivated when selecting a row is an expected behaviour that we have across Kibana tables. It comes from EUi. Once we select one or multiple row we enter "bulk" mode. A single row actions menu does not make sense as some row could have different actions based on their properties.
Handling bulk action is then done on the table header. In Saved object management, once we start selecting rows, the "Delete" and "Export" bulk action buttons get active.
This is similar for example to Index templates:
The enhancement for this issue would be to add a new bulk action: "Copy to space".
For the UX, instead of adding another button, we might start considering something similar to what we plan to do with the TableListView: https://github.com/elastic/kibana/issues/140185
Adding core team just for visibility.
Should be considered as part of the sharing/coping SOs across spaces initiative
Copying a saved object to a space is not as simple as it might seem and could cause some serious performance issues.
Kibana has to deal with generating new ID's, ensuring the references and related objects get handled and possibly also deal with legacy url aliases.
Doing all of this in a bulk action could also cause cyclic dependencies. We'd also have to think about how to handle sharable objects such as data views.
At the moment, there is a work-around using export/import.
Exporting several objects is already supported, as is importing them into another space and the decision of how to handle related objects and duplicates then falls on the consumer.
We could explore implementing an API that uses export/import under the hood. We would then need to figure out a way to handle duplicates.
@elastic/kibana-security What are your thoughts about exploring export/import for supporting a bulk copy-to-space action under the hood?
This issue is a duplicate of https://github.com/elastic/kibana/issues/52098.
We support bulk copy today via the API: https://www.elastic.co/guide/en/kibana/current/spaces-api-copy-saved-objects.html
We don't have this exposed via the UI because it adds complexity to an already confusing UX, and we haven't yet planned or prioritized design improvements.
@elastic/kibana-security What are your thoughts about exploring export/import for supporting a bulk copy-to-space action under the hood?
Can we close either this issue or https://github.com/elastic/kibana/issues/52098, in order to consolidate the conversation?
@legrego perhaps close the 4y issue since this one have more comments and context . I am good either way.
Do we have a consensus on which team should own this? Is it more @elastic/kibana-security or @elastic/kibana-core ?
@pgayvallet, the platform security team has historically owned this, but I'm open to discussing alternatives. A secret third option would be the shared ux team. This should "only" require front-end changes, since the API already supports this functionality. Those quotes are doing a lot of heavy lifting, though.
@sebelga
For the UX, instead of adding another button, we might start considering something similar to what we plan to do with the TableListView: https://github.com/elastic/kibana/issues/140185
Did we make any progress on some shareable UI components that we could use for that?
I was just looking at the issue and the code, and as @legrego said, he modal and API would already support selecting multiple objects, so it's all about how to correctly implement the UI for that new action.
Did we make any progress on some shareable UI components that we could use for that?
@pgayvallet No we didn't move forward with the linked issue I mentionned. Not sure it would have served you as the bulk action header were meant for the TableListView component and I don't think the SO management table is using it. But there are places in Kibana (e.g. the Index management table) that do have the bulk drop down for multiple actions that you could easily copy over in your table here. It's not too complex to do. Doing it reusable (the issue linked) through TableListView is much more complex.
A secret third option would be the shared ux team. This should "only" require front-end changes, since the API already supports this functionality.
@legrego We build the shared components but can't really maintain all their implementations and their respective tests accross Kibana 😊 (dashboard, vis library, maps...).
cc @petrklapka for visibility.
As a user, I want to copy more than one saved object to spaces, and currently, the "action" menu gets deactivated when I start selecting Saved Objects.
See video:
https://github.com/elastic/kibana/assets/108192783/781b37d9-8200-4da4-8951-8db217b115bd
The request: Be able to select several Saved Objects and "copy to spaces".
Edit by @legrego: I want to highlight this comment for anyone that finds this issue: