This task is for a new student in MD Systems, don't do it if it was not assigned to you.

Problem/Motivation

The paragraphs field widget always displays a label of the paragraph type name at the top. This can lead to confusing situations:

During the sprints we discussed about this and we decided that we will prefix the label with "Type: ". This would look like this:

Proposed resolution

Add a "Type: " text before the Paragraph type label in InlineParagraphsWidget.php

Remaining tasks

Also add tests :)

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lukas von Blarer created an issue. See original summary.

miro_dietiker’s picture

Issue tags: +Usability

Alternative options:

1) "Paragraph type:" => "Type:"
We try to avoid repeating mention of "Paragraph" in UI. Because in your screen it's "Content" that sometimes is named "Paragraph(s)".
Or did you intend to use the widget settings label? (singular or plural?)
I think it's still adding redundancy.
Also we should keep short to keep room for the closed / collapsed summary we will add...

2) Or removal of the field label if it's identical to the paragraph type.
3) Or removal of the field label if it's only a single field.

Lukas von Blarer’s picture

I think field removal would not make sense. I actually also though about whether including "Paragraph" is a good idea. Lets use "Type: ".

jonathanshaw’s picture

Status: Active » Closed (duplicate)

The type label was removed in #2642810: UX improvements for nested paragraphs as a step to UX improvement by decluttering the layout. However, that issue did not create an alternative way of distinguishing the paragraph and field labels, leaving us with the situation described in the IS here.

#2668706: Visual weight of paragraph field labels vs paragraph type labels vs field labels was created as a follow-up to resolve the problem, therefore closing this issue as duplicate.

johnchque’s picture

Issue summary: View changes
Status: Closed (duplicate) » Active
FileSize
26.09 KB
27.43 KB

Change a bit the IS and set it back to active since we re added the label.

johnchque’s picture

Ginovski’s picture

Ginovski’s picture

johnchque’s picture

Status: Needs review » Needs work
+++ b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
@@ -294,7 +294,7 @@ class InlineParagraphsWidget extends WidgetBase {
+          '#markup' => '<strong>' . 'Type: ' . $bundle_info['label'] . '</strong>',

Nice work, close enough, but the "strong" tag should be in the same string as 'Type: '. No need to have them separated.

Good to know you assigned the issue to yourself.

Lukas von Blarer’s picture

While this doesn't declutter the UI, it still helps understanding which are field labels an which are labels for the paragraph type. Is there a simple way to seperate it a little more? Should we get this committed and deal with that in #2668706: Visual weight of paragraph field labels vs paragraph type labels vs field labels?

miro_dietiker’s picture

Status: Needs review » Fixed

Yeah that was the decision: First make it clearer and then discuss about visual improvements in the related issue.
Thus i committed and we can close the issue here because its no more confusing.

Status: Fixed » Closed (fixed)

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