Skip to content
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

DataViews: Remove primary actions from secondary actions drop down #66811

Open
doekenorg opened this issue Nov 7, 2024 · 1 comment
Open
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Enhancement A suggestion for improvement.

Comments

@doekenorg
Copy link

doekenorg commented Nov 7, 2024

What problem does this address?

In some cases you might have 1 or 2 primary actions, and that's it. The additional actions drop down with the exact same buttons might be overkill (when the screen accommodates all primary buttons). I'd like to be able to hide this menu.

What is your proposed solution?

I propose an explicit isSecondary attribute (with a default of true for backwards compatibility). When set to false this action will not be populated in the action drop down.

Image Image
(Note the delete action missing from the drop down, or the action menu completely missing)

I can imagine actions also being hidden when the screen is smaller, where only the dropdown is visible; and these primary actions are visible too. But that might be a different issue / feature.

I recognise this is mostly useful for table and list views. For Grid I would propose to keep it as is, unless there is only one primary action. Then I would replace the menu button with that primary action.

Image

CC @wordpress/gutenberg-components

@doekenorg doekenorg added the [Type] Enhancement A suggestion for improvement. label Nov 7, 2024
@doekenorg doekenorg changed the title Dataviews: Remove primary actions from secondary actions drop down DataViews: Remove primary actions from secondary actions drop down Nov 7, 2024
@oandregal oandregal added the [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond label Nov 7, 2024
@oandregal
Copy link
Member

oandregal commented Nov 7, 2024

For reference, this is very related to #65165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants