Skip to content

[BulkActions] - Add an action group as a promotedAction #4246

@thiagoloschi

Description

@thiagoloschi

Feature request summary

We'd like to be able to make promotedActions evolve into action groups, so that we can offer more meaningful actions, group them into menus and keep the UX organized.

Screen Shot 2021-06-03 at 10 17 29 PM

ActionGroup.mp4

Rationale

It seems that Polaris advises limiting promotedActions up to 2 actions, and as part of a project initiative, we would need to add a third one to the BulkActions component that is being used on the Orders index page. We also know that more actions will be added in the near future and they would benefit from this addition.

Our team’s suggestion is that we add the ability to make promoted actions evolve into action groups, similarly to what we do on the Page component. With this addition, we would be able to give merchants more options to improve their workflow, grouping these actions by subject, for example.

Potential solution

I thought of changing the promotedActions prop to start accepting a MenuGroupDescriptor [] as we do for ActionGroups on the Page component, and then dynamically render either the single button or the menu depending on the props' type. This option would be trickier to implement but should scale better as we could have for example two menus at the same time.

A simpler alternative would be to add an extra prop to render only one menu and limit promoted actions to 1 instead of 2.

I’m working on a first draft PR but I would love to hear thoughts on that.


🌟 Feature requests that are not yet planned will be closed. We then use the issue’s 👍 upvotes to track and set priorities. See the contribution guidelines for more information.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions