Problem/Motivation

Using plain entity reference (revision) field as the killer weapon for almost anything sounds too nice. And it is indeed too nice to be true.

We've seen limits such as default configuration for widgets and formatters when not defining an own field type.
Now that we have progressed a bit in D8, things become more clear.

All the entity reference compatible widgets and formatters just don't make sense here.

Proposed resolution

Create an own field type für paragraphs that extends entity reference (revision).

All the entity reference widgets and formatters can then disappear. We need to define our own and can provide a standard.
After installation, we would have the proper formatter and widget selected.

Taking care of delete propagation (to delete the paragraph entities) is then also easier since the field type can take care of this composition relation.
Without a field type this is hard and needs to go through hooks...

Might be relevant too for multilingual and the current problems with revision propagation from the host entity to the paragraph entity.

Remaining tasks

User interface changes

API changes

Comments

jeroen.b’s picture

Yeah, I have also been thinking about this, and this indeed seems like the way to go.
Subtyping entity_reference_revisions sounds like a good idea.

jeroen.b’s picture

Status: Active » Needs work
miro_dietiker’s picture

Cool.
We still want to focus on that multilingual thingy... so i doubt we will be able to push much more issues with our team.

One hint about status: https://www.drupal.org/node/156119
"Needs Work ["CNW"] => There is a patch attached to the issue, but the patch needs additional work"

jeroen.b’s picture

Status: Needs work » Active

Yeah I'll start on that next week.

Ah thanks, I misinterpreted the status :)

miro_dietiker’s picture

jeroen.b’s picture

@miro_dietiker, do you still think this is necessary?
I just implemented "PreconfiguredFieldUiOptionsInterface" in Entity Reference Revisions.
When the Entity is annotated correctly now it will automatically add it to the new field interface and use the correct settings as given in the annotation. I also added a new category like Entity Reference did.

See here for the change in Entity Reference Revisions: http://cgit.drupalcode.org/entity_reference_revisions/diff/?h=8.x-1.x&id...

See here for the change in Paragraphs: http://cgit.drupalcode.org/paragraphs/diff/?h=8.x-1.x&id2=054850c6174c35...

Please test, for me personally this is very workable.
Only problem might be the deletion of paragraphs...

berdir’s picture

Yeah, the preconfigured UI approach should work quite well for this. That's very new, didn't think of doing this, but it makes sense.

miro_dietiker’s picture

Status: Active » Postponed

Formally postponing this, as there's no reason to do it now. Possibly to reconsider when we identify severe issues that could be solved the fieldtype way...

miro_dietiker’s picture

Priority: Major » Normal

And demoting. :-)