Make WordPress Core

Opened 3 years ago

Last modified 7 months ago

#58335 new defect (bug)

WordPress Dashboard Collapse Menu Transition issue.

Reported by: shuvo52's profile shuvo52 Owned by:
Milestone: Awaiting Review Priority: low
Severity: normal Version: 5.2
Component: Administration Keywords: has-screenshots has-patch
Focuses: ui, css Cc:

Description

Hi
When I collapse the menu it's showing awkward.
See the video: https://d.pr/v/34K9H4
I think this issue should be fixed as soon as possible.
Regards

Attachments (1)

58335.diff (409 bytes) - added by pattihis 7 months ago.
Fix admin menu transition jump by standardizing menu item heights

Download all attachments as: .zip

Change History (6)

#1 @sabernhardt
3 years ago

  • Component changed from General to Administration
  • Focuses accessibility removed
  • Version changed from trunk to 5.2

Thanks for the report!

The icon dimensions have a discrepancy between the expanded and collapsed states. The expanded link's height increased by 0.2 pixels in [45186], and the width had a 1-pixel difference before then. This is more noticeable on the About pages than any page where you would find an open submenu on the side (because expanding a submenu is a bigger difference).

  • When the menu is collapsed (or "folded"), the icon is in a 35px by 30px container within a 36px by 34px link.
  • When the text shows, the icon's container is 36px by 34px, and the text size makes the link 160px by 34.2px (14px times 1.3 line-height plus 8px padding on the top and bottom).

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


3 years ago

#3 @ironprogrammer
3 years ago

  • Priority changed from normal to low

During test triage, it was agreed to mark this ticket's priority to low, but keep it open for a patch. Why low? Triagers noted that the sub-pixel shift was barely noticeable. However, the assessment in comment:1 is a good basis for a patch.

#4 @ironprogrammer
3 years ago

  • Keywords has-screenshots added

Adding has-screenshots as reporter's video does show the shift.

@pattihis
7 months ago

Fix admin menu transition jump by standardizing menu item heights

#5 @pattihis
7 months ago

  • Keywords has-patch added; needs-patch removed

Summary of patch added:

wp-admin/css/admin-menu.css
  1. Lines 237-238: Added box-sizing: border-box; and height: 34px; to the #adminmenu a.menu-top, #adminmenu .wp-submenu-head selector to fix the 0.2px issue
  2. Lines 322-323: Updated .folded #adminmenu div.wp-menu-image from width: 35px; height: 30px; to width: 36px; height: 34px; to maintain consistency

This patch addresses the core issue in ticket #58335 by:

  • Standardizing menu item heights to exactly 34px in both collapsed and expanded states
  • Eliminating the visual "jump" during menu transitions
Note: See TracTickets for help on using tickets.