-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Spaces - Copy Saved Objects to Spaces UI #39002
Conversation
@cchaos no rush, as the implementation is blocked on several other PRs, but if you get some free time, I'd love a preliminary design review! |
Pinging @elastic/kibana-security |
}; | ||
} | ||
|
||
export abstract class SavedObjectsManagementAction<T = unknown> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is tightly coupled to both EUI and React. My ultimate goal is to replace this entirely with the Embeddable/Actions APIs once they're ready, so I don't want to spend a ton of time crafting the perfect abstraction here. Instead, this provides enough functionality to enable the copy-to-space feature, without coupling it to Spaces itself.
💔 Build Failed^ Unrelated CI failure |
src/legacy/ui/public/management/saved_objects_management/saved_objects_management_action.ts
Outdated
Show resolved
Hide resolved
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
retest |
💔 Build Failed |
@legrego Sorry it's taken so long for the design team to take a look at this. @ryankeairns will actually be able to help you out on it. You'll probably want to sync with him to go over the purpose and intricacies of all the Spaces stuffs. |
I didn't see it that way - I liked that we weren't duplicating functionality or type definitions for what's effectively a thin wrapper around the import/export feature. It felt to me like we'd be able to see how changes to import/export will impact Copy to Space in the future. Do you have suggestions on how we can improve this? We can divorce the two from a types perspective, but then I feel like it's even less obvious that copy to space relies upon import/export.
Sure, that's a good idea. |
💚 Build Succeeded |
Following a discussion with @kobelb, we decided on the following:
These decisions were made after discovering shortcomings in the import/export functionality which would have led to a confusing user experience for the Copy to Space feature. |
Also discovered during testing: #43876 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on green CI
@legrego I'll have a review / PR for you in a couple hours from the design side. |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I loaded this locally and looked through the code. There are some changes I'd like to make on the design / sass side that I can do on my own. There's nothing in here that looks scary that I would want to hold this PR up for.
Since we're got the green, I'm ok with a merge, and I'll do my design pass as a separate concern before freeze.
💚 Build Succeeded |
Summary
This introduces a new "Copy to space" action within the Saved Objects Management UI. When Spaces is enabled, a new action appears in the table next to each saved object. From there, users are given the option to copy that saved object (with or without references) to one or more other spaces.
Tasks
Menu option
Select spaces to copy into
Processing copy
Copy response, showing sample error
Copy response, showing conflict resolution
Resolves #37286
"Release notes: Saved objects can be easily copied from one space to another from the Saved Objects Management screen"