-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Time to Visualize] Library Notification Popover #79581
[Time to Visualize] Library Notification Popover #79581
Conversation
Hey, yeah, I’ll give it some thought. One initial reaction is - how do we indicate the library status within the editing application? That feels like the point in the flow with the greatest chance for 'breaking' things. My guess is that people will continue on with the ‘Edit this panel’ action from the Dashboard 'gear' menu at which point there is increased potential of updating a library item inadvertently. We've kept that 'Save and return' flow purposefully streamlined (single click), so how can we indicate the potential for broader impact without adding another hurdle (i.e. modal), for example. Perhaps it's something as simple as an icon alongside the Save and return? I'll give this more thought as well. |
This is certainly another important consideration. Right now the only difference is the wording on the 'save as' button. A subtle indicator with a warning on hover could certainly help differentiate the two modes of the editor. A more drastic approach could be to add a button that is the opposite of the 'save to library' button. The 'save to library' button acts as an escape hatch away from by value, but maybe we also need an escape hatch button into by value. The only problem I can think of is the copy for that button... 'save to dashboard' doesn't really work... 'embed' sounds like it's doing something else... |
Ah right, I hadn't thought that all the way through. This feels like it could slip into something messier than I'd initially imagined. The existing buttons (Save to library and Save as) seem sufficient for now. Perhaps we could do some sort of in-page indicator similar to the badge on the panel. Hold on that for now and I'll do some more tinkering. |
To the point, I like the popover and have only a couple of minor feedback items:
In addition (beyond this PR), we should consider similar changes elsewhere. For example, we could likewise indicate when an item is in the library from within an editing app (e.g. Viz/Lens). We'd have to think through the conditions of when to display this badge, but having a similar UX at this level would likely be helpful as its closer to the point of potentially affecting multiple dashboards. |
Forgot one other thing... a toast confirmation would be helpful to confirm once an item has been added to/removed from the library. |
…ryNotificationExecute
Thanks for the design input! I've added a couple toasts to the 'add to library' and 'unlink from library' actions: I have also reworked the design of the popover to be more in line with other similar popovers, and changed the library notification icon from a badge to an icon button to make it even more inconspicuous - as well as allowing me to add a title to the popover. |
8b3f7b1
to
a626fac
Compare
@ThomThomson thanks for making these changes. I just gave it a run through and it both looks and works well! |
0e82578
to
ebc9a9d
Compare
Pinging @elastic/kibana-canvas (Team:Canvas) |
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'm having a hard time running this, so can't verify if it works. Code changes look good.
One question though - can we return the previous "Libary" badge look?
While the previous badge looked ok on its own, we're having to consider it in the context of several other new/upcoming panel elements. For that reason, we've opted to go with this more minimal approach and will look at a larger redesign of the edit state as described here: #79916 |
@majagrubic, you're right that the previous design was nicer looking. I changed this to an
Oh, @ryankeairns beat me to it! |
@elasticmachine merge upstream |
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.
Code LGTM, didn't test
src/plugins/embeddable/public/lib/panel/panel_header/panel_header.tsx
Outdated
Show resolved
Hide resolved
src/plugins/dashboard/public/application/actions/unlink_from_library_action.tsx
Outdated
Show resolved
Hide resolved
src/plugins/dashboard/public/application/actions/library_notification_popover.tsx
Outdated
Show resolved
Hide resolved
src/plugins/dashboard/public/application/actions/library_notification_action.tsx
Show resolved
Hide resolved
src/plugins/dashboard/public/application/actions/unlink_from_library_action.tsx
Outdated
Show resolved
Hide resolved
5520c64
to
a9a92a9
Compare
Managed to get it running 🎉 Tested in Chrome 85 on Mac OSX. Looks great. Unlinking / linking works as expected.
|
src/plugins/dashboard/public/application/actions/library_notification_popover.tsx
Outdated
Show resolved
Hide resolved
src/plugins/dashboard/public/application/actions/library_notification_popover.tsx
Outdated
Show resolved
Hide resolved
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
page load bundle size
History
To update your PR or re-run it, just comment with: |
* Added popover to the library notification which acts as an unlink shortcut
Summary
in the Time to VIsualize project, it's important to provide many obvious ways for the user to enter into the new flow. The
library
notification added in #76122 can act as a good entry point/call to action by prompting the user to unlink the panel from the library.TODO:
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
allowByValueEmbeddables
config value totrue
:kibana/src/plugins/dashboard/config.ts
Line 23 in 5b64a4c
Open a dashboard, and use the add panels functionality to add an embeddable from the library. You should see the new notification show up on the right side.
Checklist
Delete any items that are not applicable to this PR.
For maintainers