Editor: Align media attachment filters in CSS grid layout#11891
Editor: Align media attachment filters in CSS grid layout#11891NoumaanAhamed wants to merge 1 commit into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
t-hamano
left a comment
There was a problem hiding this comment.
Hi @NoumaanAhamed, thanks for working on this issue. However, let me close this as there is already an ongoing PR.
What?
Fixes the visual offset and alignment of the "Filter by date" dropdown in the Media Library modal when the "Filter by type" dropdown is hidden. It also ensures that the filters and the search input box are vertically aligned on the same row.
Why?
When a
wp.media()frame is opened with the library restricted to a single MIME type (e.g.,library: { type: 'image' }), the "Filter by type" dropdown is hidden. Because column placement in the media toolbar was previously hardcoded, this caused the "Filter by date" dropdown remained offset in the second column, leaving a large empty space to its left.How?
CSS Grid Auto-Placement: Updated the toolbar filters in
src/wp-includes/css/media-views.cssto use CSS Grid auto-placement (placing labels ongrid-row: 1and selects ongrid-row: 2) rather than hardcoded columns. This allows the date filter dropdown to slide flush-left naturally when the type filter is hidden.Screenshots
Testing Instructions
/wp-admin/post-new.php.Trac ticket: https://core.trac.wordpress.org/ticket/65276
Use of AI Tools
AI assistance: Yes
Tool(s): Antigravity
Model(s): Gemini
Used for: Refactoring styling rules to use auto-placement grids.