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

Split UserSettings form #67

Open
XanderVertegaal opened this issue May 14, 2024 · 1 comment
Open

Split UserSettings form #67

XanderVertegaal opened this issue May 14, 2024 · 1 comment

Comments

@XanderVertegaal
Copy link
Contributor

XanderVertegaal commented May 14, 2024

It's common that different settings connect to different models (in an applications where users have more to do) or that some things like changing your password/email have their own workflow for confirmation/verification.

So rather than using a single <form>, I usually to build a more modular settings menu.

For example, the user settings in LiNT are layed out like this:

screenshot of settings menu of LiNT application

My point is not about aesthetics, but the idea is to divide the page into several sections that can function as stand-alone components and use their own <form> (if applicable). For example, the change password option folds out into an old password / new password / repeat new password <form> that has its own submit event. This makes sense because (both here and in LiNT), changing your password connects to a different API endpoint from other settings.

Another advantage of dividing settings into several sub-components is that it's a component that can really grow out of control otherwise.

In this case, it would make sense to divide this page into the following sections:

  • Username
  • Personal details (i.e. first/last name)
  • Email
  • Password
  • Delete account

Originally posted by @lukavdplas in #64 (comment)

@XanderVertegaal
Copy link
Contributor Author

This refactor should also include the /password/change/ endpoint to allow for easy password changes (rather than requesting a password reset link), although that could still be valid as an alternative.

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

No branches or pull requests

1 participant