Problem/Motivation

Currently it is a cognitive challenge bridging the gap between the Manage form display settings form and the effects those settings have in particular on a node add or node edit form. The pattern applies more or less to all entity types but for content types the problem is the most significant. Aside that the account entity has additional unique characteristics (the user name and password field widget and the language settings field set behavior) on top that are out of the scope of this issue.

  • There is a disconnect between the order of fields on the Manage form display page compared to the field widgets on the node add or node edit page. The order is mixed up in particular for the Basic page content type. You have no indication which fields are the actual form elements and which are the meta data form fields in the side bar.
  • The Provide a menu link checkbox is the only form element in the sidebar that could not be disabled and hidden - it is missing a field widget on the Manage form display page.
  • You have the option to change the order on the Manage form display page indicated through the drag icon or the weights option. For fields like Promoted to front page it is possible that you are able to change the order within it's details<code> element <code>Promotion options if you drag it underneath Sticky at top of lists field widget. But the position of details elements never changes. If you for example change the position of the URL alias field widget, except moving it into the disabled section, there is no effect at all moving it up and down the list. In general the re-order pattern in combination of being able to drag field widgets to the disabled section is sort of problematic and creates potential false assumptions on the users end.

The following four examples illustrate the aforementioned general summary:

Article Content Type
comparison of the article node edit form on the left with its list of field widgets on the manage form display page illustrating their disconnect on the right

Node edit page Manage form display page
Title Title
Image Image
Body Body
Tags Tags
Published Authored by
Provide a menu link Authored on
Comment settings Promoted to front page
URL alias Sticky at the top of lists
Authored by Comments
Authored on URL alias
Promoted to front page Published
Sticky at top of lists

The expected field widgets order on the article manage form display page:
title, image, body, tags, published (then the main form section would be done and the sidebar would start), (provide a menu link - which is missing), comments, url alias, authored by, authored on, promoted to front page, sticky at top of lists.

Article Content Type with two fields added (E-Mail & Link)
comparison of the basic page node edit form on the left with its list of field widgets on the manage form display page illustrating their disconnect on the right

Node edit page Manage form display page
Title Title
Image Image
Body Body
Tags Tags
E-Mail Authored by
Link Authored on
Published Promoted to front page
Provide a menu link Sticky at the top of lists
Comment settings Comments
URL alias URL alias
Authored by Published
Authored on E-Mail
Promoted to front page Link
Sticky at top of lists

The expected field widgets order on the article manage form display page with 2 fields added:
title, image, body, tags, e-mail, link, published (then the main form section would be done and the sidebar would start), (provide a menu link - which is missing), comments, url alias, authored by, authored on, promoted to front page, sticky at top of lists.

Basic Page Content Type
comparison of basic page node edit form on the left compared to its list of field widgets on the manage form display page illustrating their disconnect

Node edit page Manage form display page
Title Title
Body Authored by
Published Authored on
Provide a menu link Promoted to front page
URL alias Sticky at the top of lists
Authored by URL alias
Authored on Body
Promoted to front page Published
Sticky at top of lists

The expected field widgets order on the basic page manage form display page:
title, body, published (then the main form section would be done and the sidebar would start), (provide a menu link - which is missing), url alias, authored by, authored on, promoted to front page, sticky at top of lists.

Basic Page Content Type with two fields added (E-Mail & Link)<
comparison of the basic page node edit form on the left with its list of field widgets on the manage form display page illustrating their disconnect on the right

Node edit page Manage form display page
Title Title
Body Authored by
E-Mail Authored on
Link Promoted to front page
Published Stick at top of lists
Provide a menu link URL Alias
URL alias Body
Authored by Published
Authored on E-Mail
Promoted to front page Link
Sticky at top of lists

The expected field widgets order on the basic page manage form display page with 2 fields added:
title, body, e-mail, link, published (then the main form section would be done and the sidebar would start), (provide a menu link - which is missing), url alias, authored by, authored on, promoted to front page, sticky at top of lists.

Steps to reproduce

  1. Install Drupal 10.1.x with the standard profile.
  2. Add one or two new fields to the Article and Basic page content type
  3. Create a node for the Article content type and one for the Basic page content type
  4. Compare /admin/structure/types/manage/article/form-display with the node edit form of the Article node
  5. Compare /admin/structure/types/manage/page/form-display with the node edit form of the Basic page node

Proposed resolution

  • I would suggest to add two secondary navigational tabs called something like Main or Content and Sidebar to the Manage form display page of content types
  • The Main tab should have an Enabled and Disabled section so you are still able to enable and disable field widgets for the main form and the order is directly reflected on the node edit form.
  • The sidebar tab is a bit more tricky. Intuitively it isn't clear that you are currently unable to alter the position of the details elements the field widgets are contained in. I haven't come to a conclusion what might work. Either keep a sort of fixed order and only allow disabling field widgets or the other way around find a way to also let the site builders adjust the order in the sidebar? At this point i am still not sure about the best solution.
  • Add a field widget for the Provide a menu link checkbox so it would be possible to disable it and consistent with the rest of the sidebar elements.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

