-
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
[Spec] Utility bar for meta information and bulk selection actions #4010
Comments
Hey, all! It's been asked that I update this issue with some more exact specifications for this proposed component. I'll attempt to break it down by section and elaborate below. If additional detail is desired, please let me know. Utility Bar"Kitchen sink" exampleSection breakdownContainerOverviewBorderProvide a prop to apply an optional border to the component container. Options should include none (default), bottom, top, and both. The reason to include this decorative border as a prop on the component rather than utilize PaddingProvide a prop to adjust the vertical padding for the component container. Options should include none, 4px, 6px, and 8px (default). This will give developers control to match padding with common adjacent components (i.e. Primary contentOverviewVisible item countA count of the total visible items this component is referencing should always appear within the primary content area. This count should be able to support automatic updates to reflect new item counts due to the application of a search/filter. Customizable item nameDevelopers should be able to supply a string to be used as the item name to be displayed in various areas of the component (i.e. visible item count, selected item count). If no string is supplied, we can simply default to Dividing borderA dividing vertical border ( Selected item countA count of the currently selected items should conditionally appear when one or more items has been selected by the user. This count should also optionally be able to double as a button that triggers the bulk action context menu (described further below). Button to select all items on all pagesA button to select all items on all pages should conditionally appear if the referenced component's items is paginated and all items on the currently viewed page are in a selected state. Interacting with this button should allow the user to perform bulk actions on all items in the referenced component, update the selected item count appropriately, and finally hide this button from the page (as it is no longer needed if all items are selected). Bulk actions menuThe bulk actions menu appears by users interacting with the selected item count button. Developers should be able to add one or more bulk actions that they wish for users to be able to perform when items in the referenced component are selected. Each action should allow developers to provide an icon, text, onClick action, and the ability to disable. Additionally, the bulk actions menu should always have Supplementary contentThe supplementary content section should allow developers to add optional supporting actions or information (i.e. any Other considerationsButton sizesThe intended font size for this component's text and buttons is 12px. Using the v7 theme, this would require either custom styles or the creation of a new smaller |
@MichaelMarcialis Sorry it's taken so long, just trying to find the right time to tackle this one. Thanks for the detailed writeup/breakdown of the Spec. At one point I had also worked through some of the intricacies of table selection, especially across multiple pages. See this Whimsical. At the time I had use a more primitive version of this toolbar, but I think there is still some cross-over that I'd like to pull from that to this, mainly when it comes to the Primary Content which I have also started to pull into a Figma component. My counter-proprosal: Primary contentCustomizable item name
At the very least an "item name" or "title" should be required to name the list of things (if the toolbar exists since it will be optional). But we only need to display it once (not repeated in the bulk actions menu). This matches the "Feature visibility" mockup provided![image](https://user-images.githubusercontent.com/549577/132259328-2535db3c-1f99-422e-896d-63bc69dae7cc.png)
Good call! Visible item count
I think we need to take this a step further and show both total count and currently visible. My suggestion is the format of Clear selection buttonWhile having a "Clear selection" button in the bulk actions dropdown is very helpful, it's also not a quick action. I'd suggest rolling it into the utility bar itself. Other considerationsButton sizes
Yes, the primary focus is Amsterdam (Kibana v8 theme). There may be a few inconsistencies for a while but v7 will be removed in Kibana 8.0. ContainerBorder
We can add this as an actual CSS Padding
This should be more tied to the table's density/compressed prop than asking the consumer to make that decision. |
Love this addition for paginated tables!
I went back and forth on this myself. Some of my earlier concepts for this component also had the clear selection action exposed in the utility bar, rather than nested within the currently selected actions context menu. Ultimately, I chose to put it in the currently selected actions context menu for two reasons:
Thoughts?
Good question. I believe my original thinking was to include such options for extensibility's sake, allowing it to flank a component from above or below. But maybe that's not necessary and should be omitted until a use case arises.
If we're only considering integrating this directly into table-based components ( |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
I had a meeting today with @evangelia-mitsopoulou and she will help us implement this component. We're going to start with a component spec that can be found here. This component has been highly requested and I think by having @evangelia-mitsopoulou helping we should go ahead and add it to EUI. I'll be helping with the design. Likely we're use the one we already have in Figma. But I'll do a research in our products to find the usage of bulk actions and to see if this design is suitable for all the use cases. |
Yay! I'm glad to see this getting picked up again. Let me know if want any help or input from me on the design side, @miukimiu. Caroline and I debated on a number of different ways to approach various aspects of this proposed component, so I'd be happy to assist or provide any historical context. |
With Elizabet gone, we've lost context for this work and currently do not have any plans to start it. Is there anyone currently on this thread that would be interested in catching up the team as to need and priority level for this issue? |
Thanks, @cee-chen! I'd be happy to provide context to the team on this issue as I'm able. Just let me know when and where would be best to chat. |
We discussed this in a synchronous meeting today. Adding some notes: From the design side, it sounds like there are still some details to work out, so next steps are:
Keep the EUI team up to date and when you feel it's ready for us to take a look at from the technical perspective, we'll do so. The things we'll consider:
Also, for tracking, here is a link to an internal design-system-team repository: https://github.com/elastic/design-system-team/issues/183 where the work on this pattern is being tracked as well. I'm marking this as High priority because I believe this type of work is in-line with the type of value our team and library can uniquely add to Elastic. |
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed. |
Summary
I believe we have a need for a new EUI component that would allow us to prepend meta information and bulk actions to adjacent, related EUI components (namely the tabular-focused ones). The use case for such a supplementary component would be to:
History
Specifically regarding bulk selection and actions, past patterns have emerged across Kibana that required either:
EuiSearchBar
component) to make way for the conditional appearance of bulk action buttons.Neither of the above are desirable solutions. The shuffling of interface elements can be confusing and potentially obtrusive to users, as it usually demands diminishing the presence of other elements on the page (such as a search bar). The disabling of bulk action buttons artificially bloats the page with controls users are unable to interact with until a bulk selection is made. The hope is that this newly proposed component would alleviate both of these concerns and provide a consistent design pattern.
It's also worth mentioning that the arrival of the new
EuiDataGrid
component also brought with it a means in which designers and engineers are able to implement bulk actions, but it is currently not an independent component and is tied toEuiDataGrid
. Ideally, this would be a separate, agnostic component that could be prepended to any existing EUI element (EuiDataGrid
,EuiBasicTable
, others) to provide meta information and bulk actions in a consistent and predictable manner.Desired Features
Functional
Default Meta Information
The component should be expected to always present the user with a minimum amount of information related to the content the are currently viewing. In the case of tabular data, the default expectation would be to show a total count of the current objects/rows being presented (based on the currently applied search/filter values or lack thereof).
Conditional Bulk Selection Information & Actions
Assuming the content related to the utility bar supports bulk actions, the selection of one or more objects/rows should cause a count of those selected objects/rows to appear adjacent to the aforementioned total count.
This selection count should also double as a button. Interacting with this button should open a context menu of bulk actions the user can perform on the selected objects/rows. The bulk action context menu should include the option to clear the current bulk selection and at least one additional bulk action at a minimum. This bulk selection count button (and by relation, the total count) should be left-aligned in order to maintain a close proximity to the related content's bulk selection controls (which typically appear in the first, left-hand column of tabular components).
If the related content (ex. tabular component) is paginated, then the use of any "select-all-objects-on-this-page" option should trigger the conditional appearance of a "Select everything on all pages" button (which will cause all objects/rows on all pages to be included within the current bulk selection). Choosing either the clear selection action from the bulk action context menu or interacting with the "select-all-objects-on-this-page" option again should clear the current bulk selection entirely (causing all conditional bulk actions to disappear again).
Optional Props & Children
Ideally, there would be an optional border prop included in this component, which would allow designers and developers to choose how the component should appear in close proximity to a variety of existing EUI components.
Assuming all meta information and bulk actions are left-aligned as detailed above, we can also utilize the right-hand portion of the proposed utility bar component by making it available as a freeform actions area (that accepts any React node). As we cannot assume all actions for content will always be bulk-oriented actions, this will give designers an additional area of possible interactivity without demanding additional space be used (further ensuring consistency). For example, here is an older example of the utility bar concept that was proposed for SIEM to allow users to perform aggregation and column customization actions, in addition the any bulk actions.
Aesthetic
In order to support the easy accompaniment of this component with a wide variety of EUI components, I believe that a minimal design would be best.
Open Questions
EuiDataGrid
component? I assume the answer will be "yes" for consistency, but to what degree may be worth discussing in advance.xxs
) to be made available? I've personally desired a 12px font-sizeEuiButtonEmpty
option in a number of circumstances, including here.Additional Examples
The text was updated successfully, but these errors were encountered: