Part of #1989974: [meta] Clean up/improve consistency of Edit:
- Rename
EditorDecorationViewtoEditedElementDecorationView.
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 commented1: 2133889-1.patch queued for re-testing.
Comment #5
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-items. 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
FieldDecorationViewwould 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 commentedFieldDecorationViewis cool with me!Comment #9
wim leersOkay, done :)
Comment #10
jessebeach commentedVerified the object name change and manually regression tested. Looks good.
Comment #11
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_