-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Update and re-organize Dashboard panel action menu #66051
Comments
Thanks @mdefazio that looks really great.
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
After discussing this internally, it's questionable that we need the subheadings. Instead we could simply utilize existing patterns and drop them into submenus. This helps shorten the height of the action menu (which was quite long using the subheads). I've added some variations to try and find a compromise on length of menu and discoverability. |
The menu as it is implemented today is a simple map over all registered actions for an embeddable that will be compiled in a list of items. To achieve something like shown in the screenshots at least the following changed will be needed:
This panel is currently build by the I in general am a bit concerned about the fact that this menu is purely under the control of uiActions and not the dashboard itself. It feels like a lot of actions here (like clone and remove) are purely related to dashboards, and having them run via the uiActions system might just be "unnecessary"? How are we in general making sure that dashboard specific actions are only shown on dashboards and not when the embeddable is used somewhere else? Also I have the feeling with a design like above the "highlighted" actions on top might be different depending on the context that the embeddable is (maybe Canvas want to highlight other actions than dashboard). Does it really still make sense having that panel be purely created by the |
Clone and remove are actions registered by the dashboard, so they aren't owned by the uiActions system, but the uiActions system collects and renders them together.
If an action requires a specific embeddable "parent", it will specify this in its public async isCompatible({ embeddable }: ClonePanelActionContext) {
return Boolean(
embeddable.getInput()?.viewMode !== ViewMode.VIEW &&
embeddable.getRoot() &&
embeddable.getRoot().isContainer &&
embeddable.getRoot().type === DASHBOARD_CONTAINER_TYPE
);
} So this will not show up for Embeddables anywhere other than on a dashboard that is in Edit mode.
++
I think so. We just need to support different configurations. One question is - when you have multiple plugin authors attaching actions to this trigger, that may not know about eachother, who should dictate which actions go where? The dashboard, the generic embeddable system, or the specific embeddable implementation? One way we could do this is is to add new triggers. In addition to If you wanted to say the container dictates which actions are highlighted (this would mean ML couldn't add their own special "highlighted" action), then you could possibly add this as input data to an embeddable, like I think what we need to move forward with this is a breakdown of the sections and how they might change from environment to environment based on different factors. Is it |
Currently the context menu is generated out of a flat list of actions that are attached to It seems the simplest approach to support the above designs would be to add three more triggers to have:
|
Actually, Basically we just need to add And add |
Here's an update on this: I'm showing 2 different options (left - option A, right- option B). We had a few more discussions around this on the design team. The consensus was that the flexibility of the vertical layout + nested lists made more sense for consistency and different use cases (option A). Option B provides more prominence to the primary actions, but is obviously less flexible and perhaps something to consider further on. But option A felt like a logical improvement for a next step. We can try and define a rule (similar to the EuiTable row actions) for a set amount of items at the top (likely 3) to help prioritize the actions and then provide the overflow nested menu if there are more available. |
From a technical perspective, I think it would be very use-full to have items that can have sub-menus here @streamich. We currently experimenting with some Dashboard sections, where we would need an action here: "Move to other section", that should ideally directly lead to a submenu with all available sections, instead of throwing the user out of their flow with popping up a modal. |
We discussed that a bit from implementation perspective, noting down 1 possible approach:
Before:
After:
⬆️ in the example |
@streamich in the next dashboard phases it will no longer be required to save and name a panel when you create it from a dashboard. It means that many panel will be without a title. The ability to create a panel title need to be available in the edit mode. I think it needs to be second on that list right after edit visualization |
That is a good point @AlonaNadler I am also wondering about the placement of the 'add to library' and 'unlink from library' buttons. The 'unlink' button will be especially important when we first start to promote the 'by value' paradigm, because every panel will be 'by reference' My current thought is that we could keep both actions under the the 'more' header to save space, but also hijack the 'by reference' badge from #75822 as a call to action which opens a context menu on click that provides an unlink option. |
@AlonaNadler This is a bit tangential to this issue, but we have now discussed it few times in our syncs, so wanted to share here, too. Maybe we should refactor how the panel properties are edited. For example, it does not make much sense that when you edit a title, a modal opens with just one input field to edit the title. And when you edit the time range of the visualization another modal opens where you just edit the time range. Now we are also are thinking to add some drilldown settings to each panel, for example, to enable in-chart "Explore underlying data". And, for example when, you "inspect" the panel yet another flyout opens. And when you manage drilldowns, yet another flyout opens. And when you edit visualization, you are redirected to a completely different page. Would be nice to see all those settings combined in one form. You just click "Edit", and you are presented with a flyout from the bottom of the screen, where you can edit title, set custom time range, manage drilldown settings, manage drilldowns, see inspector adapters. I can put "Edit title" right after "Edit visualization" no problem. |
Pinging @elastic/kibana-app-services (Team:AppServicesUx) |
Describe the feature:
The current panel action menu has little visual prioritization and potentially a long list of options that causes the user to read through all options to decided which they want.
Re-organizing and segmenting the menu can help scanning through the options and promote common actions.
Current screenshots:
Update:
Describe a specific use case for the feature:
As we add more functionality to these panels, we need to make sure the structure scales and new features don't get lost in a long list of menu items.
Some questions to help guide this:
cc @AlonaNadler
The text was updated successfully, but these errors were encountered: