Make WordPress Core

Opened 13 months ago

Last modified 4 weeks ago

#58479 assigned enhancement

Add notice if no posts are selected in Bulk Edit

Reported by: sumitsingh's profile sumitsingh Owned by: quadthemes's profile quadthemes
Milestone: Future Release Priority: normal
Severity: normal Version: 6.2.2
Component: Quick/Bulk Edit Keywords: has-screenshots has-patch needs-testing
Focuses: accessibility, javascript, administration Cc:

Description (last modified by sabernhardt)

On the Posts screen(s), clicking the bulk actions Apply button without selecting any posts does not show an error message.

  1. Visit the Posts screen.
  2. Choose "Edit" in the Bulk actions dropdown.
  3. Without checking any checkboxes, click the Apply button. Nothing seems to happen.
  4. Choose "Move to Trash" in the Bulk actions dropdown.
  5. Click the Apply button. The page reloads but cannot move anything to Trash.
  6. Choose "Bulk actions" at the top of the Bulk actions dropdown.
  7. Click the Apply button. The page reloads with a query string in the URL.

I have checked and it should be a message on the page/post list as per added notice message on the plugin page.

For more information, you can see mentioned quick video.

Thank you

Attachments (4)

Posts ‹ wptest — WordPress.mp4 (941.1 KB) - added by sumitsingh 13 months ago.
here quick video for more clear about suggetion
Posts-‹-wptest-—-WordPress.png (57.2 KB) - added by sumitsingh 13 months ago.
My suggetion
Plugins-‹-wptest-—-WordPress.png (237.6 KB) - added by sumitsingh 13 months ago.
existing example
58479-1.diff (1.9 KB) - added by nihar007 13 months ago.
I added only "no post selected" alert

Download all attachments as: .zip

Change History (37)

@sumitsingh
13 months ago

here quick video for more clear about suggetion

@sumitsingh
13 months ago

existing example

@nihar007
13 months ago

I added only "no post selected" alert

#1 @sabernhardt
13 months ago

  • Component changed from Posts, Post Types to Quick/Bulk Edit
  • Description modified (diff)
  • Focuses javascript added; coding-standards removed
  • Keywords has-patch added
  • Summary changed from We need to add notice on page/post similar to plugin list page to Add notice if no posts are selected in Bulk Edit

#2 @sabernhardt
13 months ago

Categories and Tags pages may need something similar, too (separate ticket?). Those pages reload without an error/notice if no items are selected.

#3 @sumitsingh
13 months ago

I think we can manage in this ticket @sabernhardt. Let me know if I need to create separate for other screen like this validation overall backed side.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


12 months ago

#5 @joedolson
12 months ago

  • Milestone changed from Awaiting Review to 6.4
  • Owner set to joedolson
  • Status changed from new to accepted

#6 @oglekler
10 months ago

@sumitsingh and @joedolson, I wonder if the better approach is to disable button until something will be selected, otherwise page reload is pointless. And message needs to be appear close to button if person is trying to click it that nothing will be changed.

#7 follow-up: @joedolson
10 months ago

See also #45006 and #31634, as well. Disabling the button was tried for 31634, but was not as great a solution as it seemed. There were a lot of accessibility problems.

This patch looks like it could use some refinement, as well.

1) This should probably be an inline admin notice. Then we don't need to disruptively change the viewport position for the user.
2) It should also use wp.a11y.speak so that there's a verbal announcements.

#8 @joedolson
9 months ago

  • Keywords changes-requested added

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


9 months ago

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


9 months ago

#11 @joedolson
9 months ago

  • Owner changed from joedolson to quadthemes
  • Status changed from accepted to assigned

#12 in reply to: ↑ 7 @quadthemes
9 months ago

Adding inline admin notice to bulk action section would result in error being shown at both places(before and after the list). Though it's much better than scroll to top that is currently happening on plugins page. Any opinions? @joedolson

Replying to joedolson:

See also #45006 and #31634, as well. Disabling the button was tried for 31634, but was not as great a solution as it seemed. There were a lot of accessibility problems.

