Skip to content

Modify edit profile form by requiring edit reason for each field#14331

Open
danieljames-dj wants to merge 3 commits into
thewca:mainfrom
danieljames-dj:edit-reason-ui
Open

Modify edit profile form by requiring edit reason for each field#14331
danieljames-dj wants to merge 3 commits into
thewca:mainfrom
danieljames-dj:edit-reason-ui

Conversation

@danieljames-dj
Copy link
Copy Markdown
Member

Currently, in the edit profile form we have a single edit reason field for all the requests together. This PR targets at having separate edit reason fields for each change in the frontend. (In the backend it will merge all the edit reasons to a single string temporarily, but later this will be a column in the database - in a follow-up PR (not a huge change in backend though, I can do it in the same PR if needed))

Pros of this change:

  • Users can give exact reason for each of the field change.
  • I've plans to improve the reason field in each of them - for example, for country change, we will have some additional questions as well like whether they had citizenship earlier, etc. We will also have some fields with which the backend can deterministically decide if it's a fix or update. Also, the fix/update decision will usually won't be at a request level, but instead it will be at field level - means a single request can have name as update, and country as fix. So having the details for each field makes it easier for maintenance.

Cons of this change:

  • Some users request changes to multiple fields with exact same reason, for them they have to fill in the reason twice.

gender={value}
onChange={onValueChange}
/>
<EditReasonField
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about not requiring a reason for gender change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good point, but I like to take it up in a follow-up PR in a different way. This PR aims to have text field for all the reasons, and the improvements for each of them will be a separate problem to solve.

For DOB, instead of not making reason mandatory, I prefer giving user the option to tick a checkbox which says that they agree that this change must be done, [...]. This way we will get an extra validation from user that they are finen with this change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants