Make WordPress Core

Opened 4 weeks ago

Last modified 3 days ago

#63337 new enhancement

Enhance Widget Spacing for Mobile Dashboard

Reported by: sainathpoojary's profile sainathpoojary Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5
Component: Administration Keywords: needs-design-feedback has-patch
Focuses: ui, css Cc:

Description

In the WordPress admin dashboard, widgets are grouped into .postbox-container columns, each containing individual .postbox widgets. Each container has a default margin-bottom: 20px, and each widget also has margin-bottom: 20px, which creates a cumulative 40px gap between containers when they stack vertically.

This layout works well on wider screens, where containers are visually distinct columns. However, on mobile or narrower screens where containers stack, this spacing results in significant vertical gaps, which may not be necessary in that context.

Enchancement:

It may be helpful to align the vertical spacing more closely with the single-column layout by slightly reducing or normalizing the margin-bottom on .postbox-container elements in smaller viewports.

A reduction in container spacing on smaller screens could:

  • Improve perceived consistency and flow between widgets
  • Reduce unnecessary whitespace
  • Create a more compact and mobile-friendly dashboard layout

Screenshot

https://rioudcpuyg.ufs.sh/f/PL8E4NiPUWyOoEWPUSgRVfkrM3cxj5whHLEvyNZCb2PpWuod

Attachments (1)

63337.patch (379 bytes) - added by sainathpoojary 4 weeks ago.
If this is considered worth improving, I’ve included a patch

Download all attachments as: .zip

Change History (7)

@sainathpoojary
4 weeks ago

If this is considered worth improving, I’ve included a patch

#1 @abcd95
4 weeks ago

  • Keywords needs-design-feedback added

Hey @sainathpoojary, Thanks for the ticket.

I observed the same behaviour as you reported, but I do not know if this was intentional or not. Although it does make sense to minimize the gaps in the mobile view, since we can't really drag and drop in the mobile view, and widgets appear as a list.

Last edited 4 weeks ago by abcd95 (previous) (diff)

#2 @sabernhardt
4 weeks ago

  • Version changed from trunk to 5.5

[48340] added the bottom margin (49288.4.diff)

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


4 weeks ago
#3

  • Keywords has-patch added

PR reduces vertical spacing between stacked dashboard widgets on smaller screens by setting margin-bottom: 0 on .meta-box-sortables, resulting in a more compact and consistent mobile layout.

Trac ticket: #63337

#4 @ankitmaru
3 weeks ago

Hi @sainathpoojary
Thanks for the ticket and the patch.

I tested the changes and agree this improves the dashboard layout on smaller screens. Reducing the vertical gaps between stacked .postbox-container elements makes the mobile experience feel much cleaner and more cohesive. This is a nice enhancement for better usability.

Great job spotting and addressing this.

#5 @sabernhardt
3 days ago

#63461 was marked as a duplicate.

#6 @sabernhardt
3 days ago

@afercia Do you remember why both .postbox and #dashboard-widgets .meta-box-sortables needed a bottom margin of 20px for #49288?

Note: See TracTickets for help on using tickets.