Problem/Motivation

The help text of the Recipient field in the email action form is now missing the user mail token.

Steps to reproduce:
1. enable the actions module
2. create advanced action: send email (admin/config/system/actions/add)
3. check the text below "Recipient" input field

Proposed resolution

improve text:
for example

"The email address to which the message should be sent OR enter [node:author:mail], [comment:author:mail], [user:mail], etc. if you would like to send an email to the author of the original post or to one or more users. "

Remaining tasks

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Update the patch to incorporate feedback from reviews (include an interdiff) Instructions
Embed before and after screenshots in the issue summary Novice Instructions

User interface changes

before

API changes

No

Data model changes

No

CommentFileSizeAuthor
#60 Improvement-help-text-Recipient-field-2603236-60.patch1.06 KBlomasr
#56 Improvement-help-text-Recipient-field-2603236-56.png62.76 KBdbazuin
#55 Improvement-help-text-Recipient-field-2603236-55.patch1.06 KBtomgilissen
#54 Improvement-help-text-Recipient-field-2603236-54.png69.84 KBdbazuin
#52 Improvement-help-text-Recipient-field-2603236-52.patch1.11 KBlomasr
#52 improvement-help-text-recipient-field.png21.14 KBlomasr
#42 Selection_001_75_after.png55.83 KBalimac
#37 Selection_002.png52.02 KBPepino710
#37 Improvement_label_help_text_email_recipient_field-2603236-D8-2.patch1.17 KBPepino710
#36 Selection_001.png49 KBPepino710
#34 Improvement.label_.help_.text_.email_.recipient.field-2603236-D8.patch1.12 KBPepino710
#32 screenshot-2603236.png34.6 KBtomgilissen
#23 Selection_002.png60.81 KBtomgilissen
#22 issue-2603236-fixed.png45.48 KBcriscom
#21 issue-2603236.png48.41 KBcriscom
#11 Improvement-help-text-Recipient-field-2603236-11-D8.patch1.94 KBdbazuin
#9 Improvement-help-text-Recipient-field-2603236-9-D8.patch1.84 KBdbazuin
#4 Improvement-help-text-Recipient-field-2603236-4-D8.patch1.1 KBdbazuin
#2 Improvement-help-text-Recipient-field-2603236-2-D7.patch856 bytesdbazuin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dbazuin created an issue. See original summary.

dbazuin’s picture

cilefen’s picture

Version: 7.41 » 8.0.x-dev

I am bumping this to 8.0.x because of the backport policy. The same text appears in Drupal 8.

dbazuin’s picture

Ok here a my first attempt for a D8 patch.

cilefen’s picture

Status: Active » Needs review
cilefen’s picture

Component: mail system » action.module

The last submitted patch, 2: Improvement-help-text-Recipient-field-2603236-2-D7.patch, failed testing.

The last submitted patch, 2: Improvement-help-text-Recipient-field-2603236-2-D7.patch, failed testing.

dbazuin’s picture

Now also changers the help text.

BarisW’s picture

Status: Needs review » Needs work

Hi dbazuin,

thanks for the patch! Almost there, but I think that the two things below needs to be tackled too.

  1. +++ b/core/modules/action/src/Plugin/Action/EmailAction.php
    @@ -197,7 +197,10 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
           // We want the literal %author placeholder to be emphasized in the error message.
    

    This comment should be updated too.

  2. +++ b/core/modules/action/src/Plugin/Action/EmailAction.php
    @@ -197,7 +197,10 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
    +        )));
    

    Indenting seems wrong?

dbazuin’s picture

BarisW’s picture

Looks good to me. +1

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dbazuin’s picture

Issue tags: +Usability
dbazuin’s picture

Version: 8.1.x-dev » 8.2.x-dev
dbazuin’s picture

Issue summary: View changes
dbazuin’s picture

Status: Needs work » Needs review
Issue tags: +Needs manual testing

Just enable the action module en create a email action.

Under the Recipient field the help text should read:
The email address to which the message should be sent OR enter [node:author:mail], [comment:author:mail], [user:mail], etc. if you would like to send an email to the author of the original post or to one or more users.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

yoroy’s picture

criscom’s picture

I will have a look at this.

criscom’s picture

Status: Needs review » Needs work
FileSize
48.41 KB

Still have to apply the patch, sorry.

criscom’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
45.48 KB

Steps to reproduce:

1. Enable actions module
2. Create advanced action: send email
3. Git apply -v Improvement-help-text-Recipient-field-2603236-11-D8.patch
4. Checked the text below "Recipient" input field

The email address to which the message should be sent OR enter [node:author:mail], [comment:author:mail], [user:mail], etc. if you would like to send an email to the author of the original post or to one or more users.

5. Text is correct. See screenshot:

Issue resolved

tomgilissen’s picture

FileSize
60.81 KB

Steps have been reproduced and the patch is working! See screenshot Screenshot

tomgilissen’s picture

Issue summary: View changes
yoroy’s picture

Status: Reviewed & tested by the community » Needs review

This is indeed more correct but 3 lines of description makes this almost documentation :-)

What if we make the label more explicit, then we could make the description quite a bit shorter:

Label: Recipient email adress

Description: You can also enter [node:author:mail], [comment:author:mail], [user:mail], etc. to send email to the post author or to one or more users.

Sutharsan’s picture

Status: Needs review » Needs work

Back to needs work. I agree with yoroy that the proposed description is quite long.

Sutharsan’s picture

