Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The empty paragraph message is long, even wraps, and is duplicating the self-explaining button to add a paragraph.
Also it is limited to the select + button case that was from D7. It is misleading for Drupal 8 with dropbuttons or buttons.
Proposed resolution
Drop the second part completely. Just the single empty message: "No Paragraphs added yet."
User interface changes
Reduced empty message.
Comment | File | Size | Author |
---|---|---|---|
#43 | wrong_text_when_we_have-2717359-43.patch | 1.61 KB | Bambell |
#43 | interdiff-41-43.txt | 2.27 KB | Bambell |
Comments
Comment #2
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #3
johnchqueAlways set to 'Needs review' when upload a patch so testbot can take action. :)
Comment #4
johnchqueI think this should be something like: 'No @title has been added yet. Press the button below to add one.'
Also a comment here would be good. Maybe: // Check that the text displayed is different when we have more than one Paragraph type.
Comment #5
johnchqueComment #6
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #7
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #11
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #12
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #13
johnchqueLooks good. :)
Comment #14
miro_dietikerWe want to avoid this. Static text should be on the same line like t() to allow parsing / extraction of translatables.
Also you assume that the multiple title is used here while IMHO english currently even wrong twice (should be "No Paragraph has been...").
Not sure about proper single / multiple handling, but for instance Drupal also offers a language specific plural formula for translatables.
Comment #15
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #16
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #17
johnchqueIt seems we are not using @title_multiple here anymore, you can just drop it.
Comment #18
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #19
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #20
tduong CreditAttribution: tduong at MD Systems GmbH commentedYou can use assertText() instead of assertRaw() (use this when you want to assert HTML).
And would be nice if you write a comment about what you did in the uploading patch ;)
Comment #21
tduong CreditAttribution: tduong at MD Systems GmbH commentedand try to use
[]
instead ofarray()
whenever you can/provide a patch (see array standard coding). Sorry for being annoying with these standard coding stuff ^^'Comment #22
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #23
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #24
johnchqueReally close. But this should be:
Comment #25
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #26
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #27
tduong CreditAttribution: tduong at MD Systems GmbH commentedNice! Looks good to me! :)
Comment #28
miro_dietikerNot so sure about dropping this _multiple thing although it was unused...
What direction is core heading here? Berdir recently mentioned that Core tries to add multiple support for type labels.
Comment #29
miro_dietikerFollowing the concept of empty messages like views, we want to keep them, but short.
The current text is long, duplicate to the button that is self explaining, and adds more confusion, because it's even wront (referring to the select + button case, not considering the button type setting).
Thus, we want to drop the second part of the text completely making it much reduced and clean.
Comment #30
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedPatch also needed to be re-rolled. Tests are currently failing, so leaving to "Needs Work" for now.
Comment #31
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedComment #41
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedThe test is deleting paragraph types which newly added tests were using, so I moved the test at the end of the test function. Should pass now.
Comment #42
miro_dietikerRescoping the issue summary.
Comment #43
Bambell CreditAttribution: Bambell at MD Systems GmbH commentedHere we go.
Comment #44
miro_dietikerCommitted! :-)
Comment #46
johnchqueFixed right?