[wp-trac] [WordPress Trac] #42066: List tables: consider a new method to generate the views links markup

WordPress Trac noreply at wordpress.org
Fri Sep 2 04:45:25 UTC 2022


#42066: List tables: consider a new method to generate the views links markup
-------------------------------------------------+-------------------------
 Reporter:  afercia                              |       Owner:  costdev
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.1
Component:  Administration                       |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by costdev):

 * keywords:  has-patch needs-testing has-unit-tests dev-feedback => has-
     patch needs-testing has-unit-tests


Comment:

 Thanks @audrasjb! I've updated [https://github.com/WordPress/wordpress-
 develop/pull/2828 PR 2828] with the following changes:

 1. As agreed, the tests have been updated to reflect that the affected
 list tables that previously rendered `href=''` will now render `href=""`.
 2. As agreed, the tests have been updated to reflect that `&` will now be
 escaped to `&`
   - This is done by `esc_url()`, `&` fans should direct their
 attention there 😝
 3. As agreed, the faulty test introduced in the PR has been fixed to use
 actual user counts rather than what happened to be my local user counts
 (my bad!)
 4. After rebasing on `trunk`, the new tests for `WP_Comments_List_Table`
 and `WP_Post_Comments_List_Table` were faulty.
   - They would run as part of the whole test suite, but not in isolation.
 I'm not sure what commit may have affected these, but either way, the
 solution was to make sure that `$this->table->prepare_items()` was called
 in these two particular tests.
   - This fix has been applied to the original test commits for
 [https://github.com/WordPress/wordpress-
 develop/pull/2828/commits/815daf514ab75f15ba63704467ebef5fc6d264ab
 Comments] and [https://github.com/WordPress/wordpress-
 develop/pull/2828/commits/ea3e1cd22086ad32172f3f157ab0aff5da61f31f Post
 Comments].

 The PR is ready for another review and testing.

 -----
 - Removing `dev-feedback`.

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


More information about the wp-trac mailing list