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.
Part of #1989974: [meta] Clean up/improve consistency of Edit:
- Rename
EditorDecorationView
toEditedElementDecorationView
.
Rationale:
- Back when Edit.module used Create.js, this was a decorator for "editors", but now it is effectively a decorator on the underlying element that is being edited.
- This is not an API change.
Comment | File | Size | Author |
---|---|---|---|
#9 | 2133889-9.patch | 3.49 KB | Wim Leers |
#1 | 2133889-1.patch | 3.55 KB | Wim Leers |
Comments
Comment #1
Wim LeersAfter manual testing, everything continues to work fine.
Comment #3
Wim LeersBlocked on #2133869: Clean up Edit's data- attributes.
Comment #4
jessebeach CreditAttribution: jessebeach commented1: 2133889-1.patch queued for re-testing.
Comment #5
jessebeach CreditAttribution: jessebeach commentedIntroducing "Element" creates a dichotomy with "Field". Are these two things really different here? Could we call it
EditedFieldDecorationView
?Comment #6
Wim Leers#5: IIRC, the reasoning behind "EditedElement" rather than "EditedField" is because in the case of a plain text field, the decorated element is not the field, it's a specific item of the field.
A field is always rendered like this:
There may be many
.field-item
s. Usually, the edited element is the.field-wrapper
(i.e. "the field"). But in the case of in-place editing a single-valued textual field (whether plain or rich text), the edited element is.field-item
(i.e. "a field item").However, I see your point. Maybe it's better to persist the frequently occurring analogy of "if the logic exists for the Entity, it also exists for the Field" in Edit, in which case
FieldDecorationView
would actually be the most fitting name. Especially because it would be the perfect analogy for #2134929: Clean up Edit: rename EntityView to EntityDecorationView.Comment #7
Wim LeersAnd this should go in after #2135689: Clean up edit.module to match coding standards.
Comment #8
jessebeach CreditAttribution: jessebeach commentedFieldDecorationView
is cool with me!Comment #9
Wim LeersOkay, done :)
Comment #10
jessebeach CreditAttribution: jessebeach commentedVerified the object name change and manually regression tested. Looks good.
Comment #11
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.
Comment #12
Wim LeersComment #13
Wim LeersNow also backported to the Drupal 7 contrib module: http://drupalcode.org/project/edit.git/commit/8e34208.
Comment #14
nod_