[meta] Make add field/group experience consistent across core and contrib modules

Created on 29 February 2024, 10 months ago

Problem/Motivation

When a field or group of fields can take multiple occurrences, the editor experience for adding the additional values is inconsistent across core and contributed modules. I believe that this places cognitive load upon editors. It would be better if there were a consistent presentation of the add additional values interface.

While someone, perhaps myself, ultimately needs to file issues against core and/or the contributed modules, there needs to be agreement first within the Drupal community as to what the consistent behavior would best be. This is a meta issue for discussing what the consistent behavior would best be.

Currently, repeatable fields in Drupal core get a button with the static text "Add additional item". Repeatable groups in Paragraphs get a button with the variable text "Add {paragraph label}" followed by the text "to {content type field label}". My concern is that this inconsistency is potentially confusing to editors.

Steps to reproduce

1. Go to https://simplytest.me
2. In the field, type "Core" (without the quotes)
3. Choose Drupal core
4. Click the add project button
5. In the project field, type "Paragraphs"
6. Choose Paragraphs
7. Click the button to create the site
8. Once the site has been created, log in as admin
9. In the admin menu, choose Manage, then Structure, then Paragraphs types
10. Click Add paragraph type
11. Type label "Single contact"
12. Click Save and manage fields
13. Click Create a new field
14. Type label "Contact name"
15. Choose text
16. Click Continue
17. Change Allowed number of values to unlimited
18. Click Save settings
19. Choose Structure, then Content types, then, on the row for Basic page, choose Manage fields
20. Click Create a new field
21. Type label "Related content"
22. Choose Reference
23. Choose Content
24. Under Reference type, Content type, check Basic page
25. Click Continue
26. Change Allowed number of values to unlimited
27. Click Save settings
28. Click Create a new field
29. Type label "Contact info"
30. Choose Paragraphs
31. Click Continue
32. Under paragraph types, check Single contact
33. Click Save settings
34. In the admin menu, choose Manage, then Content, then Add content, then Basic page

Expected result: The two buttons for adding additional occurrences of the two different fields use consistent wording with respect to each other. Aside from the spacing issue, I think the wording provided by Paragraphs is more informative. That said, I am seeking agreement on this meta issue before filing an issue either with Drupal core to make it agree with Paragraphs, or with Paragraphs to make it agree with Drupal core.

Expected result if we choose to make Drupal core agree with Paragraphs (the filer's preferred option):
The button for Related content would read "Add Related content" and possibly be followed by "to this page".

Expected result if we choose to make Paragraphs agree with Drupal core:
The button for contact info would read "Add another item" on the button with no additional text afterwards.

Actual result:
The Related content field uses the wording "Add another item" on the button with no additional text afterwards.
The Contact info field uses the wording "Add Single contact" on the button, followed by "toContact info"

Proposed resolution

This is what needs to be discussed and agreed upon by the Drupal community.

Remaining tasks

User interface changes

This is what needs to be discussed and agreed upon by the Drupal community.

API changes

Data model changes

Release notes snippet

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
UI textΒ  β†’

Last updated 4 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States charles belov San Francisco, CA, US

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024