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

Make name field optional in POST /api/subscribers #967

Closed
paulrudy opened this issue Oct 4, 2022 · 6 comments
Closed

Make name field optional in POST /api/subscribers #967

paulrudy opened this issue Oct 4, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@paulrudy
Copy link

paulrudy commented Oct 4, 2022

Is your feature request related to a problem? Please describe.

The POST /api/subscribers API call requires the name field, but this is not always available. Often, for brevity and ease of use, signup forms have only a single field for an email address.

(Related (and closed) issue #525 but that issue was not about the API.)

Describe the solution you'd like

Please make the name field optional in the POST /api/subscribers API call.

@paulrudy paulrudy added the enhancement New feature or request label Oct 4, 2022
@paulrudy paulrudy changed the title Make name field option in POST /api/subscribers Make name field optional in POST /api/subscribers Oct 4, 2022
@knadh
Copy link
Owner

knadh commented Oct 4, 2022

Please see this #594 for context on the decision to make name mandatory. In the API, if you don't have a name available, you can just pass the e-mail value as name.

@paulrudy
Copy link
Author

paulrudy commented Oct 4, 2022

Thanks for the quick reply, and I apologize for not finding that issue previously.

I'm not familiar with sprig functions referenced in the docs, but could those be used to adjust for the presence of an email address in the {{ .Subscriber.Name }} field when composing a template?

@knadh
Copy link
Owner

knadh commented Oct 4, 2022

The issue is a matter of UX. With empty names, the subscriber list on the admin UI will look inconsistent. Most users who end up using the default template will see empty names, causing confusion.

@paulrudy
Copy link
Author

paulrudy commented Oct 4, 2022

Ok, I appreciate your explanation 🙌🏼

@knadh
Copy link
Owner

knadh commented Dec 30, 2023

0d74619 makes having to submit name via API and in the CSV file optional. If no name is provided, the name part of the e-mail is automatically extracted and assigned.

@ezuk
Copy link

ezuk commented Feb 7, 2025

This UX choice makes it so that interpolating names into emails ends up being either "Hi Charles" (if a name was provided) or "Hi charlie557z" (or whatever the email is) if a name was not provided.

The latter is exactly the opposite of personalization. The UX impact for the receiver of the mail is alienating. I would rather have an empty list in the admin panel any day.

For now, I've set up our forms to pass the string "there" when no name is provided, so this serves as a fallback ("Hi there" beats "Hi coolperson663").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants