Skip to content

feat(ARC-3816): HetArchief quote block - #371

Open
RobbeBierebeeck wants to merge 18 commits into
release/v6.0.0from
feature/ARC-3816_hetarchief-quote-block
Open

feat(ARC-3816): HetArchief quote block#371
RobbeBierebeeck wants to merge 18 commits into
release/v6.0.0from
feature/ARC-3816_hetarchief-quote-block

Conversation

@RobbeBierebeeck

@RobbeBierebeeck RobbeBierebeeck commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

ARC-3816 · FA: Aanpassingen bestaande contentblokken · Figma

Adds a second quote visualisation for hetarchief.be as its own block type, HETARCHIEF_QUOTE. The existing AvO quote block is untouched and keeps running alongside it.

What's here

  • BlockHetArchiefQuote — pill-framed quote: square left corners, 400px right radius, a meemoocons-light quote glyph, the quote, and an optional author. Frame colour and text colour travel to CSS as custom properties. Desktop and mobile both built from the Figma nodes (455:5722 / 455:7186).
  • ContentBlockType.Quote renamed to AvoQuote. The enum value stays 'QUOTE', mirroring the existing AvoHero = 'HERO', so no stored content page is affected.
  • New SOLID_COLOR_FIELD helper (+ GET_SOLID_COLOR_OPTIONS_ARCHIEF / _AVO) — the background-colour list minus the entries that are not a plain CSS colour. Used for both of this block's pickers.
  • Bug fix in defaults.ts — the three colour-field helpers had defaultValue || isAvo() ? A : B, which parses as (defaultValue || isAvo()) ? A : B and silently discarded an explicitly passed defaultValue.
  • Translations — the four new keys are in ui/src/shared/translations/hetArchief/nl.json, scoped [HET_ARCHIEF] so they are not extracted into the AvO set.
  • The FA's third picker, "Achtergrondkleur contentblok", needed no new field: BLOCK_FIELD_DEFAULTS() already provides it and BLOCK_STATE_DEFAULTS initialises it to Transparent ("geen").

Deliberate deviation from the FA — needs a PO nod

The FA specifies that Tekstkleur and Kleur kader offer "bestaande achtergrondkleuren uit het contentblok Quote + uitbreidingen", i.e. the full 19-entry background list. Three of those entries are not usable here:

Value As Tekstkleur As Kleur kader
Geen (TRANSPARENT) text invisible frame invisible
meemoo logo (<MEEMOO_LOGO>) invalid CSS, colour inherited no frame
Overgang zwart wit (gradient) invalid CSS, colour inherited renders, but not a flat fill

Both pickers therefore use SOLID_COLOR_FIELD, which drops those three and keeps everything else including all ten tertiary colours. Covered by tests in defaults.test.ts. If the FA owner wants the literal full list back, that is a one-line swap to BACKGROUND_COLOR_FIELD.

Reviewer notes

This rename is source-breaking for both consumer apps. ContentBlockType.Quote is referenced by:

  • hetarchief-client/src/modules/admin/wrappers/admin-core-config.tsx:78
  • avo2-client/src/admin/shared/hoc/with-admin-core-config.const.tsx:103

Both need the reference renamed on their next bump. The avo2-client side is out of scope here and its team should be told.

Release needs a minor/major bump, not a patch. npm run bump defaults to --part=patch.

Side effect of the defaults.ts fix. Three pre-existing call sites pass GET_BACKGROUND_COLOR_OPTIONS_*()[1] (white): BLOCK_FIELD_DEFAULTS().backgroundColor, BlockCTAs, BlockCardsWithoutDescription. They previously resolved to [0] (Transparent) because of the bug. They now resolve to white — but only as the displayed fallback when a stored value is missing from the options list; nothing is persisted or re-rendered differently. This matches those authors' evident intent.

The block responds to viewport width, not container width. Correct on the public page; in the CMS preview pane it keeps the desktop layout when the pane is narrow. A container query would fix it — not done, since the Figma does not cover it.

