[wp-trac] [WordPress Trac] #42763: class-wp-list-table unnecessarily disables first and last pagination buttons

WordPress Trac noreply at wordpress.org
Fri Oct 1 18:15:41 UTC 2021


#42763: class-wp-list-table unnecessarily disables first and last pagination
buttons
------------------------------+---------------------------------
 Reporter:  wp_kc             |       Owner:  audrasjb
     Type:  enhancement       |      Status:  accepted
 Priority:  normal            |   Milestone:  5.9
Component:  General           |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  ui, administration
------------------------------+---------------------------------

Comment (by hellofromTonya):

 = Test Report

 Env:
 - Localhost: wp-env
 - OS: macOS Big Sur v 11.6
 - Browser: Chrome v 93.0.4577.82 and Firefox v 92.0
 - Imported [https://codex.wordpress.org/Theme_Unit_Test theme unit test
 xml]
 - Set the number of items on the page to 5 with this `mu-plugin`
 {{{#!php
 <?php

 add_filter( 'edit_posts_per_page', function() { return 5; } );
 }}}

 == Test Before

 Steps:

 1. Go to`Posts` page
 2. Click the next page `›` button => should go to Page 2
 3. On Page 2, notice that the first page `«` button is disabled
 4. Click on the last page `»` button => should go to the last page
 5. Click on the previous page `‹` button
 6. Notice the last page `»` button is disabled

 Results:
 - First page button is disabled when on Page 2 ✅
 - Last page button is disabled when on last page - 1 ✅

 Able to reproduce ✅

 == After applying patch

 Steps:

 1. Applied [attachment:"42763.2.diff"] patch
 2. Repeat steps above; however this time the first and last page buttons
 should remain enabled

 Results:
 - First page button is enabled when on Page 2 ✅
 - Last page button is enabled when on last page - 1 ✅

 Works as expected ✅

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42763#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list