Skip to content

Suggesting alternative username when taken (client-side)#26

Open
mhk2-cmu wants to merge 1 commit into
CMU-17313Q:mainfrom
mhk2-cmu:feat/suggest-username-1
Open

Suggesting alternative username when taken (client-side)#26
mhk2-cmu wants to merge 1 commit into
CMU-17313Q:mainfrom
mhk2-cmu:feat/suggest-username-1

Conversation

@mhk2-cmu
Copy link
Copy Markdown

Summary

When a username is already taken during registration, show a friendly suggestion based on the user’s input (append suffix), per Issue #1.

What changed

  • public/src/client/register.js: replace the plain “username taken” error with:
    • read current input value
    • compute suggestion = <entered> + "suffix"
    • show: Username taken. Maybe try "<suggestion>"

Why

Improves UX by pointing the user to an alternative immediately (as requested in the issue).

How to test

  1. Start the app and open /register.
  2. Type a username you know is taken (e.g., test123).
  3. Blur the field or try to submit.
  4. Expected: inline message Username taken. Maybe try "test123suffix".

Notes

  • Frontend-only, minimal change.
  • No new deps, no backend changes.

Fixes #1

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.

Suggest a new username if a username is taken during registration

1 participant