feat: migrate icons to SF Symbols, refactor explore tab, add collections/programs data layer

- Replace all Ionicons with native SF Symbols via expo-symbols SymbolView
- Create reusable Icon wrapper component (src/shared/components/Icon.tsx)
- Remove @expo/vector-icons and lucide-react dependencies
- Refactor explore tab with filters, search, and category browsing
- Add collections and programs data with Supabase integration
- Add explore filter store and filter sheet
- Update i18n strings (en, de, es, fr) for new explore features
- Update test mocks and remove stale snapshots
- Add user fitness level to user store and types
This commit is contained in:
Millian Lamiaux
2026-03-25 23:28:51 +01:00
parent f11eb6b9ae
commit b833198e9d
42 changed files with 2006 additions and 1594 deletions

View File

@@ -12,9 +12,59 @@
import { createClient } from '@supabase/supabase-js'
import { WORKOUTS } from '../src/shared/data/workouts'
import { TRAINERS } from '../src/shared/data/trainers'
import { COLLECTIONS, PROGRAMS } from '../src/shared/data/collections'
import { PROGRAMS } from '../src/shared/data/programs'
import { ACHIEVEMENTS } from '../src/shared/data/achievements'
/**
* Seed data for collections — used only for initial database seeding.
* The app fetches collections from Supabase at runtime.
*/
const SEED_COLLECTIONS = [
{
id: 'morning-energizer',
title: 'Morning Energizer',
description: 'Start your day right',
icon: '🌅',
workoutIds: ['4', '6', '43', '47', '10'],
},
{
id: 'no-equipment',
title: 'No Equipment',
description: 'Workout anywhere',
icon: '💪',
workoutIds: ['1', '4', '6', '11', '13', '16', '17', '19', '23', '26', '31', '38', '42', '43', '45'],
},
{
id: '7-day-burn',
title: '7-Day Burn Challenge',
description: 'Transform in one week',
icon: '🔥',
workoutIds: ['1', '11', '31', '42', '6', '17', '23'],
gradient: ['#FF6B35', '#FF3B30'],
},
{
id: 'quick-intense',
title: 'Quick & Intense',
description: 'Max effort in 4 minutes',
icon: '⚡',
workoutIds: ['1', '11', '23', '35', '38', '42', '6', '17'],
},
{
id: 'core-focus',
title: 'Core Focus',
description: 'Build a solid foundation',
icon: '🎯',
workoutIds: ['11', '12', '13', '14', '16', '17'],
},
{
id: 'leg-day',
title: 'Leg Day',
description: 'Never skip leg day',
icon: '🦵',
workoutIds: ['31', '32', '33', '34', '35', '36', '37'],
},
]
const supabaseUrl = process.env.EXPO_PUBLIC_SUPABASE_URL
const supabaseKey = process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY
@@ -73,7 +123,7 @@ async function seedWorkouts() {
async function seedCollections() {
console.log('Seeding collections...')
const collections = COLLECTIONS.map(c => ({
const collections = SEED_COLLECTIONS.map(c => ({
id: c.id,
title: c.title,
description: c.description,
@@ -85,7 +135,7 @@ async function seedCollections() {
if (error) throw error
// Seed collection-workout relationships
const collectionWorkouts = COLLECTIONS.flatMap(c =>
const collectionWorkouts = SEED_COLLECTIONS.flatMap(c =>
c.workoutIds.map((workoutId, index) => ({
collection_id: c.id,
workout_id: workoutId,
@@ -102,7 +152,7 @@ async function seedCollections() {
async function seedPrograms() {
console.log('Seeding programs...')
const programs = PROGRAMS.map(p => ({
const programs = Object.values(PROGRAMS).map(p => ({
id: p.id,
title: p.title,
description: p.description,
@@ -117,7 +167,7 @@ async function seedPrograms() {
// Seed program-workout relationships
let programWorkouts: { program_id: string; workout_id: string; week_number: number; day_number: number }[] = []
PROGRAMS.forEach(program => {
Object.values(PROGRAMS).forEach(program => {
let week = 1
let day = 1
program.workoutIds.forEach((workoutId, index) => {