Filter media library by optimization status - #13
Conversation
|
Thanks for the PR. The dropdown renders in the right place and the wiring is clean, but the filter results don't match the column they're filtering. A few things to fix before this can go in. 1. Use the queue table, not
The 2. Unsupported attachments shouldn't appear in "Not yet optimized". PDFs and videos currently land there, showing "Not an image that can be optimized" in the column. Restrict to 3. Eligible JPEGs/PNGs that produced no smaller sidecar end up 4. The hidden-column check must not disable the query.
5. Smaller items:
|
|
Addressed the review in
I also added the grid-mode limitation to the PR description. |
|
Thanks — the filtering itself tests out well. CI is red from two things: 1. A bug on my side, now fixed. 2. The dropdown assertion. Once those are green I'll merge. Two follow-ups I'll handle myself afterwards:
I'll also keep the dropdown visible when a filter is active but the column is hidden. |
8227e8d to
458de2d
Compare
|
Rebased onto current main (including d3f4d98) and updated the dropdown assertion to match selected='selected'. The branch has been resubmitted. Thanks for fixing the queue-table cache issue and clarifying the follow-ups. |
37ba80d to
ccaa5d6
Compare
|
The rebase and dropdown assertion are now confirmed: PHPCS and PHP Compatibility pass, and the dropdown test itself is green. The unit matrix still reports Database::is_installed() as false after Database::install() in both queue-backed tests, even with d3f4d98 in this branch; class-database.php is identical to current main. I added boundary assertions to confirm the failure occurs before Queue::add(): https://github.com/WebberZone/webberzone-image-optimizer/actions/runs/33886291874. Could you please take another look at the main-side table-install/cache fix? |
ccaa5d6 to
c571f51
Compare
|
Tracked the remaining failure to the test fixture rather than d3f4d98. I moved |
…s-filter Filter media library by optimization status
Summary
Tests
Known limitation
Media Library grid mode does not fire
restrict_manage_postsand usesadmin-ajax.php, so this dropdown remains list-view only.Fixes #10