Make WordPress Core

Opened 6 months ago

Last modified 10 days ago

#65300 new defect (bug)

Increase Minor Bottom Spacing for Labels “Filter by type” and “Filter by date” in Media Modal

Reported by: deeppatel8950 Owned by:
Priority: normal Milestone: 7.2
Component: Media Version: 7.0
Severity: normal Keywords: has-patch changes-requested
Cc: Focuses: ui, css, administration

Description

While reviewing the WordPress Media Library modal (Select or Upload Media), I noticed a minor UI spacing issue with the labels:

Filter by type
Filter by date

The spacing between the label text and their dropdown fields looks slightly tight and could be improved for better visual consistency and readability.

Attachments (3)

WordPress Media.png​ (235.0 KB ) - added by deeppatel8950 6 months ago.
65300-without-PR.png​ (13.1 KB ) - added by jns141191 2 months ago.
65300-with-PR.png​ (20.9 KB ) - added by jns141191 2 months ago.

Download all attachments as: .zip

Change History (22)

#2 @ankitkumarshah
6 months ago

Hi @deeppatel8950, I’ve opened a PR where I added a 6px top margin to align with the media modal and maintain visual consistency. When you have a chance, could you please take a look and share your feedback? Thank you!

https://i.postimg.cc/W33cQLrF/Screenshot-2026-05-22-at-10-26-46-PM.png

https://i.postimg.cc/Pf0Nz2sp/Screenshot-2026-05-22-at-10-26-10-PM.png

#3 @jorbin
6 months ago

  • Milestone Awaiting Review → 7.0.1

Moving to the 7.0.1 milestone for consideration.

​@wildworks commented on ​PR #11927:


5 months ago
#4

Thanks for the PR. However, the attached screenshot does not match my local trunk branch.

First, the media library itself lacks visual labels in the first place:

https://github.com/user-attachments/assets/5d97fc63-c585-45af-b03d-224f268f698b

Furthermore, the .media-frame.mode-grid .media-toolbar selector should not apply to the media library launched in the block editor.

Could you test again if this PR is correct?

​@masteradhoc commented on ​PR #11927:


5 months ago
#5

@Infinite-Null Thank you very much for the PR. i can confirm the findings of @t-hamano.

The media library looks fine without this PR:
https://github.com/user-attachments/assets/0ec2a409-1b52-47e8-aba2-61845ef29ce7

With this PR it looks misaligned:
https://github.com/user-attachments/assets/a7b25154-f52b-4839-9981-8bed16ed8c4b

--

As we'll the author reported the labels to be too close together - specifically at the select or upload media screen (right @deeppatel8950?)
https://github.com/user-attachments/assets/1d727c5d-1008-4518-a298-c10096450b5b

This hasnt been fixed yet. Can you take a look at this?
If you dont have time currently no worries! Feel free to close this PR.

#6 @masteradhoc
5 months ago

  • Keywords changes-requested added

​@ankitkumarshah commented on ​PR #11927:


5 months ago
#7

Thanks for checking this!

There might have been an environment-specific issue when I initially tested this. In fact, I attached a screenshot in the PR itself of what I was seeing.

Based on the feedback, I've updated the PR to target only the media modal used for selecting media in the block editor.

Could you please test the latest changes and let me know if they now match the expected behavior?

https://github.com/user-attachments/assets/2bfb5240-fe38-4b4a-ac38-d050890bb6e8

​@masteradhoc commented on ​PR #11927:


5 months ago
#8

Thanks for the update @Infinite-Null, this looks good on my side as well:
https://github.com/user-attachments/assets/8f1f023c-4b31-4c41-8feb-ece5f474538e

Maybe we could add some more spacing as well for smaller screens between the fields? (565px width on my test)
https://github.com/user-attachments/assets/b2dda169-e04e-4b3a-a28d-4e93e7141c34

​@ankitkumarshah commented on ​PR #11927:


5 months ago
#9

Done! I've added some extra spacing (that is 8px) between the fields for smaller screens as well. Could you please take another look and let me know if it looks good now?

#10 @masteradhoc
5 months ago

  • Milestone 7.0.1 → 7.0.2

As the RC for WP 7.0.1 is expected to land tomorrow we'll have to punt this to 7.0.2.

#11 @ravichudasama01
4 months ago

Tested the patch and confirmed the issue is resolved.

The spacing below the "Filter by type" and "Filter by date" labels in the Media Modal is now consistent and provides better visual separation from their corresponding dropdown fields.

Kindly refer below screenshot:-
​https://prnt.sc/voKZ7fHPjZr5

#12 @jorbin
4 months ago

  • Milestone 7.0.2 → 7.0.3

#13 @masteradhoc
3 months ago

  • Milestone 7.0.3 → 7.1

As there will be no 7.0.3 release planned right now im moving this bug to 7.1 for consideration.

#14 @wildworks
3 months ago

  • Milestone 7.1 → 7.2

Punting this to 7.2 as the 7.1 RC1 release is imminent.

This ticket was mentioned in ​Slack in #core-test by r1k0. ​View the logs.


2 months ago

#16 @jns141191
2 months ago

Test Report

Patch tested: ​https://github.com/WordPress/wordpress-develop/pull/11927.patch

Environment

  • WordPress: 7.1

Steps taken

  1. Added new page.
  1. Added page Title and Image block and clicked on Media Library.
  1. Checked the Filter by type and Filter by date labels and their corresponding dropdown fields.
  1. Verified the spacing between the labels and dropdown fields before applying the patch.
  1. Applied/tested the patch from PR.
  1. Reopened the Media Modal and checked the same labels and dropdown fields.
  1. Confirmed that the bottom spacing between the labels and dropdown fields has been increased and the UI appears more consistent and readable.
  1. ✅ Patch is solving the problem.

Expected result

  • The Filter by type and Filter by date labels should have slightly increased bottom spacing from their dropdown fields.
  • The additional spacing should improve readability and provide better visual consistency within the Media Modal.
  • No layout or functionality regressions should be introduced.

Additional Notes

  • Tested using WordPress Playground.
  • The patch successfully improves the minor spacing issue between the filter labels and their dropdown fields.
  • No functional issues were observed during testing.

Screenshots with results

  • Screenshot before:
  • Screenshot after:

Support Content

This ticket was mentioned in ​Slack in #core by im3dabasia1. ​View the logs.


11 days ago

#18 @im3dabasia1
11 days ago

As per today’s 7.2 bug scrub:

The ​PR has been updated and tested since the earlier feedback. @ankitkumarshah, is it ready for review, and have all the feedback points been addressed? @masteradhoc and/or @wildworks , would you be able to review it?

​@wildworks commented on ​PR #11927:


10 days ago
#19

@Infinite-Null, sorry for the late reply. Could you resolve the conflicts and take another look so that we can make a final decision on whether to merge this PR?

Note: See TracTickets for help on using tickets.