[Action Bar, Action Group] Improve configurability of action groups to support powerful, intuitive, accessible UI #11126
Labels
0 - new
New issues that need assignment.
ArcGIS Maps SDK for JavaScript
Issues logged by ArcGIS SDK for JavaScript team members.
calcite-components
Issues specific to the @esri/calcite-components package.
enhancement
Issues tied to a new feature or request.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
needs triage
Planning workflow - pending design/dev review.
Check existing issues
Description
The current automatic collapsing behavior of calcite-action-group within calcite-action-bar is a very promising approach for accommodating powerful menus in contexts of limited available space. Unfortunately, there are currently unresolvable conflicts between the default behavior and the UI needs of my product.
Key challenges:
overflow-mode
property, with options likesplit-button
andmenu
(naming not important).wrap
ornever
option to theoverflow-mode
property described aboveAcceptance Criteria
Relevant Info
#7507 is also relevant, but there are additional requirements to improve the situation for calcite-action-bar
Which Component
Example Use Case
Split button mode
In the case of selection tools, it is common to present these as a split button:
Screen.Recording.2024-12-20.at.2.39.24.PM.mov
The app in the video is using a calcite-action with
compact
(deprecated) set and custom menu. I think it makes sense for action-group to have a mode that implements this automatically. A split button will save space relative to the overflow menu action, and better match user expectations in some cases.Collapse prioritization
I have a toolbar for controlling drawing on a map. In the ideal case, there is room for all of my buttons. Unfortunately, I don't know how the tool will be used, and the customer can add infinitely many tools.
In the most common case, I want to ensure that there is at least one selection tool, then prioritize showing draw/create tools. Unfortunately, with the current implementation, the draw tools are hidden first:
By convention, the selection tools are presented first, so fiddling with the order is not a solution. Even if it was, it would only be a temporary solution since the order is not documented.
Wrapping
Although it isn't as pretty, there are some advanced use cases where it is better to keep all of the items accessible by wrapping on multiple rows, rather than hiding. I would like to be able to support this, but currently cannot. Wrapping is pretty common for toolbars in apps:
Keeping the active item visible even when overflowing
In the case of a toolbar with several items, I expect the active item to become shown in the main area when selecting from the overflow menu. An example of this behavior is in VS Code:
Screen.Recording.2024-12-20.at.2.53.20.PM.mov
In the GIS context, I have a toolbar with many draw tools. Some of these are placed in an overflow menu. Once I have selected the draw tool, as a user, I should see the current draw tool reflected in the UI. Currently, that is not possible (except maybe with hacks to re-arrange the actions after selection by checking if the selected action is a descendant of a calcite-action-menu). I also need to support users who will attach a popover to the active menu item, and that will not work if it is hidden in the overflow menu.
Screen.Recording.2024-12-20.at.2.59.30.PM.mov
Screen.Recording.2024-12-20.at.3.00.05.PM.mov
Priority impact
impact - p2 - want for an upcoming milestone
Calcite package
Esri team
ArcGIS Maps SDK for JavaScript
The text was updated successfully, but these errors were encountered: