Updated: Comment #0
Problem/Motivation
The following base fields of the Node entity type are still handled through custom code in entity forms and entity views (basically everything except the title):
- author (
uid
) - publication date (
created
) - language (
langcode
) - published (
status
) - stick at top of lists (
sticky
) - revision log message (
log
)
Proposed resolution
Move to widgets and formatters, including many new ones:
- author (
uid
):AuthorFormatter
(generic, forEntityOwnerInterface
entities) +RouteBasedAutocompleteWidget
(generic, to not depend onentity_reference.module
) +AuthorAutocompleteWidget
(extends the previous one with author-specific UX) - publication date (
created
):TimestampFormatter
(generic) +TimestampWidget
(generic) - published (
status
) & stick at top of lists (sticky
):BooleanWidget
(generic) - revision log message (
log
)
Only the language (langcode
) field (and its corresponding LanguageWidget
) will not be done in this issue, for that we have #2230637: Create a Language widget.
And for datetime.module
's "enhancing override" to switch the default text field widget to a fancy datetime widget now has a DateTimeTimestampWidget
that can be used for any TimestampItem
— this also cleans up datetime.module
.
Also removes node_field_extra_fields()
! :)
And last but not least, this finally makes the node author and date in-place editable! Or well… almost. In-place editing the author fails, for reasons that swentel and I don't yet understand. Hopefully yched, fago or amateescu can shed some light on that.
Remaining tasks
- Fix test failures.
User interface changes
None.
API changes
None. The base fields above are rendered using widgets and formatters, and are no longer exposed as an "extra field".