Problem/Motivation

When editing a node, the menu settings field group in the meta panel is always expanded if a menu link has been provided.

This can be a distraction to editors and is inconsistent with the other field groups in the meta panel which remain closed unless expanded.

I am new to core issues and have marked the component tag as menu_ui.module, but expect it will be something else.

Steps to reproduce

Create a random page providing a menu link
Edit the node and see the menu is open.

Proposed resolution

Don't default open if it has a value, we have the detailed summary for that, also expand to path detail

Remaining tasks

Review

User interface changes

Before

before

After

after

Introduced terminology

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Issue fork drupal-2982853

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

MrPaulDriver created an issue. See original summary.

mrpauldriver’s picture

Title: When editing a node, the menu settings field group in the meta panel is always expanded if a menu link has been provided. » When editing a node, the menu settings field group in the meta panel starts expanded if a menu link has been provided.
cilefen’s picture

The last time the exact codepath that causes the element to open was #2406103: Remove hook_node_validate() and hook_node_submit() because they bypass the entity API. I related the issues..

cilefen’s picture

The form array has an #open element indicating this behavior could be intentional.

cilefen’s picture

Status: Active » Needs review
Issue tags: +Usability
StatusFileSize
new586 bytes

This is what I mean about the intention.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mrpauldriver’s picture

Status: Needs review » Reviewed & tested by the community

I am sorry that I did not see your patch earlier. It's working for me. Thanks

mrpauldriver’s picture

Status: Reviewed & tested by the community » Needs review

I spoke too soon.

This patch does fix the problem, but also means that an important core patch below, no longer works. This is a problem I have encountered with a number of other core patches.

Field rendering should respect configurable field display

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

abhijith s’s picture

StatusFileSize
new8.19 MB
new5.61 MB

Applied patch #5 on 9.2.x and it works fine.Adding screenshots below.

Before patch:
before

After patch:
after

mrpauldriver’s picture

Thanks. This is working out great.

It would be to see a patch which incorporates the same treatment for the URL Alias field.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

chetanbharambe’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new410.95 KB
new395.23 KB

Verified and tested patch #5.
Patch applied successfully and looks good to me.

Testing Steps:
# Goto: Appearance -> Apply Seven Theme
# Goto: Any Content and Edit it
# Click on the "Menu Settings" arrow and check the box for "Provide a menu link"
# Save it and again edit the content
# The menu settings field group in the meta panel starts expanded if a menu link has been provided

Expected Results:
# After applying Patch #5, the User should not see the menu settings have been expanded if a menu link has been provided.

Actual Results:
# Currently, The menu settings field group in the meta panel starts expanded if a menu link has been provided.

Please refer attached screenshots for the same.
Looks good to me.
Can be a move to RTBC.

quietone’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Let's get a test for this,

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

smustgrave made their first commit to this issue’s fork.

smustgrave’s picture

Issue summary: View changes
Issue tags: -Usability, -Needs tests +Needs Review Queue Initiative, +Bug Smash Initiative

Doing a triage of my new component menu_ui

This one seemed pretty basic and added test coverage. Updated summary using the first set of images uploaded. Fixed the credit too.

smustgrave’s picture

Title: When editing a node, the menu settings field group in the meta panel starts expanded if a menu link has been provided. » When editing a node with a menu, the menu settings is opened by default
smustgrave’s picture

Status: Needs work » Needs review
dcam’s picture

Issue tags: +Needs usability review

The patch does what is advertised. Personally, I always thought the open was a feature. I feel like we need a usability review on this.

This...is inconsistent with the other field groups in the meta panel which remain closed unless expanded.

That isn't entirely true. The path alias group is open if there's an alias. Again, to me it's a feature.

smustgrave’s picture

depending the decision here would say we should open a novice one for the path alias group too. We have the summary so closing by default makes sense.

benjifisher’s picture

We discussed this issue at #3568606: Drupal Usability Meeting 2026-01-30. That issue will have a link to a recording of the meeting. I am adding issue credit for the participants: @pallavi singh3013, @rkoller, @simohell, and @the_g_bomb.

rkoller’s picture