@tomgilissen, Pls use the issue summary template (https://www.drupal.org/issue-summaries) to update the issue summary. It contains a number of standard headings which help you cover the various things we like to see in an issue summary. A screenshot with the current situation, to illustrate the problem, will also help.

ifrik’s picture

Thanks,
the patch works, but the initially proposed sentence is rather convoluted, it's unclear how "or to one or more users." can be added. I think we generally avoid emphasizing two different option with a capital OR because that's not really accessible, and usually a sign that the sentence is a bit too big.

How about:

Enter either an email addresses or a token to send the email to the author of the original post. Available tokens are [node:author:mail], [comment:author:mail], [user:mail]. Separate several recipients with a comma.

criscom’s picture

I agree with ifrik. Her text suggestion sounds really good to me.

tomgilissen’s picture

I like the suggestion by yoroy to change the label to: Recipient email adress

And also agree with ifrik to change the description:
Enter either an email address or a token to send the email to the author of the original post. Available tokens are [node:author:mail], [comment:author:mail], [user:mail]. Separate several recipients with a comma.

I think we should keep address singular; token is also singular.

YesCT’s picture

Issue summary: View changes
tomgilissen’s picture

FileSize
34.6 KB
tomgilissen’s picture

Issue summary: View changes
Pepino710’s picture

Patch created for YesCT with tomgilissen. Cool.

ifrik’s picture

Thanks for picking this up so fast again.

Could you still add the "Separate several recipients with a comma." as last sentence because it's not obvious to users that they can add several recipients otherwise.

Pepino710’s picture

FileSize
49 KB

Patch created for YesCT with tomgilissen. Cool.patch

Pepino710’s picture

Separate several recipients with a comma added. patch2

ifrik’s picture

Status: Needs work » Needs review
ifrik’s picture

Status: Needs review » Reviewed & tested by the community

Thanks,
I think we've got it now!

Just as a general remark for naming and numbering patches: Please keep the patch name as it is (even if it looks weird) because otherwise it looks like the work started from scratch again. And always add the comment number to the name and just change that accordingly for a new patch. This way, it's easy to find where in the issue a specific patch was posted.

alimac’s picture

Issue summary: View changes
Issue tags: -Needs screenshots

Added the "after" screenshot

alimac’s picture

Issue summary: View changes
alimac’s picture

Issue summary: View changes
FileSize
55.83 KB
tomgilissen’s picture

Retested this issue with patch Improvement_label_help_text_email_recipient_field-2603236-D8-2.patch
The result is like mentioned by alimac in #42

Well done Pepino710 ! : )

webchick’s picture

Status: Reviewed & tested by the community » Needs review

yoroy made an enigmatic comment on stage during the Live Commit so marking back to Needs Review for now. ;)

tomgilissen’s picture

I'm very curious for the enigmatic review by yoroy (had to leave because of a return flight). Can anyone share it?

Sutharsan’s picture

@tomgilissen, This is how I interpreted yoroy's comment: Since the field label already contains "recipient email address", lets not double this information from the field description.

dbazuin’s picture

Can anybody adds this comment from Yoroy?

Sutharsan’s picture

Some comments on the content of the text:
- The original description does no contain the token "[user:mail]". It does not fall into the description of "to send the email to the author of the original post".
- The text "Available tokens are ..." implies that there is a limited set of tokens. This is not true because contrib modules may tokens too.
- The last sentence "Separate several recipients with a comma." can do without the word 'several'.

Two description suggestions. The minimal:

Alternatively, use tokens: [node:author:mail], [comment:author:mail], etc. Separate recipients with a comma.

The more verbose:
Alternatively, use tokens [node:author:mail], [comment:author:mail], etc. to send the email to the author of the original post. Separate recipients with a comma.

dbazuin’s picture

Sutharsan sounds good to me.

yoroy’s picture

Sorry, had to catch the flight home soon after the enigmatics :)

Sutharsan's mimimal version looks great to me!

dbazuin’s picture

I thougt you would yoroy. And I agree.

lomasr’s picture

Sutharsan's second description suggestion sounds good to me.

dbazuin’s picture

dbazuin’s picture

Patch is working.
See screenshot.

tomgilissen’s picture

I've uploaded a patch that follows the minimal suggestion by Sutharsan in #48 and supported by yoroy in #50: Improvement-help-text-Recipient-field-2603236-55.patch

Only local images are allowed.

dbazuin’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
62.76 KB

This patched also works and indeed this is the text we agreed on.

yoroy’s picture

Yep, looking good, thanks everybody!

naveenvalecha’s picture

Issue tags: +String change in 8.3.0

Thanks! looks good.

xjm’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs review

Thanks everyone for working on this!

Note that the "after" screenshot in the summary does not reflect the current patch. I've removed it from the summary, because I almost posted a review based on the text in the screenshot, which was inaccurate.

+++ b/core/modules/action/src/Plugin/Action/EmailAction.php
@@ -164,10 +164,10 @@ public function defaultConfiguration() {
+      '#description' => t('Alternatively, use tokens: [node:author:mail], [comment:author:mail], etc. Separate recipients with a comma.'),

I think the word "Alternatively" is a bit odd here, because it's not being given as an alternate to anything. Maybe:

You may also use tokens: [...]

lomasr’s picture

Issue tags: -String change in 8.3.0 +String cha
FileSize
1.06 KB

Changed the text as per suggested in #59 . Thanks

dbazuin’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs manual testing, -String cha +String change

I have reviewed patch 60.
It has only the text change xjm suggested so I think it is ok.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -String change +String change in 8.3.0

Committed 07f1e50 and pushed to 8.3.x. Thanks!

  • alexpott committed 6ff8667 on 8.3.x
    Issue #2603236 by dbazuin, Pepino710, lomasr, tomgilissen, criscom,...

Status: Fixed » Closed (fixed)

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