Problem/Motivation

field_ui.js contains an @todo above buggy code, this fixes it.
The todo was added in #1792600: Refactor field_ui so common behavior for fields and display overview screens are extracted.

#1786198: Make consistent regions in code for fields UI overview screens intended to fix this as part of a larger refactor.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett created an issue. See original summary.

tim.plunkett’s picture

droplet’s picture

the value passed from `Drupal.fieldUIDisplayOverview.field.prototype.getRegion`. I think it has to update too.

Let's check other tabledrag usages to see if we should change `region` to BOOLEAN
regionChange: function (region)

EDITED

tim.plunkett’s picture

the value passed from `Drupal.fieldUIDisplayOverview.field.prototype.regionChange`. I think it has to update too.

I have no idea what this means. That's the function I'm changing.

Let's check other tabledrag usages to see if we should change `region` to BOOLEAN

In Display Suite, Drupal.fieldUIDisplayOverview.ds.prototype.regionChange needs the actual string.
So does the code I'm working on for core.

droplet’s picture

tim.plunkett’s picture

Ah yes! That also needs to change, but would need PHP changes in either #1786198: Make consistent regions in code for fields UI overview screens or #2796581: Fields must store their region in entity displays to work. This is a simple change that just addresses this @todo.

nod_’s picture

Status: Needs review » Reviewed & tested by the community

@todo addressed. Good to go.

alexpott’s picture

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

Now we have JavascriptTestBase we should include test coverage - obviously when the comment was written something gave the author pause before changing it.

tim.plunkett’s picture

Status: Needs work » Closed (duplicate)

At this point, we can just mark this as a duplicate of #2796581: Fields must store their region in entity displays, which makes this same change AND already has a JavascriptTestBase test.