-
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
[Dashboard First] Add to Library Action #75098
[Dashboard First] Add to Library Action #75098
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
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: |
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, 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
ReferenceOrValueEmbeddable
interface from #74302.The action has an implementation in
attribute_service
that 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
allowByValueEmbeddables
config value totrue
:kibana/src/plugins/dashboard/config.ts
Line 23 in 5b64a4c
There are no production ready embeddables that implement the
ReferenceOrValueEmbeddable
yet so you will have to start the developer examples.yarn start --run-examples
Open 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