fix: Replace History with AI Chat in mobile bottom navigation
Some checks failed
CI/CD Pipeline / Build Application (push) Has been cancelled
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled

This commit is contained in:
2025-10-03 15:10:37 +00:00
parent 8f150cbf59
commit f0e7c5a21b
2 changed files with 45 additions and 34 deletions

View File

@@ -287,34 +287,43 @@ Features:
--- ---
## Phase 6: Onboarding Flow Integration ❌ TODO ## Phase 6: Onboarding Flow Integration ✅ COMPLETED
### 6.1 Update Onboarding Page ### 6.1 Update Onboarding Page
**File**: `app/(auth)/onboarding/page.tsx` (MODIFY) **File**: `app/(auth)/onboarding/page.tsx` (COMPLETED)
Add new steps: ✅ Implemented 5-step flow:
1. Language selection (Step 2) 1. Welcome screen
2. Measurement unit selection (Step 3) 2. Language selection (Step 1)
3. Measurement unit selection (Step 2)
4. Add child (Step 3)
5. Complete (Step 4)
### 6.2 Onboarding Language Step Component ### 6.2 Onboarding Language Step
**File**: `components/onboarding/LanguageStep.tsx` (NEW) **Implementation**: Integrated directly in onboarding page
- Large, visual language selector - ✅ Visual language selector with all 7 languages
- Show language names in native script - Shows language names in native script (English, Español, Français, Português, 中文, Deutsch, Italiano)
- Save to Redux state - Saves preference to backend via `usersApi.updatePreferences`
- Update i18n immediately - Updates i18n immediately via `useLocale` hook
- ✅ Beautiful card-based selection UI with radio buttons
### 6.3 Onboarding Measurement Step Component ### 6.3 Onboarding Measurement Step
**File**: `components/onboarding/MeasurementStep.tsx` (NEW) **Implementation**: Integrated directly in onboarding page
- Visual metric/imperial selector - Visual metric/imperial selector
- Show examples (ml vs oz, cm vs in) - Shows examples (kg, cm, °C, ml vs lb, in, °F, oz)
- Save to Redux state - Saves preference to backend and localStorage
- ✅ Updates measurement system via `useLocale` hook
- ✅ Card-based selection UI for better UX
### 6.4 Update Onboarding API Call ### 6.4 API Integration ✅
**File**: `app/(auth)/onboarding/page.tsx` (MODIFY) **File**: `app/(auth)/onboarding/page.tsx` (COMPLETED)
Include language and measurementUnit in profile update call. - ✅ Language saved to backend via `usersApi.updatePreferences({ language })`
- ✅ Measurement unit saved via `usersApi.updatePreferences({ measurementUnit })`
- ✅ User profile refreshed after each preference update
- ✅ Error handling with graceful fallback
--- ---
@@ -747,12 +756,13 @@ Document language and measurement preferences in user guide
### 🟢 Low Priority (Nice to Have) ### 🟢 Low Priority (Nice to Have)
3. **Onboarding Flow** (Phase 6) 3. **Onboarding Flow** (Phase 6) - COMPLETED
- ✅ Onboarding translations complete (all 7 languages) - ✅ Onboarding translations complete (all 7 languages)
- ⏳ Add language selection step UI - ✅ Language selection step UI implemented
- ⏳ Add measurement unit selection step UI - ✅ Measurement unit selection step UI implemented
- ⏳ Save preferences during onboarding - ✅ Preferences saved to backend during onboarding
- **Estimated Effort**: 2-3 hours - ✅ 5-step onboarding flow: Welcome → Language → Measurements → Add Child → Complete
- **Status**: FULLY IMPLEMENTED
### 🟢 Low Priority (Future Enhancements) ### 🟢 Low Priority (Future Enhancements)
@@ -778,28 +788,29 @@ Document language and measurement preferences in user guide
### 📊 Progress Tracking - UPDATED October 3, 2025 ### 📊 Progress Tracking - UPDATED October 3, 2025
**Completed**: 13 phases (1-5, 7-9, 12, 13.2, and partial 6, 10-11) **Completed**: 14 phases (1-9, 12, 13.2, and partial 10-11)
**In Progress**: 0 phases **In Progress**: 0 phases
**Remaining**: 3 major phases (6, 10, 11, 14) **Remaining**: 2 major phases (10, 11, 14)
**Overall Completion**: ~92% (core functionality + all translations + unit conversions) **Overall Completion**: ~95% (core functionality + all translations + unit conversions + onboarding)
**🎉 Major Milestones Achieved**: **🎉 Major Milestones Achieved**:
- ✅ All 77 translation files completed across 7 languages - ✅ All 77 translation files completed across 7 languages
- ✅ All main pages fully localized and integrated - ✅ All main pages fully localized and integrated
- ✅ All tracking pages with unit conversions COMPLETED - ✅ All tracking pages with unit conversions COMPLETED
- ✅ UnitInput component fully implemented and integrated - ✅ UnitInput component fully implemented and integrated
-**Onboarding flow with language & measurement selection COMPLETED**
- ✅ Frontend card symmetry completed for professional appearance - ✅ Frontend card symmetry completed for professional appearance
- ✅ i18n configuration fixed and all languages loading correctly - ✅ i18n configuration fixed and all languages loading correctly
**Estimated Time to Full Completion**: **Estimated Time to Full Completion**:
- Medium Priority (Phase 6 - Onboarding, Phase 10-11 - Date/Number formatting): 4-6 hours - Medium Priority (Phase 10-11 - Date/Number formatting refinement): 2-4 hours
- Low Priority (Phase 14 - Testing, Phase 15 - Documentation): 3-5 hours - Low Priority (Phase 14 - Testing, Phase 15 - Documentation): 3-5 hours
- **Total Remaining**: 7-11 hours (1 day) - **Total Remaining**: 5-9 hours (0.5-1 day)
--- ---
**Total Project Effort**: 3.5 days (completed) + 1 day (remaining) = 4.5 days **Total Project Effort**: 4 days (completed) + 0.5-1 day (remaining) = 4.5-5 days
**Complexity**: Medium **Complexity**: Medium
**Priority**: HIGH (Pre-Launch) **Priority**: HIGH (Pre-Launch)
**Current Status**: Core functionality 92% complete, translations 100% complete, unit conversions 100% complete, **PRODUCTION-READY** **Current Status**: Core functionality 95% complete, translations 100% complete, unit conversions 100% complete, onboarding 100% complete, **PRODUCTION-READY**

View File

@@ -7,7 +7,7 @@ import {
Home, Home,
Timeline, Timeline,
Insights, Insights,
History, Chat,
Mic, Mic,
} from '@mui/icons-material'; } from '@mui/icons-material';
import { useTranslation } from '@/hooks/useTranslation'; import { useTranslation } from '@/hooks/useTranslation';
@@ -23,7 +23,7 @@ export const TabBar = () => {
{ label: t('navigation.track'), icon: <Timeline />, value: '/track' }, { label: t('navigation.track'), icon: <Timeline />, value: '/track' },
{ label: '', icon: null, value: 'voice' }, // Placeholder for center button { label: '', icon: null, value: 'voice' }, // Placeholder for center button
{ label: t('navigation.insights'), icon: <Insights />, value: '/insights' }, { label: t('navigation.insights'), icon: <Insights />, value: '/insights' },
{ label: t('navigation.history'), icon: <History />, value: '/history' }, { label: t('navigation.aiChat'), icon: <Chat />, value: '/ai-assistant' },
]; ];
return ( return (