Problem/Motivation

With a large number of fields on the Manage Display page and when moving fields to the Disabled section sometimes it jumps to the bottom and changes are lost.

Since each of these operations requires a backend ajax call there is a potential that if the user proceeds to select and move multiple fields that their work will be overwritten by the ajax response.

Steps to reproduce

  1. Use a slow connection. This will not be obvious on a typical local dev setup.
  2. Create a large quantity of fields (over 20)
  3. Edit the default managed display and proceed to move multiple fields into the Disabled grouping

Proposed resolution

N/A

Remaining tasks

N/A

User interface changes

  1. Would it possible to include a button to move all fields to the disabled section, rather than piecemeal. There will be many sites that have more than a few fields. A normal site builder with multiple fields would have to move all fields individually (in our case it's 20+) by hand, while waiting to make sure that the ajax callback is completed -- which isn't always obvious to a normal site builder. A dev might be able to look at the chrome dev tools network tab but that is out of the question for a normal site builder.
  2. For moving fields between Groupings 'Field', 'Disabled' don't require an ajax call. When adjusting 'Labels' and 'Format' it makes sense to require the ajax call for obvious reasons. Question: I wonder how fieldgroups and other other custom functionality would be affected by this.
  3. Disable drag and drip while Ajax is running

API changes

N/A

Data model changes

N/A

Release notes snippet

Original report by generalconsensus

I've attached gif videos showing our basic demo site running with multiple fields in which you can clearly see the ajax call and the 'lag behind' of the callback and the ux issue.

Issue fork drupal-2741387

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

generalconsensus created an issue. See original summary.

generalconsensus’s picture

Issue summary: View changes
generalconsensus’s picture

generalconsensus’s picture

Version: 8.1.1 » 8.1.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

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

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should 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: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

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

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should 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.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should 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.

Amber Himes Matz’s picture

Thank you for the report and for providing steps to reproduce and even a gif of the problem in action! We triaged this as part of the Bug Smash Initiative. Because there's been no activity for many years, this issue needs to be re-verified on a currently supported version of Drupal with some manual testing.

quietone’s picture

Title: Manage Display Page Provides Inconsistent UX » Prevent drag and drop operations on field ui whilst ajax is in progress
Version: 9.5.x-dev » 10.1.x-dev
Category: Bug report » Feature request
Issue summary: View changes
Issue tags: -Needs manual testing +Field UX

Further discussion and testing shows that this is reproducible when the connection is slow. For example, I was able to reproduce this with simplytestme but not my local ddev environment. We (Amber Himes Matz, larowlan and myself) agree that this can be a feature request. I am updating the issue meta and summary accordingly.

quietone’s picture

Issue summary: View changes

Improve the problem/motivation.

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

bnjmnm’s picture

Status: Active » Needs review

This disables drag handles while Ajax is in progress. Maybe there's something more elegant like queueing the drags but this approach will work.

This is probably better categorized as "needs architectural review" - not every theme is accounted for among other things. Test this in Claro. There should be some eyes on this before the full gate-appeasing MR is fleshed out.

There's no test coverage, but since this is timing related I'm not sure if that's an option. Perhaps hold_test_response could be used?

smustgrave’s picture

Status: Needs review » Needs work

Seems to have a build error.

Will this require tests?

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.