CodeForPhilly / paws-data-pipeline

PAWS Data Pipeline Project
MIT License
17 stars 9 forks source link

New User modal tweaks #587

Closed c-simpson closed 9 months ago

c-simpson commented 10 months ago
  1. Can we use something than an existing user_name?
  2. We never found a use for Editor, so let's drop. Can we have radio buttons to choose instead of requiring them to type it in?
  3. Can we leave Password blank until they start typing?

image

carrollsa commented 10 months ago
  1. I'm not sure what you mean by use something different than an existing user_name. Are you finding that it won't let you create a new user with a username that isn't already in the database?
  2. Can definitely drop editor. When I built this, I tried a dropdown which was really not cooperating. Fairly certain I can make it work without much effort. I'll look into it again, and I think radio buttons will be easier anyway.
  3. Do you mean that you don't want the form prepopulated with "Password" and "Confirm Password"? I can suppress it, but that's fairly standard behavior. My blank form looks like this: image
c-simpson commented 10 months ago

It appears that #s 1&3 were from the browser remembering form data. Trying in private window gets this:

image

carrollsa commented 10 months ago

Interesting. I haven't been able to replicate any holdover. I know useForm has a reset() option, which can let you clear the state it maintains internally. I can't remember, but I feel like I had a reason I didn't use it here. I can work it in if we're worried, but I feel like I'd want to be able to replicate the caching behavior to make sure I reset in the right place.

carrollsa commented 10 months ago

Moving forward with the following changes:

  1. Removing 'editor' role
  2. Updating user/admin choice to radio buttons
  3. Tweaking password hint message to say "12 characters" instead of "12 letters"