Improve UX and error messaging. Add event badges.#99
Conversation
|
@copilot where review |
There was a problem hiding this comment.
Pull request overview
This pull request enhances the user experience by improving error messaging throughout the application and adding visual event badges to help users assess event credibility. The changes introduce better error handling with localized Firebase authentication error messages, user reputation indicators, and improved UI feedback for various user actions.
Key changes:
- Added comprehensive Firebase authentication error dictionary with Polish translations
- Implemented event reputation badges showing author credibility and event verification status
- Refactored authentication flow with better error handling and
AuthErrorclass - Enhanced location-based event creation with proper user location validation
Reviewed changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 25 comments.
Show a summary per file
| File | Description |
|---|---|
Client/watchout/utils/types.ts |
Updated type definitions for events (added author info, reputation data), action availability, and changed date fields from string to Date |
Client/watchout/utils/dictionaries.ts |
New file with Polish error message dictionaries for Firebase auth and post inability reasons |
Client/watchout/utils/constants.ts |
Added reputation threshold constants for low (0.25) and high (0.75) reputation levels |
Client/watchout/utils/apiDefinition.ts |
Updated API endpoints to use query parameters for action availability check and added users.create endpoint |
Client/watchout/utils/AuthError.ts |
New custom error class for authentication-related errors |
Client/watchout/package.json |
Added firebase ^12.6.0 dependency and updated react-hook-form to ^7.68.0 |
Client/watchout/features/settings/SettingsNavigator.tsx |
Refactored settings navigation with AccountSettings component, removed Privacy settings |
Client/watchout/features/settings/Settings.tsx |
Updated to use settingsRoutes directly instead of props |
Client/watchout/features/settings/AccountSettings.tsx |
New placeholder component for account settings screen |
Client/watchout/features/outages/OutageLocations/LocationForm/ |
Fixed notificationsEnable property nesting in location settings object |
Client/watchout/features/outages/Alerts.tsx |
Minor formatting improvements |
Client/watchout/features/map/useLocation.ts |
Added loading state to track location fetch status |
Client/watchout/features/events/details/ReportStatusIcons.tsx |
New component displaying event badges based on author reputation and event rating |
Client/watchout/features/events/details/EventDetails.tsx |
Integrated ReportStatusIcons component and updated date formatting |
Client/watchout/features/events/details/EventBottomSheet.tsx |
Added check to prevent authors from rating their own events |
Client/watchout/features/events/create/useEventCreateForm.ts |
Migrated to react-hook-form Controller pattern for better form management |
Client/watchout/features/events/create/useActionAvailability.ts |
Enhanced hook to accept location parameters and enable/disable query execution |
Client/watchout/features/events/create/CreateEventBottomSheet.tsx |
Improved UX with location validation, better error messages using dictionaries, migrated to react-hook-form |
Client/watchout/features/events/comments/CommentList.tsx |
Updated to use formatDate helper for consistent date formatting |
Client/watchout/features/auth/authContext.tsx |
Added isEmailVerified field to AuthUser type |
Client/watchout/features/auth/auth.ts |
Refactored with better error handling, AuthError usage, and API endpoint constants |
Client/watchout/features/auth/SignUpScreen.tsx |
Improved error handling with dictionary-based Firebase error messages |
Client/watchout/features/auth/LoginScreen.tsx |
Enhanced error messages using firebaseAuthErrorMessages dictionary |
Client/watchout/components/Layout/AppNavigator.tsx |
Added email verification check and loading screen for better auth flow |
Client/watchout/components/Common/LoadingScreen.tsx |
New reusable loading screen component |
Client/watchout/components/Base/CustomChip.tsx |
New chip component for displaying event status badges |
Client/watchout/App.tsx |
Refactored to use LoadingScreen component |
Files not reviewed (1)
- Client/watchout/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
Client/watchout/utils/types.ts:1
- Unused import ActionAvailability.
import { ActionAvailability } from 'utils/types';
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@protectedvoid21 I've opened a new pull request, #100, to work on those changes. Once the pull request is ready, I'll request review from you. |
No description provided.