Depends on

viaacode/hetarchief-hasura#409 — the HETARCHIEF_QUOTE enum row must exist before a page using the block can be saved.

Verification

npm run type-check 0 · npx biome ci . 0 · npm test 76 passed, 1 failed (sanitize.test.ts, pre-existing on release/v6.0.0) · stylelint clean on the new SCSS. Rendered and checked in hetarchief-client against both Figma nodes.

🤖 Generated with Claude Code

Robbe Bierebeeck and others added 6 commits August 4, 2026 13:39
… textColor

- BlockHetArchiefQuote: render the meemoocons-light ligature via the literal
  word "quotes" instead of U+201D, which the icon font has no glyph for.
  font-feature-settings/font-variant-ligatures enable the ligature, with a
  sans-serif fallback since admin-core doesn't ship the font.
- Rename HetarchiefQuote symbols to HetArchiefQuote casing to match sibling
  HetArchief* blocks (enum VALUE and tText keys stay byte-identical).
- Fix the 6 biome ci regressions: reorder the Avo quote block's imports/exports
  back beside BlockAvoHero, and reformat the wrapped tText call.
- Widen textColor to Color | GradientColor | CustomBackground to match what
  BACKGROUND_COLOR_FIELD actually allows.
- Use the shared $g-bp2 breakpoint instead of a hardcoded 768px value.
- Clear stylelint violations in the new SCSS (unquoted font names, generic
  fallbacks, comment spacing, media-feature range notation).
- Preserve authored line breaks in the quote text via white-space: pre-line.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@RobbeBierebeeck

Copy link
Copy Markdown
Contributor Author

Closing to review locally first — will reopen once reviewed.

Robbe Bierebeeck added 2 commits August 6, 2026 11:48
The background colour list contains three entries that are not a CSS
colour: "Geen" (TRANSPARENT) rendered the text invisible, the meemoo
logo sentinel and the black/white gradient were invalid in `color` and
silently dropped the frame background.
The block writes its translation keys explicitly, so nl.json is the only
place that can carry their Dutch text. Scope the keys to HET_ARCHIEF so
they are not extracted into the avo translation set.
@reunefe
reunefe requested review from bertyhell and reunefe and removed request for reunefe August 7, 2026 06:49
…-3816_hetarchief-quote-block

# Conflicts:
#	ui/src/react-admin/modules/content-page/components/ContentBlockRenderer/ContentBlockRenderer.const.tsx
#	ui/src/react-admin/modules/content-page/const/content-block-config-map.ts
#	ui/src/react-admin/modules/content-page/const/content-block-initial-state-map.ts
#	ui/src/react-admin/modules/content-page/const/get-content-block-type-options.ts
#	ui/src/shared/translations/hetArchief/nl.json
Comment thread ui/src/react-admin/modules/content-page/types/content-block.types.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/types/content-block.types.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/types/content-block.types.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/const/get-color-options.ts Outdated
Comment thread ui/src/react-admin/modules/content-page/components/blocks/defaults.ts Outdated
Comment on lines +86 to +87
defaultValue ??
(isAvo() ? GET_FOREGROUND_COLOR_OPTIONS_AVO()[0] : GET_FOREGROUND_COLOR_OPTIONS_ARCHIEF()[0]),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waarom deze change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Die hoort hier eigenlijk niet thuis. Ik ben erover gevallen toen ik een default meegaf en die niet doorkwam: defaultValue || isAvo() ? A : B wordt gelezen als (defaultValue || isAvo()) ? A : B. Van zodra je dus een default meegeeft is die check altijd waar en krijg je sowieso de eerste AVO-kleur — de default die je meegeeft doet niets. Dat speelt vandaag ook bij BlockCTAs, BlockPageOverview, BlockCardsWithoutDescription en BlockOverviewWithCarousel. Zal ik het uit deze PR halen en apart zetten?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zet deze inderdaad beter in een aparte PR, alsook log er een aparte bug voor met een reproductie.
Gezien dit een gedragsverandering te weeg zal brengen bij de contentblokken, zal meemoo die ook moeten testen en dat gaat niet zonder ticket.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eruit gehaald, defaults.ts staat terug zoals op release/v6.0.0 en de test is mee verwijderd.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixins gebruiken als ook variabelen. Dit ziet er ook goed uit mobiel?
Al deze vaste waardes lijken me zwaar af wijken van bestaande zaken

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image image

