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
Just like in #2094499: Convert "Manage (form) display" forms to be the official entity edit forms for EntityView[Form]Display objects, we need to convert this Field UI form to D8.
This is also needed for #552604: Adding new fields leads to a confusing "Field settings" form, which is a usability improvement.
Proposed resolution
Do it.
Remaining tasks
None.
User interface changes
Nope.
API changes
The 'field_storage' form wrapper is removed from that form.
Beta phase evaluation
Issue category | Task because the current form is not broken. |
---|---|
Prioritized changes | The main goal of this issue is to convert one Field UI form to the new API available in Drupal 8 (the EntityForm base class).
It also enables us to work on improving the usability of the "field add" form in #552604: Adding new fields leads to a confusing "Field settings" form. |
Disruption | Minor disruption for contrib modules that alter the "Edit field storage" Field UI form. |
Comment | File | Size | Author |
---|---|---|---|
#21 | screenshot-d8.dev 2015-03-24 18-04-29.png | 39.79 KB | jibran |
#20 | interdiff.txt | 1.32 KB | amateescu |
#20 | 2446869-20.patch | 33.82 KB | amateescu |
#18 | interdiff.txt | 651 bytes | amateescu |
#18 | 2446869-18.patch | 33.68 KB | amateescu |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedSomething like this.
Comment #3
amateescu CreditAttribution: amateescu commentedToo much to ask for a green patch from the first try :/
Comment #4
andypostAwesome! +1 rtbc
just a nit
is this for type hinting? entity form already have this one defined
Comment #5
amateescu CreditAttribution: amateescu commentedYup, it's just for type hinting. I don't link to put those
/** @var \Stuff $stuff
all over the place :)Comment #6
amateescu CreditAttribution: amateescu commentedReroll and bump.
Comment #7
amateescu CreditAttribution: amateescu commentedComment #8
yched CreditAttribution: yched commentedThose two patches are definitely on my radar, didn't have a chance to get to them so far.
@amateescu+++++++
Comment #9
amateescu CreditAttribution: amateescu commentedNo worries, I have enough other things to work on in the meantime :)
Let's update the class name for the form to include the full name of the entity type, like in #2448503: Convert the "Field edit" form to an actual entity form.
Comment #10
amateescu CreditAttribution: amateescu commentedThis is probably one of the things that you will point out: "why do we still need to keep this around?", and it's because field storage config still doesn't have a label of its own so we need to use the field config label for $form['#prefix'] and the
drupal_set_message()
text.I'm already fixing that in the in-progress patch for #552604: Adding new fields leads to a confusing "Field settings" form by adding a label property to field storages, but maybe we should open a separate issue for it.. or just fix it here?
Comment #15
amateescu CreditAttribution: amateescu commentedFixed the fail and another small problem found while I was there.
Comment #16
yched CreditAttribution: yched commentedNo time to look into the actual FieldStorageConfigEditForm tonight, just looked at the surroundings ;-)
<3
Wondering about this - should entity forms use entity access or dedicated permissions directly ?
Even though the current code is definitely weird :
- FieldStorageConfig currently defines no access handler
- the existing routing code "borrows" *field_config*.update for this route about *field_storage_config*
- field_config does define an access handler, FieldConfigAccessControlHandler, which grants access based on the "administer [entity_type] fields'
I'm +++ on bringing some sanity here, just wondering whether we should stay with the entity access on the route and add a proper FieldStorageConfigAccessControlHandler ?
Comment #17
amateescu CreditAttribution: amateescu commentedI actually tried that when I was working on the "Field UI sanity" patch but the problem is that access checking only works with the entities that are part of the route (parameters), and, in this case, field_storage_config is not, only field_config is :/
Comment #18
amateescu CreditAttribution: amateescu commentedSmall self-review.
Comment #19
jibranI think it's ready just two minor nits.
$field_config typehinting missing and function doc also needs update.
Comment #20
amateescu CreditAttribution: amateescu commented1. Not introduced by this issue, but why not.
2. Fixed the method doc.
Comment #21
jibranI manually tested the patch everything was working fine. So RTBC
I didn't know delete field page was showing 'Configuration updates' details so this is same in the HEAD and with this patch of course we are not doing anything with delete form in this issue.
Comment #22
amateescu CreditAttribution: amateescu commented@yched said he wants to review this patch so there's no rush for RTBC.
Comment #23
yched CreditAttribution: yched commentedNo additional remarks for FieldStorageConfigEditForm, except :
oh, yeah, these have been useless since probably CCK D6 :-)
RTBC +1
Comment #24
amateescu CreditAttribution: amateescu commentedOMG, could this be the first "yched nitpick free" patch I ever wrote?! Feeling so proud right now :D
Comment #25
yched CreditAttribution: yched commentedHah ! I *knew* you'd say that :-p
Comment #26
amateescu CreditAttribution: amateescu commentedI'm so predictable :/
Comment #27
alexpottUX improvements to field UI - yep we want that. Committed 030f536 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.