feat: make username required and add Share Guild Card button#229
feat: make username required and add Share Guild Card button#229sadhami0519 wants to merge 7 commits into
Conversation
|
@sadhami0519 is attempting to deploy a commit to the larythelord's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey @LarytheLord -- |
|
Thanks for this contribution! The feature is well-scoped and the UI/UX additions (Share Guild Card, username field) are solid. One important caveat: This PR requires a schema migration to add the
Also note: There are pre-existing test file errors in the repo (eslint-disable-next-line scope issues) that aren't blockers for this PR, but you may see them in local builds. Once the schema migration is in place, this is ready to merge! 🎯 |
|
Hi, thanks for the review! Just to clarify, the schema change is already included in this PR. For the API routes, yes I handled it. Updated |
|
Cool @sadhami0519 sorry about that I pointed that because the CI/lint and the github check failed due to few reasons could you look into that see what went wrong |
|
Hey @LarytheLord, Lint passes with 0 errors. The warnings are all in pre-existing files I didn't touch. The type-check failures are also in pre-existing test files. None of these were introduced by this PR. Let me know if I should work on these in this PR or if that will be handled seperately. |
Code Review — PR #229: Username + Share Guild CardOverall: ✅ Good to mergeThe implementation is solid and well-scoped. Here's the breakdown: What's great:
Minor suggestions (non-blocking):
Schema change:
Missing consideration:
Verdict: ✅ Approve with note about
|
What this does
Users without a username would 404 on their Guild Card. This makes username required at the schema level, adds a username input field at registration, and adds a Share Guild Card button to the adventurer dashboard so users can view and copy their Guild Card link.
Issue
Closes #166
Changes
prisma/schema.prisma— removed?fromusernamefield, making it requiredprisma/seed.ts— added username to all seed users to match the required fieldapp/api/auth/register/route.ts— added username field to schema validation and uniqueness checkapp/register/page.tsx— added username input field to adventurer registration formapp/dashboard/page.tsx— addedusernameto user select query, added<ShareGuildCard>component below rank chipscomponents/guild/ShareGuildCard.tsx— new client component with Guild Card link and copy to clipboard buttonSchema changes
username String @unique(wasString? @unique)Test plan
/guild/[username]and confirm it loads