This patch looks like it could use some refinement, as well.

1) This should probably be an inline admin notice. Then we don't need to disruptively change the viewport position for the user.
2) It should also use wp.a11y.speak so that there's a verbal announcements.

Last edited 9 months ago by quadthemes (previous) (diff)

This ticket was mentioned in Slack in #core by marybaum. View the logs.


9 months ago

#14 @marybaum
9 months ago

Can yall get this patch refined in a week? We will look at this again next Tuesday.

#16 @oglekler
9 months ago

  • Keywords needs-testing added; changes-requested removed

Thank you, @quadthemes for the patch. Let's test it.

This ticket was mentioned in Slack in #core-test by oglekler. View the logs.


9 months ago

#18 @huzaifaalmesbah
9 months ago

I've been trying to test and haven't noticed any changes.

#19 @Ankit K Gupta
9 months ago

  • Keywords 2nd-opinion added

Tested the patch https://github.com/WordPress/wordpress-develop/pull/5423 and it works as explained here:

Adding inline admin notice to bulk action section would result in error being shown at both places(before and after the list). Though it's much better than scroll to top that is currently happening on the plugins page.

Plugins Page After the patch:

https://i.imgur.com/blPyiSV.jpg

Posts Page After the Patch:

https://i.imgur.com/WD8QCqJ.jpg

IMO, just showing the message at the top is fine instead of showing the same message in two places on same screen.

Let's wait for another opinion.

#20 @fnpen
9 months ago

@ankit-k-gupta, I also see it only on the top of the page (Plugins), and does not work on posts page.

Last edited 9 months ago by fnpen (previous) (diff)

This ticket was mentioned in PR #5433 on WordPress/wordpress-develop by @fnpen.


9 months ago
#21

#22 @fnpen
9 months ago

This part of the features has a partial implementation for Plugins, but it does not show when action is not selected.

Also, we can select actions for Users and Change Roles where it is a similar requirement to pick rows. The plugins page shows only one notification on top and scrolls the page up.

Implementation:

  • Covers cases of any list table with role selector and plugins page.
  • Shows one notification when no action or item is selected

'addAdminNotice' will be a good idea to make it global and universal.

This ticket was mentioned in Slack in #core by oglekler. View the logs.


9 months ago

#24 @oglekler
8 months ago

  • Keywords 2nd-opinion removed
  • Milestone changed from 6.4 to 6.5

We have RC1 tomorrow, so, I am moving this to the next milestone. Right now we can work further on the ticket, and it can land into the 6.5 as soon as it will be ready.

This ticket was mentioned in Slack in #core by abhanonstopnews. View the logs.


6 months ago

#26 @webcommsat
6 months ago

Discussed amongst maintainers ahead of today's bug scrub. @quadthemes (sunnyssr on Slack) asked if any additional help needed or if there was an update to move this ticket forward. There are some comments above from testing and a potential implementation suggested by @fnpen .
Thanks everyone.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


5 months ago

#28 @ukdrahul
4 months ago

Test Report

Environment

  • WordPress: 6.5-beta1
  • PHP: 8.1.23
  • Server: Apache v2.4.58
  • Database: MySQL 8.0.16
  • Browser: Chrome v121.0.6167.160 (Official Build) (arm64)
  • OS: macOS Sonoma v14.2.1 (23C71)
  • Theme: Twenty Twenty-Four v1.0

Verdict

The issue reported in this ticket still persists in the tested environment.

Last edited 4 months ago by ukdrahul (previous) (diff)

#29 @swissspidy
4 months ago

  • Milestone changed from 6.5 to 6.6
  • Type changed from defect (bug) to enhancement

Moving to 6.6 as this is an enhancement and we're already in 6.5 beta

This ticket was mentioned in Slack in #core by oglekler. View the logs.


5 weeks ago

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


5 weeks ago

#33 @audrasjb
4 weeks ago

  • Milestone changed from 6.6 to Future Release

Moving this ticket to Future Release pending a new patch as we're one week before 6.6 beta 1.

Note: See TracTickets for help on using tickets.