Clean up UserProfile validations
#525
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
pencil of edit state, but if no bio
At a guess could be related to keyValue component @franknoirot ?
Yeah @Irev-Dev I'm sure it's the display logic for the BioField Component, either in
userProfileConfigoruserProfileitself. Want me to take a try at fixing?Up to you @franknoirot, would be good to get a fix but bio editing is not hugely important. If you pick it up just assign the issue to yourself so we don't up working on it at the same time.
@Irev-Dev I've found other things I can break that need better validation. Making a list of to-do's:
Nameto nothinguserNameto nothinguserName, or at least their profile slug is at least kept unique if they do pick a colliding name.Would you like for this to be its own issue, or can this issue grow in scope a bit? I'll put up a PR that solves the bio visibility real quick for now.
I've enforced that Name and userName needing to have length #526, userNames needing to be unique should already be enforced ( I check locally just incase and seems fine) which is enforced on a db level since the userName is unique in the schema
https://github.com/Irev-Dev/cadhub/blob/main/app/api/db/schema.prisma#L19
What's still not great is that these problems are not communicated to the user, there is a toast message for when the name/bio etc is updated, but we should have a toast message when it fails too.
I'm happy for it to continue under this issue.
Excellent @Irev-Dev you made such quick work of that wow! Okay great I just gotta look at what those errors are returning but adding toasts shouldn't be too hard.