-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiDataGrid] Enforce visibleCellActions
shown (overflowing extra actions to the cell popover)
#5675
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_5675/ |
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.
Made a small suggestion, but everything else looks good. Couldn't find any issues in the preview build, and those new tests are great!
Approved, but let's hold off on merging until we can coordinate with the security folks as Dave mentioned (I've reached out to Andrew) |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5675/ |
Ok, I've just been doing some thinking around the design (mainly treatment of the buttons in the popover) aspect of this thing. The demos look great because everything is actually pretty lined up well based on the content chosen. But I have some concerns with the "raggedy-ness" that happens with stacks of centered buttons. Specifically: A. Choosing more inconsistent labels showcases the ragged reading margins So... with that, a solution could be: E. Keep the first two in a row, but just left align the subsequent buttons. |
E was indeed @mdefazio's original mock, but the buttons looked really weird in terms of click/hover areas with It wasn't clear to me whether or not the buttons should have been intentionally full width or not, and the missing hitbox felt annoying to me UX-wise - I also thought centering looked less weird especially on cells with very long content - see below example: |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5675/ |
Yep, I agree with all your concerns, but I think the (un)readability of centered content outweighs them. My suggestion would be to use EuiContextMenuItems in place of EuiEmptyButtons. But it might require adding support for |
This would convolute our API/typing a ton unfortunately, since the way we handle For now I've simply added |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5675/ |
I've pushed you a simple change to the buttons in which I wrap each button (primary and secondary) in a Reasoning: These buttons are EuiEmptyButtons, so they don't have visible bounds unless they're focused. When they expand, they cause white space to be clickable (as shown in your gifs). While this seems off compared to our context menus, they are more likely to cause mis-clicks because of how wide the popover can get compared to the link text. Restricting the button's interactive area to just the text/icon is less likely to cause mis-clicks and create intentionality. The then lines of the left end of the primary and secondary buttons so we don't have the weird layout. |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5675/ |
Sorry to join this conversation late, but I'm wondering if/why we need to enforce a maximum of 2 items to be displayed? During the RAC project, as we adopted the EUI data grid for alert table use, we agreed that the EUI default display of two items made sense, but our understanding was that an optional addition of another item would be acceptable if the impact to the overall width was nominal and there was good justification from the use case perspective. Why are we now changing this at the expense of a breaking change to the security solution? In the security solution, the ability to add any ECS field displayed in a cell to the currently active timeline investigative workspace is a key differentiator that allows both threat hunter and SIEM analyst personas to easily start or continue an investigation. By forcing users to perform another click of the overflow icon to add the item to a Timeline, we are reducing the discoverability of this key feature, and adding another click for each item they want to add to the timeline, which will decrease their velocity. This is in direct conflict with one of our primary objectives, which is to increase analyst velocity during investigations so that we can help them reduce their mean-time-to-detect MTTD and mean-time-to-respond MTTR metrics. The security usage includes 3 items (we use 5 in our non-EUI tables) in the display today, which seems to widen the display only minimally, like this: Can we please reconsider and revert the "enforce" nature of this PR so as to not negatively impact our security solution users, and/or not burden security solution developers with extra work to build an alternate solution? cc: @monina-n @adamwdraper @paulewing @oatkiller @chandlerprall @snide |
@MikePaquette I'm going to set up a zoom invite your way. There's no immediate hurry to merge this PR and we have time to talk it through. |
@snide @MikePaquette I am interested in knowing the summary of the zoom meeting as I agree limiting the cell actions may not satisfy security use cases. |
This PR is simply the implementation from feature request that was submitted back in September 2021: #5132. The EUI issue was created after lengthy discussion between designers on the current UX implications of having too many cell actions. You can further trace discussions by checking out the linked issues in #5132. If there was a breakdown in communication between solution needs and design expectations, I suggest we table this PR (put it to draft) and I'd like to refer everyone back to the originating issue to continue discussion. |
OK. I think we have a consolidated front from design, product and engineering on how to move this PR forward. I've written up some prop changes here #5132 (comment) which themselves came from discussion #5089 (reply in thread) . Further. We've agreed to hold this PR to merge for two weeks until 8.2 feature freeze to give solution teams adequate time to make changes. @constancecchen or anyone else on this thread feel free to bug me if those discussions and decisions are unclear. Otherwise I think we have a solid path to merge this tidy bit of code! Thanks for everyone's patience. |
+ use a separate EuiPopoverFooter for remaining secondary actions
- Add alignStart=flex onto secondary popover actions - Don't expand empty buttons
- prop clarity, organization, etc.
cellActions
shown (overflowing extra actions to the cell popover)visibleCellActions
shown (overflowing extra actions to the cell popover)
Preview documentation changes for this PR: https://eui.elastic.co/pr_5675/ |
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.
All changes LGTM; tested the column.visibleCellActions
change in the preview docs and it works as expected
Hey, just a quick ping to everyone who's commented on this PR so far. 8.2FF is tomorrow so I'll likely be merging this PR in sometime this week. Does anyone see any issues with the user or developer experience of https://eui.elastic.co/pr_5675/#/tabular-content/data-grid-cells-popovers#visible-cell-actions-and-cell-popovers? If so, please speak up sooner rather than later 😃 |
Going to go ahead and merge this, as 8.2 FF is past. |
Summary
closes #5132
Cell action buttons on the cell will only show a maximum number of actions on the cell (default limit is 2, but this is configurable via
columns.visibleCellActions
). The remaining items in thecolumns.cellActions
array will only be displayed on the cell expansion popover, in a second column-style footer.Screencap
QA
https://eui.elastic.co/pr_5675/#/tabular-content/data-grid-cell-popovers#cell-actions-and-cell-popovers
Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in Chrome, Safari, Edge, and Firefox- [ ] Props have proper autodocs and playground toggles- [ ] Checked Code Sandbox works for any docs examples