Opened 6 years ago
Closed 5 years ago
#46757 closed defect (bug) (fixed)
Media Trash: The Bulk Media options when in the Trash shouldn't provide two primary buttons
Reported by: | garrett-eclipse | Owned by: | afercia |
---|---|---|---|
Milestone: | 5.2.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-screenshots has-patch commit fixed-major needs-testing |
Focuses: | ui, accessibility, administration | Cc: |
Description
Hello,
This was raised by @karmastosed in the #design slack here - https://wordpress.slack.com/archives/C02S78ZAL/p1554138094057000
The question;
Can I ask the thinking in having these 2 primary?
Screen coming, but in the Media Trash when you do bulk actions you're presented with three buttons two of which are 'primary'.
This was raised in design review of #44675.
Cheers
Attachments (5)
Change History (27)
#2
@
6 years ago
- Keywords needs-design-feedback added
Is there any consensus on which button should be changed and what button class
it should be changed to? I did not see any suggestions in the slack discussion referenced above. It seems that the WordPress admin only has button-primary
and button-secondary
so our options are limited without adding a new class, which is probably not warranted.
#5
@
6 years ago
Hi @ianbelanger, there wasn't much discussion aside from the initial note there so will leave for design feedback. I just wanted to updated with the latest screen from #44675.
I see what you mean with the classes, I would almost suggest a red button class be introduced specifically for 'Delete Permanently' and potentially even the 'Move to Trash' button as their link counterparts throughout actions like the Row Actions and Publishing Actions all have the link in red as it should give the user pause and indication that they're doing a removal action.
I'll leave it to #design to indicate if warranted but IMHO I would feel that a red button would make sense here.
Cheers
#6
@
6 years ago
I'd tend to think none of them should be primary. "Restore" and "Delete permanently" are of the same importance and definitely depend on the user intent. In this specific case, I'm not sure WordPress should try to predict what the user flow is and consequently identify a primary action.
I'd consider to make them normal buttons.
Aside: in the Posts trash, the "Empty Trash" button is not primary: the comparison may not fully apply, as "Empty Trash" is the only button there, but worth considering for consistency.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
6 years ago
#8
@
5 years ago
- Focuses accessibility added
- Milestone changed from Awaiting Review to 5.3
- Owner set to afercia
- Status changed from new to assigned
As in this release cycle there's some focus on improvements for the media views, due also to the WPCampus accessibility report, I'd like to propose this ticket for 5.3 consideration together with #46758.
#9
@
5 years ago
suggest a red button class
Worth considering the alternate color schemes available under "Your Profile". For example, the "Midnight" color scheme makes all the buttons red. New delete
red buttons would be hard to distinguish from normal buttons.
The current pattern for controls associated with destructive action in WordPress is red underlined text
, whether the underlying HTML element is a link or a button. While this may be not 100% ideal, because it's unclear if the control is a link or a button, I'd like to propose to follow the current pattern. There's already a button-link-delete
CSS class that can be used for this purpose.
These buttons should also be reordered, as pointed out in #46758. The primary action button should be on the left, and the destructive action button should be clearly distinguishable. Worth also reminding that for accessibility, all related controls should be visually grouped together. See #40822.
Considering the above, I've quickly tried a few simple changes. See the screenshot below, which tries to illustrate all the possible states of these buttons.
#10
@
5 years ago
- Keywords has-patch added
46757.diff implements the changes above, fixing also #46758. It also fixes a minor bug where the disabled state was not set correctly when switching between the select and edit modes.
Some design feedback and testing would be nice :) Reminder: to test the metia Trash, set
define( 'MEDIA_TRASH', true );
in your wp-config.php
file.
#11
@
5 years ago
I tested 46757.diff and all seems to work as intended. All buttons are arranged, with the primary
button first. All we need is design feedback now.
#12
@
5 years ago
Thanks @afercia I appreciate moving this forward and the patch. It works nicely for me so will second @ianbelanger there and aside from a final design say would be happy to see this in place.
Sidenote: This is also resolving #46758, appreciate the double-tap. Should I close the other ticket or wait for this to commit and then tie them together?
#13
@
5 years ago
Should I close the other ticket or wait for this to commit and then tie them together?
Both tickets can be closed during commit.
#14
follow-up:
↓ 15
@
5 years ago
- Keywords needs-design-feedback removed
The proposed changes seem good to me, thank you, everyone. I am going to remove the design feedback keyword to hopefully leave this open now to get into 5.3.
#15
in reply to:
↑ 14
@
5 years ago
- Keywords commit added
Replying to karmatosed:
The proposed changes seem good to me, thank you, everyone. I am going to remove the design feedback keyword to hopefully leave this open now to get into 5.3.
Thanks @karmatosed I appreciate the review. Retesting myself everything is in order and working properly, unit tests are all passing. I just uploaded 46757.2.diff as a refresh to address the minor change of line numbers (no code change).
@afercia marking this for commit, please also close out #46758 during commit.
#17
@
5 years ago
- Keywords fixed-major added
- Milestone changed from 5.3 to 5.2.3
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening this so it can be back-ported to the 5.2 branch.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
5 years ago
#19
@
5 years ago
- Keywords needs-testing added
Adding needs-testing
keyword to validate if this ticket is good to land in 5.2.3 (should be ok though).
#20
@
5 years ago
Tested on my side against 5.2.2 and the patch works fine.
However, unless I'm mistaken [45701] doesn't look to apply cleanly against 5.2.2: some files seem to have dependancies to previous commits.
Screenshot illustrating the dual primary buttons