@reunefe reunefe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

white-space: pre-line;

// Figma node 455:5724, style "P - XL".
@include typography.sofia-pro(3.2rem, 500, 4rem);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waarom gebruik je niet gewoon sofia-pro-heading-xl() en overschrijft de font-weight.
Door de mixin op deze manier te gebruiken overal, zit er op termijn nergens meer een lijn in qua consistentie. Of we moeten de bestaande verschillende types uitbreiden met degene die je nodig hebt hier en in de PR voor de content labels. Zodat het consistent blijft

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presets uitgebreid met sofia-pro-body-xl() en sofia-pro-body-xs(), het blok gebruikt die nu. heading-xl() met een weight-override vond ik minder net.

Kleine kanttekening: in _typography.scss staat dat je sofia-pro(...) rechtstreeks mag gebruiken voor een maat die er niet in staat. Dat had ik gevolgd — misschien die comment aanpassen?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment dan inderdaad aanpassen

Comment on lines +86 to +87
defaultValue ??
(isAvo() ? GET_FOREGROUND_COLOR_OPTIONS_AVO()[0] : GET_FOREGROUND_COLOR_OPTIONS_ARCHIEF()[0]),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zet deze inderdaad beter in een aparte PR, alsook log er een aparte bug voor met een reproductie.
Gezien dit een gedragsverandering te weeg zal brengen bij de contentblokken, zal meemoo die ook moeten testen en dat gaat niet zonder ticket.

Comment on lines +134 to +135
defaultValue ??
(isAvo() ? GET_COLOR_OPTIONS_EXTENDED_AVO()[0] : GET_BACKGROUND_COLOR_OPTIONS_ARCHIEF()[0]),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Samen met de andere changes aan die defaultValues apart zetten en ticket voor loggen voor testing en traceability

@RobbeBierebeeck

Copy link
Copy Markdown
Contributor Author

Wat gebeurt er met bestaande QUOTE-blokken?

Niets. De rename raakt alleen de TypeScript-naam: Quote = 'QUOTE' werd AvoQuote = 'QUOTE'. De waarde blijft 'QUOTE', en de config-map, initial-state-map en renderer zijn allemaal op die waarde gekeyed. Opgeslagen pagina's blijven dus gewoon werken.

De styling in de client?

Blijft pakken. _quote.scss targeteert .c-block-quote, en BlockAvoQuote.tsx rendert nog steeds clsx('c-block-quote', className). Alleen de map- en bestandsnaam zijn veranderd, de CSS-klasse niet.

@reunefe

reunefe commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Wat gebeurt er met bestaande QUOTE-blokken?

Niets. De rename raakt alleen de TypeScript-naam: Quote = 'QUOTE' werd AvoQuote = 'QUOTE'. De waarde blijft 'QUOTE', en de config-map, initial-state-map en renderer zijn allemaal op die waarde gekeyed. Opgeslagen pagina's blijven dus gewoon werken.

De styling in de client?

Blijft pakken. _quote.scss targeteert .c-block-quote, en BlockAvoQuote.tsx rendert nog steeds clsx('c-block-quote', className). Alleen de map- en bestandsnaam zijn veranderd, de CSS-klasse niet.

Dat is dus dan net het probleem, want de quote blokken moeten qua styling aanpassen. Maw als we de quoteblokken opsplitsen per client, dan moet er een migratie gebeuren zodat de nieuwe blokken ook naar de nieuwe styling switchen.
Tenzij de FA iets anders beschrijft?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants