[Dashboard First] Library Notification#76122
Merged
ThomThomson merged 9 commits intoelastic:masterfrom Sep 1, 2020
Merged
Conversation
…ed the notification area to take advantage of MenuItems if present
Contributor
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
Contributor
Author
|
@elasticmachine merge upstream |
stratoula
reviewed
Sep 1, 2020
| }; | ||
|
|
||
| public isCompatible = async ({ embeddable }: LibraryNotificationActionContext) => { | ||
| return Boolean( |
Contributor
There was a problem hiding this comment.
nit: I think we can omit Boolean() here
Contributor
Author
There was a problem hiding this comment.
Good catch! Removed that
stratoula
approved these changes
Sep 1, 2020
Contributor
stratoula
left a comment
There was a problem hiding this comment.
LGTM! Tested it on Chrome, works as expected
Contributor
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
ThomThomson
added a commit
to ThomThomson/kibana
that referenced
this pull request
Sep 1, 2020
Added a notification to show when an embeddable is saved to the Visualize Library
ThomThomson
added a commit
that referenced
this pull request
Sep 1, 2020
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Sep 2, 2020
* master: (223 commits) skip flaky suite (elastic#75724) [Reporting] Add functional test for Reports in non-default spaces (elastic#76053) [Enterprise Search] Fix various icons in dark mode (elastic#76430) skip flaky suite (elastic#76245) Add `auto` interval to histogram AggConfig (elastic#76001) [Resolver] generator uses setup_node_env (elastic#76422) [Ingest Manager] Support both zip & tar archives from Registry (elastic#76197) [Ingest Manager] Improve agent vs kibana version checks (elastic#76238) Manually building `KueryNode` for Fleet's routes (elastic#75693) remove dupe tinymath section (elastic#76093) Create APM issue template (elastic#76362) Delete unused file. (elastic#76386) [SECURITY_SOLUTION][ENDPOINT] Trusted Apps Create API (elastic#76178) [Detections Engine] Add Alert actions to the Timeline (elastic#73228) [Dashboard First] Library Notification (elastic#76122) [Maps] Add mvt support for ES doc sources (elastic#75698) Add setHeaderActionMenu API to AppMountParameters (elastic#75422) [ML] Remove "Are you sure" from data frame analytics jobs (elastic#76214) [yarn] remove typings-tester, use @ts-expect-error (elastic#76341) [Reporting/CSV] Do not fail the job if scroll ID can not be cleared (elastic#76014) ...
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #75499
Reasoning
Adds a notification which denotes when an embeddable is saved to the Visualize Library. Once the 'by value' paradigm is an accepted default, it will be important to be able to distinguish between 'by value' and 'by reference' embeddables at a glance, due to the fact that editing by reference embeddables can apply your changes to multiple dashboards.
This notification shows up when:
ReferenceOrValueEmbeddablei.e. is capable of taking input that contains either a savedObjectId OR the saved object attributes.Implementation
The Library notification is an EUI Badge using the hollow color scheme to make it stand out less. This badge could start showing up in a lot of places once the 'allowByValueEmbeddables' flag is turned on, so it's important to make it less conspicuous.
The custom badge is implemented via the MenuItem prop on action, which I have changed the notifications area of embeddable panel header to accept.
Screenshots
The Library notification on Book embeddables...

The Library notification appearing on a Lens By Value #70272 embeddable. The Drilldown notification and local time range are shown for context.
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.
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 see the new notification show up on the right side.
Use the 'Unlink from Library' functionality to unlink the panel, and see that the notification disappears.
Checklist
Delete any items that are not applicable to this PR.
For maintainers