UX for data grid cell actions #5089
-
As the use of data grid grows, we're encountering cases where teams desire to add multiple actions within a cell. I'm not certain this discussion will necessitate changes to the component itself, but some guidelines would be helpful, at a minimum, in order for us to maintain consistency with use of the data grid. The current stateCurrently, the data grid provides a hover action which allows a user to expand the cell contents and view more information. Discover uses this feature like so, accumulating three actions: As further evidenced by this next screenshot (from this issue), the number of actions being added is reaching an untenable level from a UX standpoint. At a certain point, we begin to encounter overflow issues. Relatedly, the RAC design team has been working through alternatives and generated several mockups to address the number of actions within the expand view. This has turned into the following near-term recommendation: The path forwardFor RAC, in 7.15 (8 days past FF at the time of this writing), they're having to make some quick hacks to alleviate the overflow issues by, likely, setting a default column width wide enough to show all the actions and to hide the overflow (this is already done). Neither of these solutions strike me as long term or desirable UX approaches. At the same time, the product direction as conveyed by the engineers involved, is that these actions should not require multiple clicks (i.e. keep the 'add to timeline' action visible on hover). To the pointWhat is the EUI and UX team stance on this?
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 26 replies
-
I absolutely think we need a set of guidelines for the DataGrid (expand action and likely other aspects). It is a new component and so the learning curve can be a bit high for both design and engineer. The original design issue includes a write-up specific to RAC in Observability and Security. But this should be improved for a broader set of rules: https://github.com/elastic/stack-design-team/issues/85. Including just for reference. Some first thoughts on a guideline proposal: Number of visible actions on cell hoverI would recommend no more than 3 cell actions visible on hover (including the expand action). This provides the option to have up to two actions and an expand action. The cell action icons should also be easily recognizable and clear which action will occur. For example: Filter In, Filter Out, Expand. There should be an initial width set on the column if cell actions are enabled. The below shows image shows an 80px cell with 3 actions. I think it makes sense to still see at least one character of the cell's content when hover and displaying the cell actions. Default layout for Expand Popover and Popover actionsIdeally, the exposed cell actions should go into the popover footer as shown already in the docs. If there are more that 2 actions, then a choice should be made to determine a primary action and then secondary actions should be treated separately. I don't think it's a hard requirement for the cell actions to stay in the footer. If the user is needing to perform other actions, then these should likely be exposed more prominently than the choices already presented to them. Actions can potentially be placed to the right of the cell's full value (see original design issue for example). This is an attempt to mimic the placement of copy on a code block example. Additionally, content can be placed between the cell value and popover footer. If providing a link, this should likely be reserved for changing pages or opening additional context. If adding content, be cautious that footer actions may be pushed down away from the original cursor position. |
Beta Was this translation helpful? Give feedback.
-
Here is a worst case scenario for number of options needed. If some of these are not required for a column, they can simply be removed.
|
Beta Was this translation helpful? Give feedback.
-
Mockup Option 2: |
Beta Was this translation helpful? Give feedback.
-
Below are some general Kibana guidelines for the cell itself, and then also the popover based on the feedback from the larger team. |
Beta Was this translation helpful? Give feedback.
-
Filter in/outI'd like to take a moment to mention the repeated filter actions that we have in most DataGrid usages. Applying two distinct filter buttons, one for in, one for out, within the cells themselves takes up a lot of room and adds a lot of noise for what I assume to be is a coupled action that can be simplified to a single experience. What I mean is that the act of Filtering is a single action. It's whether they want to filter out or in that is the "choice". I would like to suggest a pattern/component that creates a unified experience around filtering at the data level. Primarily I mean, reducing the act to the primarily use "in" functionality, while prioritizing the "out" functionality. I've POC'd a quick example of where I think we can optimize for "in" but still allow for quick "out" functionality, and then having both options be explicitly listed in the full format of the popover. The POC (I added to the Basic Table component because it was just easier) basically, creates a single "Filter" action that is shown on hover which when just cliked filters "In". But if the user Here's a screenrecording: Screen.Recording.2021-09-01.at.01.59.42.PM.mp4POC: #5124 |
Beta Was this translation helpful? Give feedback.
-
Here's an update on this: Changes:
I have created an issue (might need more clarity though) for EUI here: #5132 Will provide separate issues for Security and Observability showing their specific implementations. |
Beta Was this translation helpful? Give feedback.
-
@cchaos @snide @constancecchen @MikePaquette @mchopda @chandlerprall Opening this back up to get a decision around how much do we enforce the 2 action limit on hover. For most purposes, a 2 action limit likely makes sense and could probably remain as a guideline for this feature. However, Security has a use case (and current functionality) that providing 3 actions makes sense for them. We had previously discussed an idea around providing 3 actions (filter in / filter out / timeline) but having the filter be a single icon with a keyboard modifier (pressing I think it makes sense to bake these guidelines into the component, but is it possible to have an 'easy' escape hatch? Much like EuiBasicTable, using the built-in actions cell adheres the UI to the guidelines. However, there is a custom action option here. For quick ref, here are the EuiBasicTable guidelines regarding row actions which could help steer us in a direction. |
Beta Was this translation helpful? Give feedback.
@cchaos @snide @constancecchen @MikePaquette @mchopda @chandlerprall
Opening this back up to get a decision around how much do we enforce the 2 action limit on hover.
For most purposes, a 2 action limit likely makes sense and could probably remain as a guideline for this feature. However, Security has a use case (and current functionality) that providing 3 actions makes sense for them.
We had previously discussed an idea around providing 3 actions (filter in / filter out / timeline) but having the filter be a single icon with a keyboard modifier (pressing
CTRL
would filter out instead of the default filter in).I think it makes sense to bake these guidelines into the component, but is it …