polish(mobile): audit design DSFR multi-agents — tokens, a11y, états, finitions
- tokens centralisés (Tint, IconSize, LineHeight, LetterSpacing), zéro hex en dur - accessibilité (rôles, labels, live regions, afficher/masquer mot de passe) - états vides/erreur complétés (ex. saisie introuvable), cibles tactiles >=44px - suppression du composant mort RepubliqueHeader Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { View, Text, StyleSheet, KeyboardAvoidingView, Platform, ScrollView } fr
|
||||
import { useRouter } from 'expo-router';
|
||||
import { Ionicons } from '@expo/vector-icons';
|
||||
import { Colors } from '@/lib/colors';
|
||||
import { FontSize, FontWeight, Radius, Spacing } from '@/lib/theme';
|
||||
import { FontSize, FontWeight, ICON_CIRCLE, IconSize, LineHeight, Radius, Spacing, Tint } from '@/lib/theme';
|
||||
import { AppBar, Button, Card, TextField } from '@/components/ui';
|
||||
|
||||
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
@@ -33,7 +33,7 @@ export default function ForgotPasswordScreen() {
|
||||
<AppBar title="Demande enregistrée" />
|
||||
<View style={styles.successWrap}>
|
||||
<View style={styles.iconCircle}>
|
||||
<Ionicons name="mail-open" size={32} color={Colors.primary} />
|
||||
<Ionicons name="mail-open" size={IconSize.xl} color={Colors.primary} />
|
||||
</View>
|
||||
<Text style={styles.successTitle}>Vérifiez votre boîte mail</Text>
|
||||
<Text style={styles.successText}>
|
||||
@@ -102,20 +102,20 @@ export default function ForgotPasswordScreen() {
|
||||
const styles = StyleSheet.create({
|
||||
container: { flex: 1, backgroundColor: Colors.gray[50] },
|
||||
scrollContent: { flexGrow: 1, justifyContent: 'center', padding: Spacing.xl },
|
||||
intro: { fontSize: FontSize.sm, color: Colors.gray[600], lineHeight: 20, marginBottom: Spacing.xl, textAlign: 'center' },
|
||||
intro: { fontSize: FontSize.sm, color: Colors.gray[600], lineHeight: LineHeight.normal, marginBottom: Spacing.xl, textAlign: 'center' },
|
||||
backRow: { alignItems: 'center', marginTop: Spacing.sm },
|
||||
successWrap: { flex: 1, justifyContent: 'center', alignItems: 'center', padding: Spacing.xl },
|
||||
iconCircle: {
|
||||
width: 72,
|
||||
height: 72,
|
||||
width: ICON_CIRCLE,
|
||||
height: ICON_CIRCLE,
|
||||
borderRadius: Radius.pill,
|
||||
backgroundColor: '#E3E3FD',
|
||||
backgroundColor: Tint.primary,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginBottom: Spacing.lg,
|
||||
},
|
||||
successTitle: { fontSize: FontSize.xl, fontWeight: FontWeight.heavy, color: Colors.black, marginBottom: Spacing.md, textAlign: 'center' },
|
||||
successText: { fontSize: FontSize.sm, color: Colors.gray[600], textAlign: 'center', lineHeight: 20, marginBottom: Spacing.md },
|
||||
successText: { fontSize: FontSize.sm, color: Colors.gray[600], textAlign: 'center', lineHeight: LineHeight.normal, marginBottom: Spacing.md },
|
||||
bold: { fontWeight: FontWeight.bold, color: Colors.black },
|
||||
successAction: { alignSelf: 'stretch', marginTop: Spacing.lg },
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Ionicons } from '@expo/vector-icons';
|
||||
import { useAuthStore } from '@/lib/auth-store';
|
||||
import { getApiError } from '@/lib/api';
|
||||
import { Colors } from '@/lib/colors';
|
||||
import { FontSize, FontWeight, Radius, Spacing } from '@/lib/theme';
|
||||
import { FontSize, FontWeight, IconSize, Radius, Spacing } from '@/lib/theme';
|
||||
import { AppBar, Button, Card, TextField } from '@/components/ui';
|
||||
|
||||
export default function LoginScreen() {
|
||||
@@ -46,8 +46,8 @@ export default function LoginScreen() {
|
||||
|
||||
<Card padding={Spacing.xl} elevated>
|
||||
{error ? (
|
||||
<View style={styles.errorBanner}>
|
||||
<Ionicons name="alert-circle" size={18} color={Colors.error} />
|
||||
<View style={styles.errorBanner} accessibilityLiveRegion="polite">
|
||||
<Ionicons name="alert-circle" size={IconSize.md} color={Colors.error} />
|
||||
<Text style={styles.errorBannerText}>{error}</Text>
|
||||
</View>
|
||||
) : null}
|
||||
@@ -118,7 +118,7 @@ const styles = StyleSheet.create({
|
||||
gap: Spacing.sm,
|
||||
backgroundColor: Colors.errorBg,
|
||||
borderRadius: Radius.sm,
|
||||
borderLeftWidth: 3,
|
||||
borderLeftWidth: Spacing.xs - 1,
|
||||
borderLeftColor: Colors.error,
|
||||
padding: Spacing.md,
|
||||
marginBottom: Spacing.lg,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Ionicons } from '@expo/vector-icons';
|
||||
import { useAuthStore } from '@/lib/auth-store';
|
||||
import { getApiError } from '@/lib/api';
|
||||
import { Colors } from '@/lib/colors';
|
||||
import { FontSize, FontWeight, MIN_TOUCH, Radius, Spacing } from '@/lib/theme';
|
||||
import { FontSize, FontWeight, IconSize, LineHeight, MIN_TOUCH, Radius, Spacing } from '@/lib/theme';
|
||||
import { AppBar, Button, Card, TextField } from '@/components/ui';
|
||||
|
||||
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
@@ -132,7 +132,7 @@ export default function RegisterScreen() {
|
||||
>
|
||||
<Ionicons
|
||||
name={consentement ? 'checkbox' : 'square-outline'}
|
||||
size={24}
|
||||
size={IconSize.lg}
|
||||
color={consentement ? Colors.primary : Colors.gray[500]}
|
||||
style={styles.consentIcon}
|
||||
/>
|
||||
@@ -143,7 +143,7 @@ export default function RegisterScreen() {
|
||||
</Pressable>
|
||||
{consentError ? (
|
||||
<View style={styles.consentErrorRow}>
|
||||
<Ionicons name="alert-circle" size={14} color={Colors.error} />
|
||||
<Ionicons name="alert-circle" size={IconSize.sm} color={Colors.error} />
|
||||
<Text style={styles.consentErrorText}>{consentError}</Text>
|
||||
</View>
|
||||
) : null}
|
||||
@@ -185,8 +185,8 @@ const styles = StyleSheet.create({
|
||||
paddingVertical: Spacing.sm,
|
||||
minHeight: MIN_TOUCH,
|
||||
},
|
||||
consentIcon: { marginTop: 1 },
|
||||
consentText: { flex: 1, fontSize: FontSize.xs, color: Colors.black, lineHeight: 19 },
|
||||
consentIcon: { marginTop: Spacing.xs / 4 },
|
||||
consentText: { flex: 1, fontSize: FontSize.xs, color: Colors.black, lineHeight: LineHeight.snug },
|
||||
consentLink: { color: Colors.primary, fontWeight: FontWeight.semibold, textDecorationLine: 'underline' },
|
||||
consentErrorRow: { flexDirection: 'row', alignItems: 'center', gap: Spacing.xs, marginTop: Spacing.xs },
|
||||
consentErrorText: { fontSize: FontSize.xs, color: Colors.error },
|
||||
|
||||
Reference in New Issue
Block a user