Removes the hover effect from the price cards
The lift, accent border and shadow on hovering a whole card are gone; only the booking button keeps its hover and focus effect. Also gives the test that waits for the lazily loaded review carousel a longer timeout, since its first import can take over a second under the full suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -515,3 +515,15 @@ Nou is het nog een statische site zonder back-end dus het contactformulier kan n
|
|||||||
**Context**: CONSTRUCTION - Unit 4 Code Generation (complete, awaiting approval)
|
**Context**: CONSTRUCTION - Unit 4 Code Generation (complete, awaiting approval)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Change Request — Price Card Hover (unit 3), Commit, Push, Test Deploy
|
||||||
|
|
||||||
|
**Timestamp**: 2026-10-20T20:55:00Z
|
||||||
|
|
||||||
|
**User Input**: "okee top. ik wil verder met de openstaande feature voor de homepage sections. Ik heb de het Prijzen/Pakketten onderdeel getest. Die hover op de verschillende pakketten mag wel. De donkere border die je dna krijgt en helemaal die animatie op en neer. Alleen de knoppen mogen hun effecten behouden. Commit daarna de changes, push ze en start dan een deploy naar test. Laat me weten als je de changes hebt voltoid dan kan ik die vast testen via LAN"
|
||||||
|
|
||||||
|
**AI Response**: "Interpreted as: remove the hover effect from the price cards (accent border, lift animation, shadow); the booking buttons keep theirs. Removed in PriceCard.tsx, the now unused 'lift' shadow token, the static design (.price-card:hover) and the functional design; unit 3 code summary updated. pnpm check: a Testimonials test timed out waiting for the lazy carousel chunk under the full suite (cold import > 1s default findBy timeout) — given a 10s timeout for that wait; one Lighthouse mobile run scored 0.75 (TBT 410ms) right after the reboot — a 5-run median on the same build was 0.83 (0.83–0.85), Lighthouse rerun green (mobile 0.83, desktop 1.0). Committing, pushing feature/homepage-sections and dispatching CI with deploy_test=true. Unit 4 (Lieve woorden) is included in this push; its approval is still pending."
|
||||||
|
|
||||||
|
**Context**: CONSTRUCTION - change request on unit 3; push and test deploy (units 1–4)
|
||||||
|
|
||||||
|
---
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Plan: [prijzen-code-generation-plan.md](../../plans/prijzen-code-generation-plan
|
|||||||
| `web/src/content/types.ts` | `PricingPackage`; `HomeContent.pricing` |
|
| `web/src/content/types.ts` | `PricingPackage`; `HomeContent.pricing` |
|
||||||
| `web/src/content/homeContent.ts` | Pricing title, lead, decorations |
|
| `web/src/content/homeContent.ts` | Pricing title, lead, decorations |
|
||||||
| `web/src/recipes/linkButton.ts` | `size: 'fit'` — no wrapping, smaller side padding on phones (BR-BOOK-03); default unchanged |
|
| `web/src/recipes/linkButton.ts` | `size: 'fit'` — no wrapping, smaller side padding on phones (BR-BOOK-03); default unchanged |
|
||||||
| `web/src/theme.ts` | Shadow token `lift` for the card hover |
|
| `web/src/theme.ts` | ~~Shadow token `lift` for the card hover~~ — removed again with the card hover (change request 2026-10-20) |
|
||||||
| `web/src/test/arbitraries.ts` | `pricingPackage`, `uniquePackages`, `anyPackage` |
|
| `web/src/test/arbitraries.ts` | `pricingPackage`, `uniquePackages`, `anyPackage` |
|
||||||
| `web/src/routes/index.tsx` | `validateSearch` keeps `pakket` only as a string; renders `Pricing` after `AboutBlock` |
|
| `web/src/routes/index.tsx` | `validateSearch` keeps `pakket` only as a string; renders `Pricing` after `AboutBlock` |
|
||||||
| `web/src/app.test.tsx` | "Prijzen" in the page order; `?pakket=newborn`, `?pakket=123` and `?pakket=<script>` render without errors and without reflecting the value |
|
| `web/src/app.test.tsx` | "Prijzen" in the page order; `?pakket=newborn`, `?pakket=123` and `?pakket=<script>` render without errors and without reflecting the value |
|
||||||
@@ -32,6 +32,9 @@ Plan: [prijzen-code-generation-plan.md](../../plans/prijzen-code-generation-plan
|
|||||||
- **Second decoration**: the design positions it relative to the whole section; in the content box the last card covered it, so it was moved into the section's bottom padding (found in the visual check).
|
- **Second decoration**: the design positions it relative to the whole section; in the content box the last card covered it, so it was moved into the section's bottom padding (found in the visual check).
|
||||||
- **Literal special spaces**: an editing tool turned ` `/` ` escapes into the characters themselves, which ESLint rejects (`no-irregular-whitespace`); they were written back as escapes and `src` was scanned for others.
|
- **Literal special spaces**: an editing tool turned ` `/` ` escapes into the characters themselves, which ESLint rejects (`no-irregular-whitespace`); they were written back as escapes and `src` was scanned for others.
|
||||||
|
|
||||||
|
## Change request after testing on test (2026-10-20)
|
||||||
|
The owner removed the hover effect from the cards (lift, accent border, shadow); only the booking button keeps its effects. Removed in `PriceCard.tsx`, the `lift` shadow token in `theme.ts`, the static design (`.price-card:hover`) and the functional design.
|
||||||
|
|
||||||
## Property-based tests (PBT)
|
## Property-based tests (PBT)
|
||||||
| Function | Properties |
|
| Function | Properties |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ Text alternative: the home route renders Pricing, which uses HomeSection, two de
|
|||||||
- **Props**: `{ pkg: PricingPackage }`
|
- **Props**: `{ pkg: PricingPackage }`
|
||||||
- **Markup**: `article` with `h3` (name), price paragraph, `ul` of features, book link. `data-testid="price-card-<id>"`, link `data-testid="price-card-<id>-book"`.
|
- **Markup**: `article` with `h3` (name), price paragraph, `ul` of features, book link. `data-testid="price-card-<id>"`, link `data-testid="price-card-<id>-book"`.
|
||||||
- **Style**: white background, 1 px `line` border, centred text, padding `clamp(2rem, 3.5vw, 3rem) clamp(1.5rem, 3vw, 2.5rem)`; name in heading font 1.75 rem; price in heading font 2.25 rem, `accent.deep` (contrast, NFR-HP-01); features small text `ink.soft` between two hairlines, gap 0.75 rem; link aligned to the bottom (cards in a row get equal button positions).
|
- **Style**: white background, 1 px `line` border, centred text, padding `clamp(2rem, 3.5vw, 3rem) clamp(1.5rem, 3vw, 2.5rem)`; name in heading font 1.75 rem; price in heading font 2.25 rem, `accent.deep` (contrast, NFR-HP-01); features small text `ink.soft` between two hairlines, gap 0.75 rem; link aligned to the bottom (cards in a row get equal button positions).
|
||||||
- **Hover** (whole card, decorative): lift 6 px, `accent` border, `shadow-md`; transition `interaction`; no lift under reduced motion.
|
- **Hover**: none on the card itself — no lift, border change or shadow (owner's choice after testing on test, 2026-10-20). Only the book link keeps its button hover/focus effect.
|
||||||
- **Book link**: the outline `linkButton` style; text per `bookLabel` (BR-BOOK-02) with `VisuallyHidden` for the hidden part; `white-space: nowrap`; horizontal padding 1.25 rem on phones, the design's 2.4 rem from `sm` (BR-BOOK-03). Target `/` with `search={{ pakket: id }}` and `hash="contact"`.
|
- **Book link**: the outline `linkButton` style; text per `bookLabel` (BR-BOOK-02) with `VisuallyHidden` for the hidden part; `white-space: nowrap`; horizontal padding 1.25 rem on phones, the design's 2.4 rem from `sm` (BR-BOOK-03). Target `/` with `search={{ pakket: id }}` and `hash="contact"`.
|
||||||
|
|
||||||
## Route (`/`)
|
## Route (`/`)
|
||||||
|
|||||||
@@ -804,15 +804,8 @@ p:last-child { margin-bottom: 0; }
|
|||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
background: var(--c-white);
|
background: var(--c-white);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: transform var(--dur) var(--ease),
|
|
||||||
box-shadow var(--dur) var(--ease),
|
|
||||||
border-color var(--dur) var(--ease);
|
|
||||||
}
|
|
||||||
.price-card:hover {
|
|
||||||
transform: translateY(-6px);
|
|
||||||
border-color: var(--c-accent);
|
|
||||||
box-shadow: var(--shadow-md);
|
|
||||||
}
|
}
|
||||||
|
/* No hover effect on the card itself (owner's choice); only the button reacts */
|
||||||
|
|
||||||
.price-card__name {
|
.price-card__name {
|
||||||
margin-bottom: .75rem;
|
margin-bottom: .75rem;
|
||||||
|
|||||||
@@ -33,16 +33,9 @@ export default function PriceCard({ pkg }: PriceCardProps) {
|
|||||||
bg="white"
|
bg="white"
|
||||||
borderWidth="1px"
|
borderWidth="1px"
|
||||||
borderColor="line"
|
borderColor="line"
|
||||||
|
// No hover effect on the card itself (owner's choice); only the
|
||||||
|
// booking button reacts
|
||||||
textAlign="center"
|
textAlign="center"
|
||||||
transitionProperty="transform, box-shadow, border-color"
|
|
||||||
transitionDuration="interaction"
|
|
||||||
transitionTimingFunction="smooth"
|
|
||||||
_hover={{
|
|
||||||
transform: 'translateY(-6px)',
|
|
||||||
borderColor: 'accent',
|
|
||||||
boxShadow: 'lift',
|
|
||||||
}}
|
|
||||||
_motionReduce={{ _hover: { transform: 'none' } }}
|
|
||||||
>
|
>
|
||||||
<Heading as="h3" fontSize="1.75rem" mb={3}>
|
<Heading as="h3" fontSize="1.75rem" mb={3}>
|
||||||
{pkg.name}
|
{pkg.name}
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ afterEach(() => {
|
|||||||
|
|
||||||
const content = homeContent.testimonials;
|
const content = homeContent.testimonials;
|
||||||
|
|
||||||
|
// The carousel is a lazy chunk. The first test that loads it pays for
|
||||||
|
// transforming and instrumenting it, which under the full suite with
|
||||||
|
// coverage can take well over the default 1s of findBy*
|
||||||
|
const LAZY_LOAD = { timeout: 10_000 };
|
||||||
|
|
||||||
// Renders the section and brings it into view, so the lazily loaded
|
// Renders the section and brings it into view, so the lazily loaded
|
||||||
// carousel appears
|
// carousel appears
|
||||||
async function renderTestimonials(items = testimonials) {
|
async function renderTestimonials(items = testimonials) {
|
||||||
@@ -67,7 +72,7 @@ async function renderTestimonials(items = testimonials) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
if (visibleTestimonials(items).length > 1) {
|
if (visibleTestimonials(items).length > 1) {
|
||||||
await screen.findByRole('region', { name: 'Reviews' });
|
await screen.findByRole('region', { name: 'Reviews' }, LAZY_LOAD);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -106,7 +111,7 @@ describe('Testimonials', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
expect(
|
expect(
|
||||||
await screen.findByRole('region', { name: 'Reviews' }),
|
await screen.findByRole('region', { name: 'Reviews' }, LAZY_LOAD),
|
||||||
).toBeInTheDocument();
|
).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -96,12 +96,6 @@ const config = defineConfig({
|
|||||||
// Binnen de header: de hamburger boven het logo en menu
|
// Binnen de header: de hamburger boven het logo en menu
|
||||||
menuToggle: { value: 1 },
|
menuToggle: { value: 1 },
|
||||||
},
|
},
|
||||||
shadows: {
|
|
||||||
// Soft shadow under a lifted card on hover (design --shadow-md)
|
|
||||||
lift: {
|
|
||||||
value: '0 12px 40px color-mix(in srgb, {colors.ink} 12%, transparent)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
gradients: {
|
gradients: {
|
||||||
// Donker verloop over hero-foto's, zodat witte tekst leesbaar blijft
|
// Donker verloop over hero-foto's, zodat witte tekst leesbaar blijft
|
||||||
scrim: {
|
scrim: {
|
||||||
|
|||||||
Reference in New Issue
Block a user