rkoller created an issue. See original summary.

rkoller’s picture

Issue summary: View changes
rkoller’s picture

Issue summary: View changes
rkoller’s picture

Issue summary: View changes
rkoller’s picture

Issue summary: View changes
rkoller’s picture

Title: Improve the manage form display page by untwining the main and sidebar field widgets » Improve the manage form display page by untwining field widgets that belong to the main content and sidebar

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.

rkoller’s picture

We have discussed the issue at #3379289: Drupal Usability Meeting 2023-08-11. The issue will have a link to a recording of the meeting. For the record, the attendees of the meeting were @aaronmchale, @emma-horrell, @rkoller, and @worldlinemine.

The initial presentation of the issue took most of the remaining time of the meeting so that there wasn't much time left for an indepth discussion and to come up with any recommendations. There was a clear consensus that it is a valid issue. But there was doubt that the proposed resolution by adding a secondary tabbed tab would be the right choice here. The agreement was to continue the discussion about this issue in the #ux channel in the Drupal Slack for now.

kmani’s picture

Any update on this issue? we also facing same issue.e

rkoller’s picture

@kmani not yet. but i have put the issue on the shortlist for one of the next ux meetings after I've stumbled across Field Layout and both plans for one to deprecate it from Core as well as moving parts of Field Layout into Core (meta: #3007167: [policy] Deprecate field_layout module and move it to contrib and corresponding child issues #2844302: Move Field Layout data model and API directly into \Drupal\Core\Entity\EntityDisplayBase and #2880746: [PP-1] Move Field Layout UI directly into Field UI). I haven't taken a look into Field Layout in quite a while but it turns out the capabilities it provides on Manage form display pages are directly related with the changes proposed for this issue - it suffers from the same problem being able as a user to distinguish and actually relocate any fields in the sidebar. based on the number of columns field layout is adding sections are added to the list of fields on the Manage form display page. I think the solution for the aforementioned meta issue and this issue should be coordinated and discussed since they are related. That is the reason why i've put it back onto the ux meeting shortlist.

rkoller’s picture

Title: Improve the manage form display page by untwining field widgets that belong to the main content and sidebar » [PP-1] Improve the manage form display page by untwining field widgets that belong to the main content and sidebar
Status: Active » Postponed
Related issues: +#3007167: [policy] Deprecate field_layout module and move it to contrib

We discussed this issue at #3418992: Drupal Usability Meeting 2024-02-09. That issue will have a link to a recording of the meeting.

For the record, the attendees at the usability meeting were @AaronMcHale, @benjifisher, @duncancm, @rkoller, @shaal, @simohell, and @worldlinemine.

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

The main underlaying problem is that the theme has the final say how the fields available are used no matter if it is in Claro or Olivero (substitutional for any admin and frontend themes).

In the case of an admin theme that fact is way more problematic as illustrated in the issue summary. The consensus in the group was that it would be desirable that the experience is more clear and that administrators and site builders are more in control how forms that were set up are actually rendered.

But there was a clear consensus, with #3007167: [policy] Deprecate field_layout module and move it to contrib in place, it doesn't make any sense to ideate on any potential implementation details for this issue at this point. It was only noted having a layout set on a Manage form display page and having more sections than enable/disabled (by installing the field layout module) makes the problems outlined in the issue summary even worse. The agreement was to postpone this issue on the aforementioned meta issue.

And it was noted when this issue gets active again that it should be checked which theme is actually used by the user, some users are able to use the admin theme, others are only able to use the default theme. In this context the group also agreed on suggesting deprecating the View administration theme permission in #3420470: Deprecate and move to contrib the "View the administration theme" permission.

martijn de wit’s picture

The field group module is already offering such "feature". More kind of a work around because things are not wel managed in core.

The issue ticket where that was developed: #2652642: Allow to position the group in the advanced (sidebar) column
Hope this ads some extra info / context.

Great to see some fresh conversations are there.

rkoller’s picture

Interesting! thanks a lot for bringing that fixed issue and the Field Group module in general into the discussion. I have to admit I haven't had the Field group module on my radar. I've quickly tested the Details sidebar functionality. And i agree it is sort of a workaround since it is only providing a clear context for fields dragged into that Details sidebar group, for the rest the underlaying problem still persists. On a side note it seems there is no real way to alter the relative position to the other detail elements in the advanced column. One interesting detail i've discovered within the comments, I've added #2845425: Replace hook_form_node_form_alter() implementations with configured field layouts as an related issue since it might be relevant covering one potential implementation aspect for this issue.

rkoller’s picture

Issue tags: +Field UX
philsward’s picture

It's really stupid, that core fields are mixed in with custom fields, with zero separation between the two and no way to inject custom fields into the core field area. Horrible UI. 25 years and some things never change.

rkoller’s picture

Title: [PP-1] Improve the manage form display page by untwining field widgets that belong to the main content and sidebar » Improve the manage form display page by untwining field widgets that belong to the main content and sidebar
Status: Postponed » Active

I just noticed that the policy issue this issue is postponed on got fixed so i set this one active again.

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.