[Dashboard First] Add to Library Action#75098
Conversation
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
majagrubic
left a comment
There was a problem hiding this comment.
Tested in Chrome on Mac OS X on a book embeddable example. Works as expected 👍
|
Got following error:
There is error in console:
Looks like original error is swallowed: And it is: Which means that object that belongs to dashboard state container directly mutated
|
|
Thanks for finding this Anton! Seems like I was focusing on testing only embeddables that had previously been in the library, not brand new ones. I've forwarded the error and used a shallow copy as suggested. |
4f8c41d to
f171553
Compare
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
Dosant
left a comment
There was a problem hiding this comment.
LGTM, tested on a dashboard using book embeddable.
* created an add to library action that turns 'by value' embeddables into 'by reference' embeddables
Summary
Counterpart / Opposite of #74905
Adds an embeddable panel action to add by value embeddables to the library, turning them into by reference embeddables. This action should work with any embeddable that implements the
ReferenceOrValueEmbeddableinterface from #74302.The action has an implementation in
attribute_servicethat comes with a saved object save modal and title duplication detection.How to test this?
This is just one part of a much larger change, so all changes in this PR are hidden behind a configuration value. In order for the 'by value' workflow to be made default, some architectural changes need to be completed including #67931, #71499, and #61663
you'll need to set the
allowByValueEmbeddablesconfig value totrue:kibana/src/plugins/dashboard/config.ts
Line 23 in 5b64a4c
There are no production ready embeddables that implement the
ReferenceOrValueEmbeddableyet so you will have to start the developer examples.yarn start --run-examplesOpen a dashboard, and use the add panels functionality to add a Book embeddable. You should be able to then unlink it from its library item. using the 'unlink book from library item' action menu item.
Use the 'Add to Library' action, being sure to save the embeddable with a unique name.
Checklist
For maintainers