diff --git a/aidlc-docs/features/contact-forms-module/construction/cms-u8-offerings-mobile-fab/code/summary.md b/aidlc-docs/features/contact-forms-module/construction/cms-u8-offerings-mobile-fab/code/summary.md new file mode 100644 index 0000000..57a6737 --- /dev/null +++ b/aidlc-docs/features/contact-forms-module/construction/cms-u8-offerings-mobile-fab/code/summary.md @@ -0,0 +1,9 @@ +# CMS-U8 — Offerings page on small screens (summary) + +Only `frontend/src/features/offerings/pages/OfferingsListPage.tsx` (+ new test file). No new translations needed: the existing `offerings.addButton` / `offerings.categories.manageButton` are used. + +- Below `sm` (640px): "Aanbieding toevoegen" is a FAB (fixed, bottom-right, safe-area aware, plus icon, `aria-label` + `title`, 56px), "Categorieën beheren" is icon-only (44px, `aria-label` + `title`), the page has `pb-24` so the last row is not covered. +- From `sm` up: unchanged text buttons (`hidden sm:inline-flex`); FAB and icon button are `sm:hidden`. The existing test ids stay on the text buttons. +- Tests (`OfferingsResponsive.test.tsx`, 6): classes per breakpoint, accessible names nl/en, FAB link, icon button opens the dialog, bottom space. jsdom has no media queries, so breakpoints are asserted on Tailwind classes. +- Observations (not changed): UsersPage header is a plain `flex justify-between` with an action button (same pattern, no FAB, not changed); the Berichten table scrolls horizontally on narrow screens and its chips wrap. Not verified on a real narrow viewport. +- Verification: lint and `tsc -b` clean, vitest 59 files / 464 tests. diff --git a/frontend/src/features/offerings/pages/OfferingsListPage.tsx b/frontend/src/features/offerings/pages/OfferingsListPage.tsx index 276984d..3973ff8 100644 --- a/frontend/src/features/offerings/pages/OfferingsListPage.tsx +++ b/frontend/src/features/offerings/pages/OfferingsListPage.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from '@tanstack/react-router'; -import { Package } from 'lucide-react'; +import { Package, Plus, Tags } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { OfferingsList } from '../components/OfferingsList'; import { DeleteOfferingDialog } from '../components/DeleteOfferingDialog'; @@ -20,21 +20,35 @@ export function OfferingsListPage() { }); return ( -
+

{t('offerings.title')}

+ {/* From sm up: text buttons. Below sm: icon-only categories button; the add action is the FAB below. */} + -
@@ -62,6 +76,16 @@ export function OfferingsListPage() { )} + +