diff --git a/frontend/src/components/ui.tsx b/frontend/src/components/ui.tsx index ee691d4..76c0531 100644 --- a/frontend/src/components/ui.tsx +++ b/frontend/src/components/ui.tsx @@ -182,6 +182,41 @@ export function StatCard({ ); } +/** + * Petit repère « ? » : au survol (ou au focus clavier/tactile), affiche + * `text` dans une bulle. Sert à sortir les indications d'usage du flux de la + * page plutôt que de les y afficher en permanence. + */ +export function HelpTip({ + text, + side = 'top', + className, +}: { + text: string; + side?: 'top' | 'bottom'; + className?: string; +}) { + return ( + + + + {text} + + + ); +} + export function FieldLabel({ children }: { children: ReactNode }) { return ( diff --git a/frontend/src/pages/GrillePage.tsx b/frontend/src/pages/GrillePage.tsx index b8afdf2..10a935c 100644 --- a/frontend/src/pages/GrillePage.tsx +++ b/frontend/src/pages/GrillePage.tsx @@ -2,7 +2,7 @@ import { useMemo, useState } from 'react'; import { useMatrix, useRunSolver } from '@/api/hooks'; import type { MatrixPosition, MatrixShift, PositionCategory } from '@/api/schema'; -import { Chip } from '@/components/ui'; +import { Chip, HelpTip } from '@/components/ui'; import { EmptyNote, ErrorNote, Loading } from '@/components/state'; import { AssignmentPanel } from '@/pages/grille/AssignmentPanel'; import { categoryLabel, columnWidthPx, latticeFromMatrix, type LatticeColumn } from '@/lib/planning'; @@ -132,8 +132,9 @@ export function GrillePage() {
-
+
{t('grille.positionsCount', { count: matrix.data.positions.length })} +
{shownDays.map((day) => (
))}
-
- {t('grille.footnote')} -