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

After

Introduced terminology
NA
API changes
NA
Data model changes
NA
Release notes snippet
NA
| Comment | File | Size | Author |
|---|
Issue fork drupal-2982853
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:
- 2982853-when-editing-a
changes, plain diff MR !14519
Comments
Comment #2
mrpauldriver commentedComment #3
cilefen commentedThe 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..
Comment #4
cilefen commentedThe form array has an #open element indicating this behavior could be intentional.
Comment #5
cilefen commentedThis is what I mean about the intention.
Comment #7
mrpauldriver commentedI am sorry that I did not see your patch earlier. It's working for me. Thanks
Comment #8
mrpauldriver commentedI 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
Comment #13
abhijith s commentedApplied patch #5 on 9.2.x and it works fine.Adding screenshots below.
Before patch:

After patch:

Comment #14
mrpauldriver commentedThanks. This is working out great.
It would be to see a patch which incorporates the same treatment for the URL Alias field.
Comment #16
chetanbharambe commentedVerified 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.
Comment #17
quietone commentedLet's get a test for this,
Comment #25
smustgrave commentedDoing 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.
Comment #26
smustgrave commentedComment #27
smustgrave commentedComment #28
dcam commentedThe patch does what is advertised. Personally, I always thought the open was a feature. I feel like we need a usability review on this.
That isn't entirely true. The path alias group is open if there's an alias. Again, to me it's a feature.
Comment #29
smustgrave commenteddepending 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.
Comment #30
benjifisherWe 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.
Comment #31
rkollerUsability 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, andURL aliasare getting expanded on reopen, while the detail elements forAuthoring informationandPromotion optionsremain collapsed. It was also noted that the detail element forComment settingsis 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 settingOpen- 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 settingsandurl aliasremained expanded.If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.
Comment #32
smustgrave commentedThanks 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.
Comment #33
dcam commentedThank you to the Usability team for their detailed perspective on the issue.
Comment #34
smustgrave commentedOpened the related issue for comments and pushed change for including path section. Should be good now.
Comment #35
rkollerthank you for opening the followup and the changes on this MR! just quickly pulled the latest changes, and all detail elements except the
comment settingsremain 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 thecomment settingsdetail 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.Comment #36
dcam commentedI'm not crazy about the check for the
aria-expandedattribute on the summary in the tests in order to verify this is working as intended. That attribute is set bydetails-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 theopenattribute on the<details>isn't being checked instead? That's the attribute we're changing with this patch after all.Comment #37
smustgrave commentedSure switched it up
Comment #38
dcam commentedThank you for considering my feedback. Unfortunately, the selectors are targeting the wrong element now.
Comment #39
smustgrave commentedComment #40
dcam commentedMy feedback was addressed. This looks good to me.
Comment #44
lauriiiThis is a nice small improvement. 🙌 Committed!