-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: when there's only one action and is primary, hide actions dropdown #65165
Comments
I think this makes sense for table layout. How do you see it working in other layouts, it might look a bit odd in Grid? |
Right. Making this work for Table & List (only them display primary actions) should be a good first step, leaving Grid as it is (users interact with actions via the dropdown). |
Sounds good to me! |
What's difficult about grid that we cannot have actions? Is it that the actions compete with the title for the space? Related #65600 I'm thinking it'd be nice to support this interaction in DataViews. Perhaps we'd want it in the media library so you can preview images with duotone filters? Or in the templates page to quickly see how different palettes affect a template? All those little rounded buttons would be primary actions: Gravacao.do.ecra.2024-09-25.as.18.07.54.mov(not that we need to address it right now, but thought I'd share as food for thought) |
Mostly yes. Displaying primary actions would require a good design. How would the example actions you shared work on table layout, or would they be layout-locked (grid/list only)? |
Consumers can already provide actions that are specific to a layout with something along these lines: let actions = [];
switch (view.type) {
case 'grid':
actions = getGridActions();
break;
default:
actions = getDefaultActions();
}
<DataViews
view={ view }
actions={ actions }
/> In the example I shared I agree those color switcher actions wouldn't make much sense in table, for example. |
I've started to work on this for the list layout: #67015 @jameskoster I'm thinking about tackling table next. If we hide the actions menu for table, I believe the primary action' icon should always be visible (now it's only displayed on hover). Thoughts? |
#67020 for table layout. |
The changes for table have landed and list changes are scheduled to land soon, so I'm closing this one. |
What
In some scenarios, the DataViews' consumer only declares one primary action. This is how it looks
Gravacao.do.ecra.2024-09-09.as.17.30.02.mov
Proposal
The text was updated successfully, but these errors were encountered: