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.

Comments

woprrr created an issue. See original summary.

woprrr’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Issue tags: +Form mode manager 2.x

A 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.

woprrr’s picture

Title: Compatibility with Comment entity » Ui for Comment entity
Issue summary: View changes
woprrr’s picture

Assigned: Unassigned » sallakane
Status: Active » Needs review
Issue tags: -node comments
StatusFileSize
new2.9 KB

Here 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 :)

Status: Needs review » Needs work

The last submitted patch, 4: 2887326-4.patch, failed testing. View results

woprrr’s picture

Status: Needs work » Needs review
StatusFileSize
new3.25 KB

Fixe the order of definition for RoutingBase plugin.

Status: Needs review » Needs work

The last submitted patch, 6: 2887326-6.patch, failed testing. View results

woprrr’s picture

Status: Needs work » Needs review
StatusFileSize
new4.24 KB

Test in \Drupal\form_mode_manager\EntityRoutingMapBase::setEditFormClass reveal a miss in tests installed modules.

Status: Needs review » Needs work

The last submitted patch, 8: 2887326-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

woprrr’s picture

Status: Needs work » Needs review
StatusFileSize
new45.11 KB
new41.99 KB

During my investigation I have found again few optimisation about code and reducing lot of load time/complexity in subscriber specifically.

woprrr’s picture

StatusFileSize
new49.08 KB

Here a small adjust for .travis and coding standards miss.

  • woprrr committed 69defae on 8.x-2.x
    Issue #2887326 by woprrr: Ui for Comment entity
    
woprrr’s picture

Status: Needs review » Fixed

Changes merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.