bridge_troll
bridge_troll copied to clipboard
User can specify display name
User should be able to specify how their name is displayed publicly via a separate field.
To the signup form, add:
- a "Display Name" field with helper text: "This is the name that will be used throughout the app, including on the public event RSVP listing and most organizer views."
- Above "First/Given Name" , add "Your first and last name will only be used on the security spreadsheet, so please use whatever is on your ID for those fields."
Display name should also be editable on the settings page.
Update the app to use display name everywhere except the security download.
I think this is important because if people know that they have the option for their display name to be a pseudonym, they are more likely to use their actual name for their account, which will help create an RSVP list for building security that is useful.
Some buildings are much more strict than others about having the right name on the list.
I like this idea.
@lilliealbert I'm working on this
Is this field mandatory or optional?
Optional! If it's empty, the app should default to First Name / Last Name.
What constraints should we consider?
I was thinking this field can contain letters (a-z), numbers (0-9), dashes (-), underscores (_), and periods (.). What do you think?
That seems like a good place to start!
Do you know if there a way to save empty string values as null in the database? Our new username field in the registration form is being sent as “” if it has no value, and it’s being stored as is. But I want it to be null in the database, not empty string, because I'm doing this: https://github.com/anymoto/bridge_troll/blob/feature/add_user_display_name/app/models/user.rb#L87
There’s a gem for that: https://github.com/rubiety/nilify_blanks, but I’m not sure it’s the best option. What do you suggest?