Status: Needs review » Needs work
Issue tags: -Needs usability review

Usability review

We discussed this issue at #3568606: Drupal Usability Meeting 2026-01-30. The recording of the meeting: https://youtu.be/80LmftxqFSk. The attendees at the usability meeting were @pallavi singh3013, @rkoller, @simohell, and @the_g_bomb.

We've first looked at the status quo, using the example of a node edit page for an article content type which has the largest number of detail elements in the advanced sidebar. When creating a new node all the detail elements are collapsed. When editing an existing node there are some inconsistencies. After the default setting is changed and saved, the details elements for the Menu settings, Comment settings, and URL alias are getting expanded on reopen, while the detail elements for Authoring information and Promotion options remain collapsed. It was also noted that the detail element for Comment settings is missing a detail summary reflecting the current active setting like the rest of the detail elements.

The group had a clear consensus that the state for all the available detail elements should be consistent, either all collapsed or all expanded, the current inconsistent behavior is not a desirable goal from our perspective.

One downside of making all detail elements expanded is a rather high vertical height past the fold. With all detail elements expanded the advanced sidebar also sort lacks of a clear visual structure, it is kind of hard to distinguish the detail summary and the detail wrapper, making it hard to process. And most importantly it has to be kept in mind that the settings for a node are not necessarily changed on a regular basis.

The settings are most often set on node creation and then rarely adjusted. That was the reason we've initially thought about the idea of expanding all the detail elements on node creation while keeping them closed when editing a node. But we've decided against that idea due to the aforementioned increased vertical height and the increased cognitive load for the case of all detail elements expanded.

The user has the situational awareness with the detail summaries and the additional clicks for expanding detail element(s) are bearable - an adjustment remains a deliberate step.

So in summary we are in line with the proposed resolution keeping all the detail elements collapsed. The only addition we would like to recommend is to add a detail summary for Comment settings, so it displays the default setting Open - but that should probably better go into a follow-up issue.

I'll set the issue back to needs work, cuz when testing MR14519 and making changes to every setting in the advanced sidebar the comment settings and url alias remained expanded.

If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.

smustgrave’s picture

Issue tags: +Needs followup

Thanks for the detailed write up! I'm not opposed to expanding the scope to the path_alias module to get the same behavior. I would say the comment settings could probably go into a follow issue because it'll need the detail summary too. Tagging for that.

dcam’s picture

Thank you to the Usability team for their detailed perspective on the issue.

smustgrave’s picture

Title: When editing a node with a menu, the menu settings is opened by default » Menu settings and path alias details should be closed even with values
Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs followup
Related issues: +#3571616: Add detail description to the comment settings and close by default

Opened the related issue for comments and pushed change for including path section. Should be good now.

rkoller’s picture

thank you for opening the followup and the changes on this MR! just quickly pulled the latest changes, and all detail elements except the comment settings remain collapsed after i've changed all the available default settings in the advanced sidebar for a new node. and after the "close by default" for the comment settings detail element should be covered within the follow up per the issue title of the followup, this issue looks good to go from a manual testing perspective. i leave it at needs review so someone else can also take a final look at the code changes.

dcam’s picture

I'm not crazy about the check for the aria-expanded attribute on the summary in the tests in order to verify this is working as intended. That attribute is set by details-aria.js, not by native functionality. It's like a third party in this testing scenario. That feels like something that we shouldn't rely on for testing. Is there a reason that the open attribute on the <details> isn't being checked instead? That's the attribute we're changing with this patch after all.

smustgrave’s picture

Sure switched it up

dcam’s picture

Status: Needs review » Needs work

Thank you for considering my feedback. Unfortunately, the selectors are targeting the wrong element now.

smustgrave’s picture

Status: Needs work » Needs review
dcam’s picture

Status: Needs review » Reviewed & tested by the community

My feedback was addressed. This looks good to me.

  • lauriii committed d3b7a597 on main
    fix: #2982853 Menu settings and path alias details should be closed even...

  • lauriii committed 704d75d6 on 11.x
    fix: #2982853 Menu settings and path alias details should be closed even...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

This is a nice small improvement. 🙌 Committed!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.