Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | 2796885-field_ui-2.patch | 709 bytes | tim.plunkett |
Comments
Comment #2
tim.plunkettThis soft-blocks #2796173: Add experimental Field Layout module to allow entity view/form modes to switch between layouts.
Comment #3
droplet CreditAttribution: droplet commentedthe 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
Comment #4
tim.plunkettI have no idea what this means. That's the function I'm changing.
In Display Suite, Drupal.fieldUIDisplayOverview.ds.prototype.regionChange needs the actual string.
So does the code I'm working on for core.
Comment #5
droplet CreditAttribution: droplet commentedOh, sorry. This is `getRegion`
@see https://github.com/drupalprojects/drupal/blob/9bb1c3691c257f1a89c7545da9...
@see
https://github.com/drupalprojects/drupal/blob/9bb1c3691c257f1a89c7545da9...
Comment #6
tim.plunkettAh 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.
Comment #7
nod_@todo addressed. Good to go.
Comment #8
alexpottNow we have JavascriptTestBase we should include test coverage - obviously when the comment was written something gave the author pause before changing it.
Comment #9
tim.plunkettAt 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.