feat: remove space and @ from user input atproto handle#1137
feat: remove space and @ from user input atproto handle#1137danielroe merged 2 commits intonpmx-dev:mainfrom
@ from user input atproto handle#1137Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
danielroe
left a comment
There was a problem hiding this comment.
what about doing the validation at the input level? ie stripping invalid characters directly on paste/type?
📝 WalkthroughWalkthroughAdds a watcher to the login handle input in the client-side auth modal that normalises user-typed handles in real time. Normalisation trims surrounding whitespace, converts to lowercase, and removes any characters other than lowercase letters a–z, digits 0–9, dot (.) and hyphen (-). If the normalised value differs from the original typed value, the input field is updated. No changes were made to login submission behaviour, exported/public APIs, or control flow. Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
Yeah, that's better approach 👍🏻 I'll update later today. |
3b4a970 to
5fa8263
Compare
5fa8263 to
393cd83
Compare
This change prevents common mistakes for atproto handle input. Many apps includes
@-prefix so users can easily copy their handle with a extra character@and sometimes spaces in their UI.Currenctly, I have to strictly input my handle
shuuji3.xyz, now I can input@shuuji3.xyz.For reference, this is Bluesky app for
@npmx.devprofile: