Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX] Contact form: Improve the recipients field #2872

Closed
ghost opened this issue Oct 3, 2017 · 18 comments
Closed

[UX] Contact form: Improve the recipients field #2872

ghost opened this issue Oct 3, 2017 · 18 comments

Comments

@ghost
Copy link

ghost commented Oct 3, 2017

When you enable the core Contact module and then go to /admin/structure/contact/configure/1 to add multiple email addresses as recipients, you have to separate them with a comma. But since the Recipients field is a textarea, one may assume that you can enter one email address per line (e.g. separated by a newline character). This isn't the case.

For better UX, I'd suggest either:

  1. Make the Recipients field a textfield (not a textarea), so it's more obvious that multiple email addresses need to be separated by a specific character.
  2. Change the backend to split multiple email addresses by a newline character instead of a comma (and therefore make better use of the existing textarea field).
  3. Keep the textarea, but allow separating multiple email addresses by a newline OR a comma (i.e. allow the user to enter addresses in whatever format they're used to).

My preferred solution (in order of preference) is: 3 > 2 > 1


PR by @opi: backdrop/backdrop#2147

@ghost
Copy link
Author

ghost commented Oct 3, 2017

Here are screenshots when trying to enter one email address per line...

screenshot-2017-10-3 configure contact category panda s backdrop sandbox

screenshot-2017-10-3 configure contact category panda s backdrop sandbox 1

@opi
Copy link

opi commented Apr 24, 2018

PR backdrop/backdrop#2147 for solution 3, following the Robustness principle : Be conservative in what you send, be liberal in what you accept.

Contact category form can accept addresses separated by comma, space or line-break.
After submission, addresses list is always cleaned up to a proper comma-separated list.

@opi opi changed the title Entering multiple email addresses in a Contact form category can be confusing [UX] Improve the recipients field in contact category form Apr 24, 2018
@quicksketch
Copy link
Member

Great job @opi! I updated your PR with minor changes:

  • Added test coverage of the new input formats. Also switch from directly using config() modification of the contact settings to the new contact settings form.
  • Rerolled against 1.x
  • IMO the best presentation of a list of emails is separation by new lines. I switched the display in the settings form to use new lines, though they are still stored with commas.

@quicksketch
Copy link
Member

With all the modifications to Contact module happening at the same time, this would by easier if we only merged this into 1.x for 1.11.0.

@quicksketch quicksketch added this to the 1.11.0 milestone Jun 14, 2018
@quicksketch
Copy link
Member

quicksketch commented Jun 15, 2018

Hm, one more thought here. Potentially we should also allow semicolons as a separator. I believe that is the default separator for Outlook (or it was years ago).

https://www.lifewire.com/separate-multiple-email-recipients-1173274

Outlook and any other email program that looks for names in the last name, first name format, where the program uses the comma as a delimiter, may run into problems if you separate email recipients with commas. Email clients that use commas as delimiters typically use semicolons to separate multiple addresses in their header fields. In Outlook, multiple addresses are entered with semicolon separators by default.

There was a similar request for Webform module a long time ago, so we added semicolons there as well.

@opi
Copy link

opi commented Jun 15, 2018

IMO the best presentation of a list of emails is separation by new lines. I switched the display in the settings form to use new lines, though they are still stored with commas.

agreed, thanks.

Hm, one more thought here. Potentially we should also allow semicolons as a separator.

I'll add semicolons as separator, nice improvement. I'll probably rebase & squash the PR, while keeing both authorship.

@opi
Copy link

opi commented Jul 8, 2018

I finally update the PR with semicolon separator, and a little UX improvment https://github.com/backdrop/backdrop/pull/2147/files#diff-037ce3d000dd806422b7fda44dddab91R203 ; I found myself in a merge-apocalyspe, thus we need to cleanup the Git history before considering the merge into 1.x

@klonos
Copy link
Member

klonos commented Jul 8, 2018

I found myself in a merge-apocalyspe

😆

Wondering how/if #1005 fits here.

@opi
Copy link

opi commented Jul 10, 2018

Cleaned up the Git history

@opi
Copy link

opi commented Jul 26, 2018

Tests are green, ready for review !

@olafgrabienski
Copy link

@opi The sandbox site displays an "unexpected error" on the home page. It's possible to log in though, and Status report says that there are Database updates available.

@opi
Copy link

opi commented Jul 26, 2018

@olafgrabienski sandbox fixed, thanks for the report.

@olafgrabienski
Copy link

olafgrabienski commented Jul 26, 2018

Thanks for fixing the sandbox! I've tested the recipient field there with the "ready to paste" list, the results look good: email addresses can be entered in various ways, are displayed using new lines (configuration view) or commas (overview). Great improvement!

(RTBC for the sandbox, haven't looked at the code.)

@klonos
Copy link
Member

klonos commented Jul 28, 2018

Suggestions/comments:

  1. Very clever to have the textarea rows be entries + 2 👍

  2. We could be sorting email addresses alphabetically for an added bonus. This would help in cases where these lists get long. I would first go by grouping by domain, then alpha sorting for each domain.

I have filed a few follow-up UX issues for things that I have noticed related to the contact categories form and the listing.

@opi
Copy link

opi commented Jul 31, 2018

Marked as RTBC as 3 different people said it's ok.

@klonos klonos changed the title [UX] Improve the recipients field in contact category form [UX] Contact form: Improve the recipients field Jul 31, 2018
@klonos
Copy link
Member

klonos commented Jul 31, 2018

RTBC indeed 👍

backdrop-ci referenced this issue in backdrop/backdrop Aug 4, 2018
@quicksketch
Copy link
Member

Thanks all! Merged backdrop/backdrop#2147 into 1.x for 1.11.0. Because we have so many changes to Contact module in the works, I'm not backporting this into 1.10.x (though if we feel strongly I can cherry-pick it back).

@opi
Copy link

opi commented Aug 4, 2018

Because we have so many changes to Contact module in the works, I'm not backporting this into 1.10.x

Agree. Thanks for merging this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants