Opened 13 days ago
Last modified 32 hours ago
#63372 new defect (bug)
Tags page UI inconsistencies when adding or deleting tags
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch changes-requested has-test-info |
Focuses: | ui, accessibility, javascript, css | Cc: |
Description
There are several UI issues on the Tags page in the WordPress admin when adding or deleting tags:
1. "No tags found." message not shown after last tag is deleted:
When all tags are removed using the JavaScript interface, the message "No tags found." does not appear until the page is manually refreshed. Also, the .tablenav
sections (top and bottom) are not removed immediately and remain visible until refresh.
2. Bulk action and item count does not reappear when a new tag is added via JS:
If there are no tags and a new tag is added using the input form (handled via JavaScript), the .tablenav
sections remain hidden and do not reappear unless the page is refreshed.
3. Pagination count not updated:
When tags are added or deleted via JavaScript and the tag list is paginated, the pagination count is not updated accordingly. This leads to inconsistencies between the actual number of tags and what's shown in the pagination controls.
These issues appear to stem from the fact that while tag creation and deletion are handled client-side via JavaScript, updates to .tablenav
visibility and pagination count are handled by PHP and only rendered on full page reload.
Steps to reproduce
- Go to Posts > Tags.
- Delete all tags using the delete links in the table (handled via JS).
- Notice that the "No tags found." message does not appear.
.tablenav
sections remain visible.
- Refresh and Add a new tag using the "Add New Tag" form.
- The new tag appears in the list via JavaScript.
- However, the
.tablenav
sections remain hidden and do not reappear.
- Add or delete tags while viewing a paginated list.
- The pagination count does not reflect the updated number of tags.
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 135.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.2
- MU Plugins: None activated
- Plugins: Test Reports 1.2.0
Screencast
https://rioudcpuyg.ufs.sh/f/PL8E4NiPUWyOaBpE7dHJcb5UXrLqDIo97jZKdMWg8iplmysR
Change History (4)
This ticket was mentioned in PR #8761 on WordPress/wordpress-develop by @sainathpoojary.
13 days ago
#1
- Keywords has-patch added
#2
@
13 days ago
- Keywords changes-requested has-testing-info added
Combined Reproduction and Patch Test Report
Description
❌ This report can't validate that the indicated patch works completely as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8761.diff
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 135.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty-One 2.5
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Reproduction Steps
- Screen Options ⇒ Fixed to Number of items per page (10) for pagination
- Create some tags
- Remove all tags
- 🐞 First bug reproduced (no "No tags found", message)
- Start adding tags
- 🐞 Second bug reproduced (
tablenav
appears) - 🐞 Third bug reproduced The number of items don't update
- 🐞 Extra potential bug: When reaching the fixed number of items per page (10 in my case), pagination doesn't appear when we have more than 10 items, until we refresh.
Expected results
- When all tags are removed, "No tags found" should appear
- The
tablenav
should appear as soon as there are new tags to be able to deal with them - The number of items should update every new tag we create
- Reaching the Number of items per page, should add a pagination control.
Actual Results with Patch
- ✅ "No tags found" appears correctly when all tags removed
- ❌
tablenav
still doesn't appear after adding new tags - ❌ Number of items don't appear
- ❌ With a refresh number of items appear, but they don't update with each new tag
- ❌ When reaching the "Number of items per page", the pagination control still doesn't appear without refresh.
Additional Notes
Added a screencast to showcase the problems that still exist
Supplemental Artifacts
Screencast: https://streamable.com/zdp0ro
This PR fixes:
.tablenav
sections when no tags are present..tablenav
sections when a new tag is added via JS if none previously existed.Trac ticket: #63372