Skip to content

Comments

feat(unicode): enhance UX for international users with non-ASCII names#1052

Open
imrulo wants to merge 16 commits intoensdomains:mainfrom
imrulo:chore/unicode-info-banner-reopened
Open

feat(unicode): enhance UX for international users with non-ASCII names#1052
imrulo wants to merge 16 commits intoensdomains:mainfrom
imrulo:chore/unicode-info-banner-reopened

Conversation

@imrulo
Copy link
Contributor

@imrulo imrulo commented Aug 30, 2025

🚀 Enhanced Unicode Support for International Users

This PR improves the user experience for ENS names with non-ASCII characters by implementing intelligent alert differentiation:

User Experience Improvements:

  • Info Banner: Shows for valid non-ASCII names with Latin-only scripts (e.g., José.eth, François.eth)
  • Warning Banner: Only displays for mixed scripts that could be potential confusables
  • Better Messaging: Inclusive language that doesn't alarm users with legitimate diacritics
  • Updated Links: "Learn more" now points to Unicode TR36 for proper security guidance

Technical Implementation:

  • Enhanced API: Exposes hasMixedScripts, isLatinOnly, and hasEmoji from useValidate hook
  • Smart Detection: Based on ensjs parseInput labelDataArray analysis
  • Conditional UI: ProfileTab helper banners are intelligently gated based on script analysis
  • Localization: Updated English and Spanish copy for clarity and inclusivity

Benefits:

  • Better UX for international users (Spanish, French, German, etc.)
  • Maintains security by still warning about potentially confusing names
  • More accessible messaging for diverse language communities
  • Cleaner, more professional user interface

Status:
✅ All tests passing
✅ Linting clean
✅ Builds successfully
✅ No breaking changes

Happy to adjust the wording, logic, or move the gating to a different level if preferred by the team.

imrulo and others added 9 commits February 12, 2025 18:26
Corrección de traducción: "en web3" en lugar de "de web 3"
…h Latin-only script (typical diacritics)\n- warning: non-ASCII with mixed scripts (potential confusables)\n\nExpose hasEmoji/hasMixedScripts/isLatinOnly from useValidate; gate banner accordingly.
Bumps the npm_and_yarn group with 11 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [form-data](https://github.com/form-data/form-data) | `4.0.2` | `4.0.4` |
| [next](https://github.com/vercel/next.js) | `13.5.8` | `14.2.30` |
| [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) | `4.9.6` | `5.0.2` |
| [ws](https://github.com/websockets/ws) | `8.18.1` | `8.18.2` |
| [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) | `7.26.9` | `7.28.2` |
| [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) | `7.26.9` | `7.28.2` |
| [base-x](https://github.com/cryptocoinjs/base-x) | `3.0.10` | `3.0.11` |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | `1.1.11` | `1.1.12` |
| [pbkdf2](https://github.com/crypto-browserify/pbkdf2) | `3.1.2` | `3.1.3` |
| [undici](https://github.com/nodejs/undici) | `5.28.5` | `5.29.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `6.2.0` | `6.3.5` |



Updates `form-data` from 4.0.2 to 4.0.4
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](form-data/form-data@v4.0.2...v4.0.4)

Updates `next` from 13.5.8 to 14.2.30
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v13.5.8...v14.2.30)

Updates `@openzeppelin/contracts` from 4.9.6 to 5.0.2
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.9.6...v5.0.2)

Updates `ws` from 8.18.1 to 8.18.2
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@8.18.1...8.18.2)

Updates `@babel/helpers` from 7.26.9 to 7.28.2
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.2/packages/babel-helpers)

Updates `@babel/runtime` from 7.26.9 to 7.28.2
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.2/packages/babel-runtime)

Updates `base-x` from 3.0.10 to 3.0.11
- [Commits](cryptocoinjs/base-x@v3.0.10...v3.0.11)

Updates `brace-expansion` from 1.1.11 to 1.1.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12)

Updates `pbkdf2` from 3.1.2 to 3.1.3
- [Changelog](https://github.com/browserify/pbkdf2/blob/master/CHANGELOG.md)
- [Commits](browserify/pbkdf2@v3.1.2...v3.1.3)

Updates `undici` from 5.28.5 to 5.29.0
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](nodejs/undici@v5.28.5...v5.29.0)

