Skip to content

feat(mobile): enhance authentication flow and fix note viewing#18

Merged
typelets merged 1 commit intomainfrom
feature/mobile-batch-decryption
Oct 9, 2025
Merged

feat(mobile): enhance authentication flow and fix note viewing#18
typelets merged 1 commit intomainfrom
feature/mobile-batch-decryption

Conversation

@typelets
Copy link
Copy Markdown
Owner

@typelets typelets commented Oct 9, 2025

This PR enhances the mobile app authentication flow and fixes critical issues with note viewing, specifically code block rendering.

🔐 Authentication Improvements

Email Verification

  • ✨ Implemented modern PIN-style code entry (6 individual boxes)
  • 🎨 Visual feedback with focused box highlighting
  • ✏️ Editable PIN boxes - tap to fix mistakes
  • 📧 Simplified subtitle: "Enter the verification code" (removed email display)

Sign-Up Flow Enhancements

  • 📝 Added First Name and Last Name fields
  • 📋 Field order: First Name → Last Name → Email → Password
  • ✅ Terms of Service & Privacy Policy acceptance checkbox
  • 🔗 Clickable links to https://typelets.com/terms and https://typelets.com/privacy
  • 🎯 Support for Clerk's legal_accepted field requirement

User Experience

  • 📱 Replaced blocking Alert dialogs with Android toast notifications
  • ⚡ Faster, less intrusive error messages
  • 🐛 Comprehensive error handling with fallback strategies
  • 📊 Enhanced logging for debugging sign-up/verification issues

📝 Note Viewing Fixes

Code Block Rendering

  • ✅ Fixed code blocks displaying on single line (critical bug)
  • 🎨 Added syntax highlighting with highlight.js
  • ↔️ Enabled horizontal scrolling for long code lines
  • 🔄 Preserved newlines and formatting in code blocks

Technical Implementation

  • 🔄 Switched from react-native-render-html to single WebView approach
  • 📦 Removed problematic packages (react-native-code-highlighter)
  • 🎯 Direct HTML rendering with generateNoteHtml()
  • 📡 WebView scroll position communication to React Native

UI Enhancements

  • 📅 Added note metadata (creation/update dates) in header
  • 🎨 Removed transparent fade effect on note title
  • 📏 Better spacing and dividers

🐛 Bug Fixes

  • 🔧 Fixed TypeScript error in NotesListScreen folder path builder
  • 🧹 Fixed lint warning in NoteContent onMessage handler
  • ♻️ Reverted experimental scrolling changes that broke folder section interaction

📚 Code Quality

  • 📖 Added JSDoc comments to all authentication functions
  • 📝 Added component documentation for NoteContent
  • 🏗️ Improved error messages and user feedback
  • ✅ All type checks passing (except pre-existing issues in other files)
  • ✅ Lint warnings resolved for modified files

🧪 Testing

  • ✅ Sign-up flow with email verification
  • ✅ PIN code entry and editing
  • ✅ Terms acceptance validation
  • ✅ Code block rendering with syntax highlighting
  • ✅ Note scrolling and metadata display
  • ✅ Toast notifications on Android

📸 Key Changes

Authentication:

  • PIN-style verification code entry (6 boxes)
  • First/Last name fields in sign-up
  • Terms & Privacy Policy checkbox with links
  • Toast notifications instead of alerts

Note Viewing:

  • Code blocks now render correctly with proper line breaks
  • Syntax highlighting for code
  • Horizontal scrolling for long lines
  • Clean title header with metadata

🔄 Migration Notes

None - all changes are backward compatible.

📦 Dependencies

No new dependencies added. Removed problematic packages:

  • ❌ react-native-code-highlighter
  • ❌ react-syntax-highlighter

Uses existing:

  • ✅ WebView (react-native-webview)
  • ✅ Clerk Expo SDK
  • ✅ highlight.js (CDN)

@typelets typelets self-assigned this Oct 9, 2025
@typelets typelets merged commit 24f7e4f into main Oct 9, 2025
3 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 9, 2025

🎉 This PR is included in version 1.22.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants