Problem/Motivation

Paragraphs can be created only at the end of the list of the existing ones (std behaviour for multiple value fields). This leads to the need to do sometimes tedious sorting operations if the newly created paragraph needs to be placed higher up the list.

Proposed resolution

Introduce the possibility to create a new paragraph "in place" at a position in the list.

Remaining tasks

  1. Create wireframes to show the concept
  2. Create a design for the backend theme thunder_admin
  3. Implement a proof of concept in code
  4. See if this can be a patch for paragraphs/inline_entity_form or needs to be implemented separately
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pixelmord created an issue. See original summary.

chr.fritsch’s picture

pixelmord’s picture

Here's an early wireframe how this could look. Most likely the Add-Buttons before and after each paragraph would only be revealed on hover on a device supporting hover states, other devices might always have these buttons visible or a special insert mode needs to be triggered, this needs to be still explored.

miro_dietiker’s picture

IMHO the proposal we are trying to implement with the add widget will cover this requirement.
#2236905: [META] Nicer UI / Icons for "Paragraph type" + "Add another Paragraph"

The widget will degrade to something like the outlined items above if the advanced cases do not apply. For instance:
- If paragraph types are not grouped, the group tabs are not displayed
- If paragraphs are not nested, the level selection (where to add?) disappears.

We will have icons.
#2830016: Add a thumbnail/icon field to Paragraphs type

The widget will not load through AJAX, making a smooth experience possible. This will be possible, because we will add data attributes to the fields about what paragraph type is applicable to that field. And this will also be taken into consideration by the drag & drop mode.

chr.fritsch’s picture

chr.fritsch’s picture

Status: Active » Needs review
FileSize
35.19 KB

Here is a patch, that can be applied on paragraphs 1.1, so that we could use it in Thunder

mxh’s picture

Status: Needs review » Needs work

#6 works, but editors need a feedback regarding the process of adding a new paragraph.
After the type has been selected from the modal, the loading process for adding the paragraph might take some time. Currently, users don't see a throbber or anything which tells them that the form is currently processing, which might lead to confusion.

daniel.bosen’s picture

Status: Needs work » Fixed
daniel.bosen’s picture

Status: Fixed » Closed (fixed)
Andre-B’s picture

@daniel.bosen Please comment on the issue raised in #6. Since I can not reopen this issue I am hoping for a quick reply.

daniel.bosen’s picture

@Andre-B: Please create a new issue for this.

mtodor’s picture

I have created issue: #2899034