Updates `vite` from 6.2.0 to 6.3.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.5/packages/vite)

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: next
  dependency-version: 14.2.30
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: "@openzeppelin/contracts"
  dependency-version: 5.0.2
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: ws
  dependency-version: 8.18.2
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: "@babel/helpers"
  dependency-version: 7.28.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@babel/runtime"
  dependency-version: 7.28.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: base-x
  dependency-version: 3.0.11
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: pbkdf2
  dependency-version: 3.1.3
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: undici
  dependency-version: 5.29.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 6.3.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
…n-89d1fcb62e

Bump the npm_and_yarn group across 1 directory with 11 updates
- Differentiate info vs warning alerts for Unicode characters
- Add hasEmoji/hasMixedScripts/isLatinOnly properties to useValidate
- Show info alerts for safe diacritics (e.g., José.eth)
- Show warning alerts for mixed scripts (potential confusables)
- Update UI messages to be more inclusive for international users
- Link to Unicode TR36 instead of homoglyphs
- Improve Spanish and English localizations
- Fix mixed scripts detection logic and update all tests

This PR improves the user experience for ENS users with non-ASCII names
while maintaining security standards. Perfect for users of languages with
diacritics like Spanish, French, German, etc.
@imrulo imrulo requested review from laurgk and sugh01 as code owners August 30, 2025 18:07
@storywithoutend
Copy link
Collaborator

Hi @imrulo, I'll be reviewing this PR. Thanks for the submission!

@storywithoutend
Copy link
Collaborator

Hi @imrulo, you bring up a good point about respect for language. I need to bring this issue up with the team first.

@storywithoutend
Copy link
Collaborator

Hi @imrulo, I've submitted a solution idea to the team and it's under discussion. Currently I'm suggesting that we do not do a full homoglyph-like warning and something more subtle. Will keep you updated on the progress.

@imrulo
Copy link
Contributor Author

imrulo commented Sep 8, 2025

Hi @imrulo, I've submitted a solution idea to the team and it's under discussion. Currently I'm suggesting that we do not do a full homoglyph-like warning and something more subtle. Will keep you updated on the progress.

Thanks, I really appreciate you bringing it to the team. Looking forward to hearing what they think.

@imrulo
Copy link
Contributor Author

imrulo commented Sep 8, 2025

Hi @imrulo, I've submitted a solution idea to the team and it's under discussion. Currently I'm suggesting that we do not do a full homoglyph-like warning and something more subtle. Will keep you updated on the progress.

That sounds like a great approach. Subtle warnings make sense-happy to wait for the update from the discussion.

@storywithoutend
Copy link
Collaborator

@imrulo Sorry for no update. I've been helping out at hackathons and working on a high priority update. I'll be leaving for India next week for another hackathon but after I get back I will jump back into this PR. It's constantly in the back of my mind.

@imrulo
Copy link
Contributor Author

imrulo commented Sep 18, 2025

@imrulo Sorry for no update. I've been helping out at hackathons and working on a high priority update. I'll be leaving for India next week for another hackathon but after I get back I will jump back into this PR. It's constantly in the back of my mind.

No worries at all! That sounds amazing-enjoy the hackathon in India! Thanks for keeping this in mind, and we can pick it up when you’re back. Appreciate it!

@sonarqubecloud
Copy link

Copy link
Contributor Author

@imrulo imrulo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We keep the “info” banner for LatinOnly (ñ, á, é, í, ó, ú, ü); “warning” only for an actual mix of scripts.
I improved the banner text in es and en to make it clear that accents/ñ are normal in Spanish.
I added tests that verify “españa”, “camión”, “pingüino” as LatinOnly without a warning. ✅

Copy link
Contributor Author

@imrulo imrulo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adjusted banner handling to fix false positives:
• “info” banner kept for LatinOnly (ñ, á, é, í, ó, ú, ü)
• “warning” shown only for actual script mixing
• Improved banner text in es and en to clarify accents/ñ are normal in Spanish
• Added tests for words like “españa”, “camión”, “pingüino” to confirm correct behavior

Copy link
Contributor Author

@imrulo imrulo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update

@storywithoutend storywithoutend self-requested a review as a code owner November 26, 2025 13:19
@imrulo imrulo closed this Dec 17, 2025
@imrulo imrulo reopened this Dec 17, 2025
@sonarqubecloud
Copy link

@imrulo
Copy link
Contributor Author

imrulo commented Dec 29, 2025

Hi @storywithoutend! 👋 Just a quick follow-up to see if there are any updates on the “subtle warning” design. I’m still available to implement the chosen UI direction.

Happy New Year and happy coding! 🎉✨

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.

2 participants