diff --git a/aidlc-docs/features/over-mij-page/construction/plans/shared-blocks-code-generation-plan.md b/aidlc-docs/features/over-mij-page/construction/plans/shared-blocks-code-generation-plan.md new file mode 100644 index 0000000..4ce5528 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/construction/plans/shared-blocks-code-generation-plan.md @@ -0,0 +1,49 @@ +# Code Generation Plan — Unit 1: Shared blocks + +Single source of truth for code generation of this unit. Workspace root: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie`; all code in `web/src/`. Branch `feature/over-mij-page`. + +## Unit Context +- **Requirements**: FR-OM-09 (`HomeSection` → `PageSection`), FR-OM-10 (shared media+text block), NFR-OM-02 (reuse, tokens, English comments), NFR-OM-03 (tests) +- **Design**: [application-design.md](../../inception/application-design/application-design.md) — `Eyebrow` (Q2), `PageSection` + `flushTop`, `MediaText` layout-only (Q1) +- **Dependencies**: none on other units; unit 2 builds on everything here +- **Behavioural contract**: the homepage renders exactly as before — same DOM roles, names, texts, styles. Existing tests must pass unchanged except for renamed imports/names. +- **No business logic, no new pure helpers** → no property-based tests in this unit (PBT rules N/A: no properties to test in layout components). Example-based component tests + axe. + +## Steps + +### Eyebrow +- [x] **Step 1** — Create `components/Eyebrow/Eyebrow.tsx`: Chakra `Text` with `textStyle="eyebrow"`, `color="accent.deep"`, `mb={4}`, an `as` prop (`'p' | 'span' | 'h2' | 'h3' | 'h4'`, default `p`) and pass-through `TextProps`. Comment: why `accent.deep` (4.5:1). +- [x] **Step 2** — Create `components/Eyebrow/Eyebrow.test.tsx`: renders a paragraph by default; with `as="h3"` it is a level-3 heading with that name and can carry an `id`; extra props (e.g. `mb`) pass through; axe clean. +- [x] **Step 3** — Switch the four identical inline labels to `Eyebrow` (same output): `SectionHeading`, `PageIntro`, `ContactForm/ContactFormGate`, `home/Testimonials/TestimonialSlide` (only its shoot label, not the author line). Remove the then-duplicated contrast comments where `Eyebrow` now carries the reason. + +### PageSection +- [x] **Step 4** — Rename `components/HomeSection/` → `components/PageSection/` (`git mv` for the component and its test), rename the component and props type, update the doc comment to "a content section on any page". +- [x] **Step 5** — Add `spacing="flushTop"`: no top padding, bottom padding as `default` (design `.section--flush-top`). +- [x] **Step 6** — Update all importers: `home/AboutBlock`, `home/ContactSection`, `home/InstagramGrid`, `home/IntroGallery`, `home/Pricing/Pricing`, `home/Testimonials/Testimonials`. +- [x] **Step 7** — Update `PageSection.test.tsx`: renamed; add a case for `flushTop` (top padding 0, bottom padding kept). + +### MediaText +- [x] **Step 8** — Create `components/MediaText/MediaText.tsx`: grid `1fr` → `1fr 1fr` from `lg`, gap `clamp(2rem, 6vw, 5.5rem)`, `alignItems="center"`; first column `Reveal` → `FramedImage image aspectRatio`; second column `Reveal` → `children`. Props: `image`, `aspectRatio`, `data-testid?`, `children`. +- [x] **Step 9** — Create `components/MediaText/MediaText.test.tsx`: shows the image with its alt text and the children; photo comes before the text in DOM order; axe clean. +- [x] **Step 10** — Switch `home/AboutBlock` to `PageSection` + `MediaText` (the text column keeps `SectionHeading`, the paragraphs and the link). `AboutBlock.test.tsx` passes unchanged. + +### Verification and summary +- [x] **Step 11** — Search for leftovers: no `HomeSection` references in `web/` (code, tests, comments); no duplicate component files. +- [x] **Step 12** — Run `pnpm check` in `web/` (lint, format, typecheck/build, tests with coverage, audits, Lighthouse). Fix and rerun until green. +- [x] **Step 13** — Visual check of the homepage against master in the browser (desktop and phone width): About block, section headings, page intro of a placeholder page, contact notice, testimonial label — no visible difference. +- [x] **Step 14** — Update the shared reverse engineering docs where they name `HomeSection` (architecture, code-structure, api-documentation, component-inventory, code-quality-assessment: debt item resolved) and list `Eyebrow`, `MediaText`. +- [x] **Step 15** — Write `aidlc-docs/features/over-mij-page/construction/shared-blocks/code/code-summary.md` (created/modified files, tests, verification outcome). +- [ ] **Step 16** — Commit on `feature/over-mij-page` (no push until asked). + +## Files +- **Created**: `components/Eyebrow/Eyebrow.tsx`, `Eyebrow.test.tsx`; `components/MediaText/MediaText.tsx`, `MediaText.test.tsx` +- **Renamed + modified**: `components/HomeSection/*` → `components/PageSection/PageSection.tsx`, `PageSection.test.tsx` +- **Modified**: `components/SectionHeading/SectionHeading.tsx`, `components/PageIntro/PageIntro.tsx`, `components/ContactForm/ContactFormGate.tsx`, `components/home/Testimonials/TestimonialSlide.tsx`, `components/home/AboutBlock/AboutBlock.tsx`, `components/home/{ContactSection,InstagramGrid,IntroGallery,Pricing/Pricing,Testimonials/Testimonials}.tsx` +- **Docs**: `aidlc-docs/_shared/reverse-engineering/*.md` (names), unit code summary + +## Extension Compliance (unit 1) +| Rule | Status | Rationale | +|---|---|---| +| SECURITY-10 | Compliant | No new dependencies | +| Other SECURITY rules | N/A | Presentational refactor; no data, endpoints, headers or config | +| PBT-01..10 | N/A | No pure functions or business logic in this unit; example-based component tests cover the layout contract (PBT-10 complementary testing applies in unit 2) | diff --git a/aidlc-docs/features/over-mij-page/construction/shared-blocks/code/code-summary.md b/aidlc-docs/features/over-mij-page/construction/shared-blocks/code/code-summary.md new file mode 100644 index 0000000..5e9a5d3 --- /dev/null +++ b/aidlc-docs/features/over-mij-page/construction/shared-blocks/code/code-summary.md @@ -0,0 +1,31 @@ +# Code Summary — Unit 1: Shared blocks + +Plan: [shared-blocks-code-generation-plan.md](../../plans/shared-blocks-code-generation-plan.md). Requirements: FR-OM-09, FR-OM-10, NFR-OM-02, NFR-OM-03. + +## Created +- `web/src/components/Eyebrow/Eyebrow.tsx` — accent label (`textStyle="eyebrow"`, `accent.deep`, `mb={4}`), `as` prop for `p`/`span`/`h2`–`h4`, other `TextProps` pass through +- `web/src/components/Eyebrow/Eyebrow.test.tsx` — paragraph by default; as h3 a heading that names a region; props pass through; axe +- `web/src/components/MediaText/MediaText.tsx` — framed photo next to a text column (`children`), stacked below `lg`, both columns in `Reveal` +- `web/src/components/MediaText/MediaText.test.tsx` — photo and text shown, photo first in DOM order; axe + +## Renamed and modified +- `web/src/components/HomeSection/HomeSection.tsx` → `web/src/components/PageSection/PageSection.tsx` — renamed component/props; new `spacing="flushTop"` (no top padding, bottom padding as default) +- `HomeSection.test.tsx` → `PageSection.test.tsx` — renamed; new case for `flushTop` + +## Modified +- `components/SectionHeading/SectionHeading.tsx`, `components/PageIntro/PageIntro.tsx`, `components/ContactForm/ContactFormGate.tsx`, `components/home/Testimonials/TestimonialSlide.tsx` — inline label replaced by `Eyebrow` (contrast comment now lives in `Eyebrow`) +- `components/home/AboutBlock/AboutBlock.tsx` — uses `PageSection` + `MediaText` +- `components/home/{ContactSection,InstagramGrid,IntroGallery,Pricing/Pricing,Testimonials/Testimonials}.tsx` — import `PageSection` +- `aidlc-docs/_shared/reverse-engineering/*.md` — names updated (`PageSection`, `MediaText`, `Eyebrow`); `HomeSection` debt item removed + +## Verification +- **Leftovers**: no `HomeSection` in `web/` source, tests or comments +- **`pnpm check`**: lint, format, typecheck/build, 55 test files / 250 tests, coverage thresholds, audits — passed. Lighthouse failed in the first run (mobile performance `/` 0.71, `/over-mij` 0.87) because a second production build was running at the same time on the same machine; rerun alone: passed — mobile `/` 0.82 (budget 0.8), other pages 0.94–0.95; desktop 0.99–1; accessibility 1 everywhere +- **Homepage unchanged**: master and branch production builds compared in headless Chrome at 1440, 768 and 390 px (reduced motion, after scrolling through the page): tag, ids, `aria-labelledby`, alt, text, position, size and 21 computed styles of every element in `
` — 233/233 elements identical on `/`, identical on `/over-mij` and `/contact` (placeholders with `PageIntro`). The same comparison of master against itself is also identical, so the method is stable. (Byte-for-byte screenshots were not usable: they already differ between two runs of master, through image loading and timing.) + +## Extension Compliance +| Rule | Status | Rationale | +|---|---|---| +| SECURITY-10 | Compliant | No new dependencies | +| Other SECURITY rules | N/A | Presentational refactor only | +| PBT-01..10 | N/A | No pure functions or business logic in this unit | diff --git a/web/src/components/ContactForm/ContactFormGate.tsx b/web/src/components/ContactForm/ContactFormGate.tsx index 6ec7ab0..ee338c8 100644 --- a/web/src/components/ContactForm/ContactFormGate.tsx +++ b/web/src/components/ContactForm/ContactFormGate.tsx @@ -1,5 +1,6 @@ import type { ReactNode } from 'react'; import { Box, chakra, Link, Text, useRecipe } from '@chakra-ui/react'; +import Eyebrow from '@/components/Eyebrow/Eyebrow'; import type { EmailAddress } from '@/content/types'; import { emailAddress } from '@/lib/emailAddress'; import { mailtoLink } from '@/lib/mailLink'; @@ -46,10 +47,7 @@ export default function ContactFormGate({ textAlign="center" data-testid="contact-gate-notice" > - {/* accent.deep instead of the design's accent: meets 4.5:1 */} - - Binnenkort - + Binnenkort Het contactformulier komt binnenkort. {address && ( diff --git a/web/src/components/Eyebrow/Eyebrow.test.tsx b/web/src/components/Eyebrow/Eyebrow.test.tsx new file mode 100644 index 0000000..291cb36 --- /dev/null +++ b/web/src/components/Eyebrow/Eyebrow.test.tsx @@ -0,0 +1,42 @@ +import { screen } from '@testing-library/react'; +import { describe, expect, it } from 'vitest'; +import { axeResults } from '@/test/axe'; +import { renderWithProviders } from '@/test/renderWithProviders'; +import Eyebrow from './Eyebrow'; + +describe('Eyebrow', () => { + it('is a paragraph by default', async () => { + const { container } = await renderWithProviders( + Over mij, + ); + expect(screen.getByText('Over mij').tagName).toBe('P'); + expect(screen.queryByRole('heading')).not.toBeInTheDocument(); + expect(await axeResults(container)).toHaveNoViolations(); + }); + + it('can be a heading that a section refers to by id', async () => { + const { container } = await renderWithProviders( +
+ + Hoe het begon + +
, + ); + expect( + screen.getByRole('heading', { level: 3, name: 'Hoe het begon' }), + ).toHaveAttribute('id', 'story-title'); + expect( + screen.getByRole('region', { name: 'Hoe het begon' }), + ).toBeInTheDocument(); + expect(await axeResults(container)).toHaveNoViolations(); + }); + + it('passes other props through', async () => { + await renderWithProviders( + + Binnenkort + , + ); + expect(screen.getByTestId('label')).toHaveTextContent('Binnenkort'); + }); +}); diff --git a/web/src/components/Eyebrow/Eyebrow.tsx b/web/src/components/Eyebrow/Eyebrow.tsx new file mode 100644 index 0000000..1e59d52 --- /dev/null +++ b/web/src/components/Eyebrow/Eyebrow.tsx @@ -0,0 +1,21 @@ +import { Text, type TextProps } from '@chakra-ui/react'; + +type EyebrowProps = Omit & { + // A heading level makes the label a real heading that keeps the small + // label look, e.g. the story headings on the about page + as?: 'p' | 'span' | 'h2' | 'h3' | 'h4'; +}; + +// Small capitals label above a heading or text (design .eyebrow). +// accent.deep instead of the design's accent: meets 4.5:1 on paper and white. +export default function Eyebrow({ as = 'p', ...rest }: EyebrowProps) { + return ( + + ); +} diff --git a/web/src/components/MediaText/MediaText.test.tsx b/web/src/components/MediaText/MediaText.test.tsx new file mode 100644 index 0000000..7fb84e7 --- /dev/null +++ b/web/src/components/MediaText/MediaText.test.tsx @@ -0,0 +1,46 @@ +import { screen } from '@testing-library/react'; +import { describe, expect, it } from 'vitest'; +import type { ContentImage } from '@/content/types'; +import { axeResults } from '@/test/axe'; +import { renderWithProviders } from '@/test/renderWithProviders'; +import MediaText from './MediaText'; + +const image: ContentImage = { + src: '/andrea.jpg', + alt: 'Andrea met haar camera', + width: 1200, + height: 800, +}; + +describe('MediaText', () => { + it('shows the photo and the text column', async () => { + const { container } = await renderWithProviders( + +

Hoi! Ik ben Andrea

+

Lifestyle fotograaf uit Huizen.

+
, + ); + expect(screen.getByRole('img')).toHaveAccessibleName(image.alt); + expect( + screen.getByRole('heading', { name: 'Hoi! Ik ben Andrea' }), + ).toBeInTheDocument(); + expect( + screen.getByText('Lifestyle fotograaf uit Huizen.'), + ).toBeInTheDocument(); + expect(await axeResults(container)).toHaveNoViolations(); + }); + + it('puts the photo before the text, also when stacked', async () => { + await renderWithProviders( + +

Hoi! Ik ben Andrea

+
, + ); + const photo = screen.getByRole('img'); + const heading = screen.getByRole('heading'); + expect( + photo.compareDocumentPosition(heading) & + Node.DOCUMENT_POSITION_FOLLOWING, + ).toBeTruthy(); + }); +}); diff --git a/web/src/components/MediaText/MediaText.tsx b/web/src/components/MediaText/MediaText.tsx new file mode 100644 index 0000000..b5b3fce --- /dev/null +++ b/web/src/components/MediaText/MediaText.tsx @@ -0,0 +1,38 @@ +import type { ReactNode } from 'react'; +import { Grid } from '@chakra-ui/react'; +import FramedImage from '@/components/FramedImage/FramedImage'; +import Reveal from '@/components/Reveal/Reveal'; +import type { ContentImage } from '@/content/types'; + +type MediaTextProps = { + image: ContentImage; + // CSS aspect ratio of the visible crop, e.g. '4 / 3' + aspectRatio: string; + 'data-testid'?: string; + // The text column; each page fills in its own heading and text + children: ReactNode; +}; + +// A framed photo next to a text column (design .about), used on the +// homepage and the about page. Stacked on phones and tablets, two equal +// columns from `lg`; both columns fade in on scroll. +export default function MediaText({ + image, + aspectRatio, + 'data-testid': testId, + children, +}: MediaTextProps) { + return ( + + + + + {children} + + ); +} diff --git a/web/src/components/PageIntro/PageIntro.tsx b/web/src/components/PageIntro/PageIntro.tsx index 78b3449..c43da7c 100644 --- a/web/src/components/PageIntro/PageIntro.tsx +++ b/web/src/components/PageIntro/PageIntro.tsx @@ -1,5 +1,6 @@ import type { ReactNode } from 'react'; import { Container, Heading, Text } from '@chakra-ui/react'; +import Eyebrow from '@/components/Eyebrow/Eyebrow'; type PageIntroProps = { title: string; @@ -21,12 +22,7 @@ export default function PageIntro({ pb={{ base: 8, md: 12, lg: 16 }} textAlign="center" > - {eyebrow && ( - // accent.deep i.p.v. accent uit het design: haalt 4.5:1 (NFR-01) - - {eyebrow} - - )} + {eyebrow && {eyebrow}} {title} diff --git a/web/src/components/HomeSection/HomeSection.test.tsx b/web/src/components/PageSection/PageSection.test.tsx similarity index 56% rename from web/src/components/HomeSection/HomeSection.test.tsx rename to web/src/components/PageSection/PageSection.test.tsx index 7d18038..a4da787 100644 --- a/web/src/components/HomeSection/HomeSection.test.tsx +++ b/web/src/components/PageSection/PageSection.test.tsx @@ -2,14 +2,14 @@ import { screen } from '@testing-library/react'; import { describe, expect, it } from 'vitest'; import { axeResults } from '@/test/axe'; import { renderWithProviders } from '@/test/renderWithProviders'; -import HomeSection from './HomeSection'; +import PageSection from './PageSection'; -describe('HomeSection', () => { +describe('PageSection', () => { it('is a region named by its heading', async () => { const { container } = await renderWithProviders( - +

Over mij

-
, + , ); expect(screen.getByRole('region', { name: 'Over mij' })).toBe( screen.getByTestId('about'), @@ -19,7 +19,7 @@ describe('HomeSection', () => { it('passes the anchor id through for every tone, width and spacing', async () => { await renderWithProviders( - { spacing="tight" >

Contact

-
, + , ); expect(screen.getByRole('region', { name: 'Contact' })).toHaveAttribute( 'id', @@ -35,13 +35,35 @@ describe('HomeSection', () => { ); }); + it('has no space above when it sits flush below a page head', async () => { + await renderWithProviders( + <> + +

Hoi!

+
+ +

Verder

+
+ , + ); + const regular = getComputedStyle(screen.getByTestId('flush')); + const flush = getComputedStyle(screen.getByTestId('flush-top')); + expect(flush.paddingTop).toBe('0px'); + expect(flush.paddingBottom).toBe(regular.paddingBottom); + expect(regular.paddingTop).not.toBe('0px'); + }); + it('leaves out the content column at full width', async () => { await renderWithProviders( - +

Instagram

-
, + , ); // The heading is a direct child of the section, not of a Container expect(screen.getByTestId('child').parentElement).toBe( diff --git a/web/src/components/HomeSection/HomeSection.tsx b/web/src/components/PageSection/PageSection.tsx similarity index 71% rename from web/src/components/HomeSection/HomeSection.tsx rename to web/src/components/PageSection/PageSection.tsx index ce5fc8f..ed13b67 100644 --- a/web/src/components/HomeSection/HomeSection.tsx +++ b/web/src/components/PageSection/PageSection.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from 'react'; import { Box, Container } from '@chakra-ui/react'; -type HomeSectionProps = { +type PageSectionProps = { // Id of the heading that names this section for assistive technology labelledBy: string; id?: string; @@ -9,14 +9,16 @@ type HomeSectionProps = { // full: no content column, for edge-to-edge content; the section then // places its own Container around what should stay in the column width?: 'default' | 'narrow' | 'full'; - spacing?: 'default' | 'tight'; + // flushTop: no space above, for the first block right below a page head + // (design .section--flush-top) + spacing?: 'default' | 'tight' | 'flushTop'; 'data-testid'?: string; children: ReactNode; }; -// Frame of a homepage section (design .section): vertical rhythm, an -// optional alternate background and the content column. -export default function HomeSection({ +// Frame of a content section on any page (design .section): vertical +// rhythm, an optional alternate background and the content column. +export default function PageSection({ labelledBy, id, tone = 'paper', @@ -24,7 +26,9 @@ export default function HomeSection({ spacing = 'default', 'data-testid': testId, children, -}: HomeSectionProps) { +}: PageSectionProps) { + const padding = spacing === 'tight' ? 'sectionYTight' : 'sectionY'; + return ( {width === 'full' ? ( children diff --git a/web/src/components/SectionHeading/SectionHeading.tsx b/web/src/components/SectionHeading/SectionHeading.tsx index 4b4b481..28d4ed8 100644 --- a/web/src/components/SectionHeading/SectionHeading.tsx +++ b/web/src/components/SectionHeading/SectionHeading.tsx @@ -1,5 +1,6 @@ import type { ReactNode } from 'react'; import { Box, Heading, Text } from '@chakra-ui/react'; +import Eyebrow from '@/components/Eyebrow/Eyebrow'; type SectionHeadingProps = { // Referenced by the section's aria-labelledby @@ -35,12 +36,7 @@ export default function SectionHeading({ mb={spacing === 'compact' ? 6 : 'sectionHeadGap'} textAlign={centered ? 'center' : 'start'} > - {eyebrow && ( - // accent.deep instead of the design's accent: meets 4.5:1 (NFR-HP-01) - - {eyebrow} - - )} + {eyebrow && {eyebrow}} - - - - - - - - {content.paragraphs.map((paragraph) => ( - {paragraph} - ))} - - - - {content.link.label} - - - - - - - + + + + + {content.paragraphs.map((paragraph) => ( + {paragraph} + ))} + + + + {content.link.label} + + + + + + ); } diff --git a/web/src/components/home/ContactSection/ContactSection.tsx b/web/src/components/home/ContactSection/ContactSection.tsx index 91ff044..34a6dde 100644 --- a/web/src/components/home/ContactSection/ContactSection.tsx +++ b/web/src/components/home/ContactSection/ContactSection.tsx @@ -3,7 +3,7 @@ import { Box, useMediaQuery } from '@chakra-ui/react'; import { useNavigate } from '@tanstack/react-router'; import { DEFERRED_LOAD_MARGIN } from '@/components/DeferredImage/DeferredImage'; import ContactFormGate from '@/components/ContactForm/ContactFormGate'; -import HomeSection from '@/components/HomeSection/HomeSection'; +import PageSection from '@/components/PageSection/PageSection'; import Reveal from '@/components/Reveal/Reveal'; import SectionHeading from '@/components/SectionHeading/SectionHeading'; import type { @@ -109,7 +109,7 @@ export default function ContactSection({ const placeholder = ; return ( - - + ); } diff --git a/web/src/components/home/InstagramGrid/InstagramGrid.tsx b/web/src/components/home/InstagramGrid/InstagramGrid.tsx index fdf6e42..0fdaa2a 100644 --- a/web/src/components/home/InstagramGrid/InstagramGrid.tsx +++ b/web/src/components/home/InstagramGrid/InstagramGrid.tsx @@ -1,6 +1,6 @@ import { Box, chakra, Container, Link, VisuallyHidden } from '@chakra-ui/react'; import DeferredImage from '@/components/DeferredImage/DeferredImage'; -import HomeSection from '@/components/HomeSection/HomeSection'; +import PageSection from '@/components/PageSection/PageSection'; import Reveal from '@/components/Reveal/Reveal'; import SectionHeading from '@/components/SectionHeading/SectionHeading'; import type { HomeContent } from '@/content/types'; @@ -22,7 +22,7 @@ export default function InstagramGrid({ profileUrl, }: InstagramGridProps) { return ( - - + ); } diff --git a/web/src/components/home/IntroGallery/IntroGallery.tsx b/web/src/components/home/IntroGallery/IntroGallery.tsx index 13d50a8..1948ecc 100644 --- a/web/src/components/home/IntroGallery/IntroGallery.tsx +++ b/web/src/components/home/IntroGallery/IntroGallery.tsx @@ -2,7 +2,7 @@ import { chakra, useBreakpointValue } from '@chakra-ui/react'; import DeferredImage, { DEFERRED_LOAD_MARGIN, } from '@/components/DeferredImage/DeferredImage'; -import HomeSection from '@/components/HomeSection/HomeSection'; +import PageSection from '@/components/PageSection/PageSection'; import Reveal from '@/components/Reveal/Reveal'; import SectionHeading from '@/components/SectionHeading/SectionHeading'; import type { HomeContent } from '@/content/types'; @@ -33,7 +33,7 @@ export default function IntroGallery({ content }: IntroGalleryProps) { const scrollable = useBreakpointValue({ base: true, sm: false }) ?? false; return ( - + - + ); } diff --git a/web/src/components/home/Pricing/Pricing.tsx b/web/src/components/home/Pricing/Pricing.tsx index 8a48acb..b1d2a84 100644 --- a/web/src/components/home/Pricing/Pricing.tsx +++ b/web/src/components/home/Pricing/Pricing.tsx @@ -1,6 +1,6 @@ import { Box, Grid } from '@chakra-ui/react'; import DeferredImage from '@/components/DeferredImage/DeferredImage'; -import HomeSection from '@/components/HomeSection/HomeSection'; +import PageSection from '@/components/PageSection/PageSection'; import Reveal from '@/components/Reveal/Reveal'; import SectionHeading from '@/components/SectionHeading/SectionHeading'; import type { HomeContent, PricingPackage } from '@/content/types'; @@ -32,7 +32,7 @@ export default function Pricing({ content, packages }: PricingProps) { if (shown.length === 0) return null; return ( - + {content.decorations.map((decoration, index) => ( - + ); } diff --git a/web/src/components/home/Testimonials/TestimonialSlide.tsx b/web/src/components/home/Testimonials/TestimonialSlide.tsx index 85a4438..bd30a50 100644 --- a/web/src/components/home/Testimonials/TestimonialSlide.tsx +++ b/web/src/components/home/Testimonials/TestimonialSlide.tsx @@ -1,4 +1,5 @@ import { Box, chakra, Grid, Text } from '@chakra-ui/react'; +import Eyebrow from '@/components/Eyebrow/Eyebrow'; import FramedImage from '@/components/FramedImage/FramedImage'; import type { Testimonial } from '@/content/types'; @@ -44,10 +45,7 @@ export default function TestimonialSlide({ > “
- {/* accent.deep instead of the design's accent: meets 4.5:1 (NFR-HP-01) */} - - {testimonial.shoot} - + {testimonial.shoot} {/* Plain elements, not Chakra's Blockquote: its slot recipe would pull shared code into the chunk the hero waits for */} diff --git a/web/src/components/home/Testimonials/Testimonials.tsx b/web/src/components/home/Testimonials/Testimonials.tsx index 3285361..cb7d8c8 100644 --- a/web/src/components/home/Testimonials/Testimonials.tsx +++ b/web/src/components/home/Testimonials/Testimonials.tsx @@ -1,7 +1,7 @@ import { lazy, Suspense } from 'react'; import { Box } from '@chakra-ui/react'; import { DEFERRED_LOAD_MARGIN } from '@/components/DeferredImage/DeferredImage'; -import HomeSection from '@/components/HomeSection/HomeSection'; +import PageSection from '@/components/PageSection/PageSection'; import Reveal from '@/components/Reveal/Reveal'; import SectionHeading from '@/components/SectionHeading/SectionHeading'; import type { HomeContent, Testimonial } from '@/content/types'; @@ -36,7 +36,7 @@ export default function Testimonials({ if (shown.length === 0) return null; return ( - )} - + ); }