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

Show quick actions on narrow screens #4580

Merged
merged 11 commits into from Sep 4, 2023
Merged

Conversation

p2edwards
Copy link
Contributor

@p2edwards p2edwards commented Aug 10, 2023

Description

Wrap the Projects View header so that quick action buttons show up on mobile devices.

Reduce quick actions to Sharing, Archive, Delete.

Show the buttons even if the selection is empty, and show helpful tooltips on desktop even when actions are not possible.

Related issues

Fixes #4583
Related to #4404

Details

These are the Quick Actions now:

  • Archive/Unarchive
  • Sharing
  • Delete

The 'Edit Project' button and the dropdown menu with other actions were removed.

Placeholder buttons for Archive, Sharing, Delete are now shown all the time.

  • The hover tooltips, which show on screens > 768px wide, provide special hints if your selection is empty or, in case of the Archive button, consists of 1 draft.

Bulk 'Delete' button is now enabled only if the user has management access to every selected project.

Checklist

  • Wrap so that on narrow widths, you can still access every button
  •  Show (faded/disabled) versions of every button when they don't apply, instead of disappearing them
  •  Simplify options (Archive, Sharing, Delete)
  • Right-align tooltips so they are less likely to get cropped
  • Refine tooltips for clarity
  • Add a guard for Bulk Delete
  • Make custom view routes show bulk actions, too

@p2edwards p2edwards force-pushed the quick-actions-mobile branch 3 times, most recently from 00159b6 to d54935b Compare August 21, 2023 22:36
@p2edwards p2edwards marked this pull request as ready for review August 21, 2023 22:46
@p2edwards p2edwards force-pushed the quick-actions-mobile branch 2 times, most recently from bf559fb to 51c15a1 Compare August 21, 2023 23:46
@jnm jnm requested a review from srartese August 24, 2023 16:01
jsapp/js/projects/projectsTable/projectActions.module.scss Outdated Show resolved Hide resolved
jsapp/js/projects/projectsTable/projectBulkActions.tsx Outdated Show resolved Hide resolved
jsapp/js/projects/customViewRoute.tsx Show resolved Hide resolved
{selectedAssets.length === 1 && (
<div className={styles.quickActions}>
<div className={styles.actions}>
<ProjectQuickActions asset={selectedAssets[0]} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder… when I select a project, and do some bulk action (e.g. archive) and it goes through successfuly, the projects list updated, but the project is still selected. Do you think we should unselect all projects whenever the list is being updated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more normal to retain the selection after a bulk action. e.g. Gmail bulk "mark read", Finder bulk rename or tag – both retain the selection.

More:

  • For us it's a little moot right now since we only support delete. But if we supported >1 archive it might be nice to retain the selection so you can see where they all went.
  • I definitely want to retain the selection if the list is 'updated' due to pagination infinite scroll

This selection UI in general feels a little incomplete, as we don't support ranged selection or deselect-all (clear selection button) yet. If we add bulk archive / unarchive it would be nice to have an undo. And it might be nice to have a "X projects selected" indicator somewhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add the indicator here:
Screenshot 2023-08-25 at 22 58 08

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it would be nice to have it (not saying we should add it right now), as after I archived a project, it went outside the visible area. By mistake user could think that there is nothing selected, and could select another project and got confused or did some action unknowingly.

@magicznyleszek magicznyleszek merged commit 6ddce34 into beta Sep 4, 2023
3 of 4 checks passed
@magicznyleszek magicznyleszek deleted the quick-actions-mobile branch September 4, 2023 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants