Make WordPress Core

Opened 12 months ago

Closed 6 months ago

#63310 closed enhancement (fixed)

On mobile devices, the search bar in the WordPress admin "Pages" section has an unnecessary right margin, which negatively impacts the visual alignment and user experience.

Reported by: ronak44's profile ronak44 Owned by: joedolson's profile joedolson
Milestone: 6.9 Priority: normal
Severity: normal Version: 3.7.4
Component: Administration Keywords: has-patch commit
Focuses: ui, css Cc:

Description

On mobile devices, the search bar in the WordPress admin "Pages" section has an unnecessary right margin, which negatively impacts the visual alignment and user experience.

Attachments (11)

Screenshot_1.png (111.1 KB) - added by ronak44 12 months ago.
Screenshot_2.png (108.4 KB) - added by ronak44 12 months ago.
63310.diff (373 bytes) - added by sourav08 12 months ago.
63310.2.patch (357 bytes) - added by dilipbheda 12 months ago.
Updated patch
63510.patch (335 bytes) - added by SirLouen 10 months ago.
63510.patch by @dhruvang21
before.png (28.0 KB) - added by shailu25 7 months ago.
Before Patch
after.png (28.4 KB) - added by shailu25 7 months ago.
After Patch
Screenshot 2025-10-19 at 10.51.56 AM.png (131.1 KB) - added by joedolson 6 months ago.
Plugins - before
Screenshot 2025-10-19 at 10.52.21 AM.png (221.3 KB) - added by joedolson 6 months ago.
Themes - before
Screenshot 2025-10-19 at 10.54.01 AM.png (112.3 KB) - added by joedolson 6 months ago.
Plugins - after
Screenshot 2025-10-19 at 10.54.20 AM.png (185.0 KB) - added by joedolson 6 months ago.
Themes - after

Download all attachments as: .zip

Change History (30)

@sourav08
12 months ago

#1 @sourav08
12 months ago

Hi @ronak44,​

I've created a patch that removes the unnecessary right margin from the search bar in the "Pages" section on mobile devices. This adjustment enhances visual alignment and improves the user experience.

#2 @sourav08
12 months ago

  • Keywords has-patch added; needs-patch removed

#3 @sabernhardt
12 months ago

  • Component changed from General to Administration
  • Keywords changes-requested needs-design-feedback added; needs-design removed
  • Type changed from defect (bug) to enhancement
  • Version 6.8 deleted

63310.diff removes all margins from multiple inputs at any screen size, but at least .tagsdiv .newtag still needs the right margin.

I would just add margin-right: 0; in the p.search-box input[name="s"] ruleset for smaller screens, where it sets the input width at 100%.

@dilipbheda
12 months ago

Updated patch

#4 @dilipbheda
12 months ago

  • Keywords needs-testing added; changes-requested removed

@ronak44 Thank you for the ticket. I was able to replicate the issue on my end as well. I've uploaded the updated patch based on @sabernhardt's suggestion.

#5 @nikunj8866
11 months ago

  • Keywords has-testing-info added; needs-testing removed

Test Report

This report validates that the indicated patch addresses the issue ✅.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/63310/63310.2.patch

Environment

  • OS: Windows 11
  • Web Server: nginx/1.26.1
  • PHP: 8.2.27
  • WordPress: 6.8.1
  • Browser: Chrome v136.0.
  • Theme: Twenty Twenty-Five (twentytwentyfive)
  • Active Plugins:

Actual Results

  • ✅ Issue resolved with patch.

Supplemental Artifacts

Before

https://prnt.sc/s7tswPNsvFSk

After

https://prnt.sc/2ij4pHjVlaFG

#6 @darshitrajyaguru97
11 months ago

Test Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/63310/63310.2.patch

Environment:

OS: Windows 10
PHP: 8.2.12
WordPress: 6.8.1
Browser: Chrome
Theme: Twenty Thirteen
Plugins: None activated

Actual Results:

Before patch:
Screenshot: https://prnt.sc/Lqc0IUk3HFCl

After patch:
Screenshot: https://prnt.sc/0XUaYek-cINm

✅ Patch working well as desired solution

#7 @wordpressdotorg
11 months ago

  • Keywords has-test-info added; has-testing-info removed

#8 @sabernhardt
10 months ago

#63510 was marked as a duplicate.

#9 follow-up: @sabernhardt
10 months ago

63510.patch is another option to consider (props @dhruvang21). The .search-box paragraphs use flex display with a column-gap, which could make the float and margin unnecessary on the .search-box input[name="s"] search fields (at any screen size).

@SirLouen
10 months ago

63510.patch by @dhruvang21

#10 in reply to: ↑ 9 @SirLouen
10 months ago

  • Keywords needs-design-feedback removed
  • Version set to 3.7.4

Test Report

Description

✅ This report validates whether the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/63310/63510.patch

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 137.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Five 1.2
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with patch.

Additional Notes

  1. Props to @dhruvang21

Replying to sabernhardt:

63510.patch is another option to consider (props @dhruvang21). The .search-box paragraphs use flex display with a column-gap, which could make the float and margin unnecessary on the .search-box input[name="s"] search fields (at any screen size).

  1. Definitely this is the best solution, great spotting, almost random add [29218] with 0 back testing.

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


10 months ago

#12 @sabernhardt
10 months ago

  • Milestone changed from Awaiting Review to 6.9

#13 @rollybueno
7 months ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/63310/63510.patch

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.29
  • Server: nginx/1.29.0
  • Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 139.0.0.0
  • OS: Linux
  • Theme: Twenty Twenty-Five 1.3
  • MU Plugins: None activated
  • Plugins:
    • Gutenberg 21.5.0
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with patch.

Additional Notes

Supplemental Artifacts

Before:
https://i.imgur.com/qvfFiX7.png

After:
https://i.imgur.com/QtmJiEi.png

#14 @shailu25
7 months ago

Test Report

This Report Validates that the indicated patch addresses the issue ✅.

Patch Tested: https://core.trac.wordpress.org/attachment/ticket/63310/63510.patch

Environment:

OS: Windows
Web Server: nginx
PHP: 8.2.27
WordPress: 6.8.2
Browser: Chrome
Theme: Twenty Twenty-Five
Active Plugins: None

Actual Results

  • Issue Resolved with patch.✅

Supplemental Artifacts

  • Attachment Added

@shailu25
7 months ago

Before Patch

@shailu25
7 months ago

After Patch

#15 @joedolson
6 months ago

  • Owner set to joedolson
  • Status changed from new to accepted

This ticket was mentioned in PR #10330 on WordPress/wordpress-develop by @joedolson.


6 months ago
#16

The existing patch fixes a small right margin adjust for posts, pages, and comments. There is a larger margin gap on plugins and themes, and this also covers those.

Trac ticket: https://core.trac.wordpress.org/ticket/63310

#17 @joedolson
6 months ago

In reviewing the patch, I observed that there is also a similar but more significant issue on the plugins/themes screens. It makes sense to me adjust these at the same time.

#18 @joedolson
6 months ago

  • Keywords commit added; has-test-info removed

#19 @joedolson
6 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 60975:

General: Improve search input alignment on mobile.

Remove an end margin misalignment on the search input for posts, comments, themes, and plugins.

Props ronak44, sourav08, dilipbheda, SirLouen, nikunj8866, darshitrajyaguru97, rollybueno, shailu25, sabernhardt, joedolson.
Fixes #63310.

Note: See TracTickets for help on using tickets.