WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 5 months ago

#42649 new defect (bug)

Remove extra space after Dashboard & Comment admin menu

Reported by: Hardik Amipara Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9
Component: Administration Keywords: ui-feedback has-patch 2nd-opinion
Focuses: ui, administration Cc:
PR Number:

Description

I just seen dashboard and comment admin menu. it is showing extra space after both menu

Attachments (4)

with-space-admin-menu.png (66.6 KB) - added by Hardik Amipara 2 years ago.
42649.patch (376 bytes) - added by Shital Patel 2 years ago.
space has been removed from both menu
without-space-admin-menu.png (63.3 KB) - added by Shital Patel 2 years ago.
print_admin_menu_and_submenu.png (241.4 KB) - added by Shital Patel 2 years ago.

Download all attachments as: .zip

Change History (15)

#1 @Shital Patel
2 years ago

  • Keywords needs-patch added

@Shital Patel
2 years ago

space has been removed from both menu

#2 @Shital Patel
2 years ago

  • Keywords has-patch added; needs-patch removed

#3 follow-up: @dd32
2 years ago

  • Keywords ui-feedback added; has-patch removed

Welcome to Trac Hardik, Thanks for submitting the issue, however, this is intentional.
The menu is split up into several sections, as evidenced by the wp-menu-separator menu item.

The menu splits are (roughly) Dashboard, Posts / Pages / Custom Post Type / Taxonomy, Settings (inc Theme/Plugins), and then a Misc section past that for any other plugins which add top-level menu items.

Perhaps you can explain why you feel it's a bug, and why you feel that it should be changed?
I've added the ui-feedback to get some feedback from the designers out there.
I've removed the has-patch keyword as while 42649.patch achieves it, since it's intentionally there we'd remove the actual menu items which can be found here: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/menu.php?rev=42201&marks=49,156,262#L45

#4 @Hardik Amipara
2 years ago

hello @dd32 ,

if submenu is empty in main menu. then added separator after main menu.

<li class="wp-not-current-submenu wp-menu-separator" aria-hidden="true"><div class="separator"></div></li>

wp-admin\css\admin-menu.css

#adminmenu li.wp-menu-separator {
	height: 5px;
	padding: 0;
	margin: 0 0 6px 0;
	cursor: inherit;
}
#adminmenu div.separator {
	height: 2px;
	padding: 0;
}

wp-admin\menu-header.php

I & @Shital Patel we both checked with main menu and submenu.

// hide separators from screen readers
		if ( $is_separator ) {
			$aria_hidden = ' aria-hidden="true"';
		}

		echo "\n\t<li$class$id$aria_hidden>";

		if ( $is_separator ) {
			echo '<div class="separator"></div>';

#5 in reply to: ↑ 3 @Hardik Amipara
2 years ago

Replying to dd32:

okay. No problem. Let me know what should we do. :)

I checked menu.php. I found separator.

It is use for after Dashboard separator

$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );

It is use for after Comments separator

$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );

That's why. It is displayed space.

#6 follow-up: @mjaragon03
18 months ago

We met at WCEU for Core Contributor day and discussed this ticket.

From the feedback of the group, the separators do not relay any additional information to the user at the moment, so we suggest to remove the separators, so that all items in the menu list are equally separated.

We would like to see a new ticket open to explore better options on how to make the menu bar more clear and user-friendly

#7 @garusky
18 months ago

Totally agreed here at WCEU.
We would like to see a new ticket to explore a better way to organize menu bar items in "semantic sections" (like content, administration..etc) so that plugin developers can develop their own plugins under the right place.

#8 @Shital Patel
14 months ago

  • Keywords has-patch added

#9 in reply to: ↑ 6 @SergeyBiryukov
14 months ago

  • Component changed from Menus to Administration
  • Keywords 2nd-opinion added

Replying to mjaragon03:

From the feedback of the group, the separators do not relay any additional information to the user at the moment, so we suggest to remove the separators, so that all items in the menu list are equally separated.

The separators may not relay any additional information, but I still think it's better to have sections of different purpose visually separated from each other, as explained in comment:3. I see no benefit in removing the separators.

Replying to garusky:

We would like to see a new ticket to explore a better way to organize menu bar items in "semantic sections" (like content, administration..etc) so that plugin developers can develop their own plugins under the right place.

See #40651 for exploring ideas on making it easier to find plugin settings after install.

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


5 months ago

#11 @kjellr
5 months ago

Thanks for the ticket, @hardik-amipara! As noted by @SergeyBiryukov above, these spacers exist to create some vertical rhythm between sections of the navigation. Since the menu can be fairly long, I think the empty space helps break it up a bit. I do not think they should be removed for now.

There's another ticket open to consider more structural changes to he navigation, and I think that solution does remove the spacing in favor of a more clear nav to begin with. That's worth checking out:

https://core.trac.wordpress.org/ticket/47012

Note: See TracTickets for help on using tickets.