Problem/Motivation
Following the modification of the module architecture comments are now compatible and can be used directly with Form Mode Manager. Only the editing actions are visible out of the box via the "comment / 1 / edit" pages on the horizontal tabs or directly on the canonical "comment / 1 / edit / xxxxx" link. However, the way in which this entity is used poses a lot of problem specific to each use case and we must think about a simple but flexible UI to allow the management of form modes on the comments.
Proposed resolution
In serious tracks it would be convenient to implement a formatter that extends "CommentDefaultFormatter" and allows the user to choose via FormDisplay which form mode will be used by the service "comment.lazy_builders: renderForm" responsible for the form display . This at first would allow users to create comment fields and to display a more or less rich form. It would pose in a second time a problem with the level of the permissions and the rights or the possibility of implementing fallbacks to have a form form which is enriched according to the rights of each one. This is part of another add-on to Form Mode Manager because it is very specific.
This last question also poses for the formatter that implements the lazy. The support being provided by Form Mode Manager devriont we add the formatter in a module separate or under module to separate the concepts and let Form Mode Manager take care of the generic part then children who relies on the API to format the more specific part.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 2887326-11.patch | 49.08 KB | woprrr |
| #10 | interdiff-2887326-10.txt | 41.99 KB | woprrr |
| #10 | 2887326-10.patch | 45.11 KB | woprrr |
| #8 | 2887326-8.patch | 4.24 KB | woprrr |
| #6 | 2887326-6.patch | 3.25 KB | woprrr |
Comments
Comment #2
woprrr commentedA large part of these issue are already assumed by refactoring of 1.x from 2.x.
Now we need to see if a submodule are justified to add more enhancements on comment UI. This entity have a very specific part and needed we can purpose a submodule to enhance specifically these part.
Comment #3
woprrr commentedComment #4
woprrr commentedHere the patch to make the full basic compatibility with Form Mode Manager. This patch permit a better compatibility with entities not implement 'edit' form class and set default class if edit not exists to arround all possibles problems of FormClass not exists.
Now with that patch we can start to decide if we need to create a sub-module or new one if anyone purpose to maintain :)
Comment #6
woprrr commentedFixe the order of definition for RoutingBase plugin.
Comment #8
woprrr commentedTest in \Drupal\form_mode_manager\EntityRoutingMapBase::setEditFormClass reveal a miss in tests installed modules.
Comment #10
woprrr commentedDuring my investigation I have found again few optimisation about code and reducing lot of load time/complexity in subscriber specifically.
Comment #11
woprrr commentedHere a small adjust for .travis and coding standards miss.
Comment #13
woprrr commentedChanges merged.