Feeds - Use AJAX to update the Paragraph Field selector

Created on 15 September 2018, almost 6 years ago
Updated 15 June 2024, 13 days ago

Problem/Motivation

When you want to map to a certain field on a paragraph, you currently have to take the following steps:

  1. Create a paragraph type with a text field.
  2. Create a content type and a paragraph field to it.
  3. Create a feed type, choose the node processor and select the content type created at step 2.
  4. On the mapping page, choose the paragraph field as target.
  5. Configure the target, select a paragraphs type.
  6. For the "Paragraph field" no options appear yet, only after "saving" the configuration first (click the "Update" button) and then re-edit it (click the wheel icon), options for text fields appear.

It's not clear for everyone that you have to update the configuration first and then re-edit it. The description of the "Paragraph field" does imply that you need to do that ("Field options do not appear until a type has been chosen and saved"), but not everyone gets that. And it is less user-friendly. It doesn't have to be that way.

Proposed resolution

I think we can improve the UX by using AJAX to update the Paragraph field selector.

Remaining tasks

  • Add #ajax to the form to update the selector "Paragraph field" when a value gets chosen for the selector "Paragraphs type".

User interface changes

The selector "Paragraph field" updates immediately after selecting a value from the "Paragraphs type" selector.

API changes

None.

Data model changes

None.

Original report by Adam Fermier

Steps to reproduce:

1) Create a paragraph type with text fields 1 and field 2
2) Create a content type and insert the above paragraph
3) Create a feeds type and choose node as the process type and the content type from #2
4) In mapping tab - select target as the paragraph field
5) BUG: Columns of that paragraph are not displayed (image included).

Versions:
Feeds 8.x-3.0-alpha3
Drupal core 8.5.6
Paragraphs 8.x-1.3

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Adam Fermier

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024