Skip to content

Conversation

@AliKdhim87
Copy link
Contributor

@AliKdhim87 AliKdhim87 commented Jan 20, 2026

Samenvatting

We hebben het Kiss-dashboard-preview losgemaakt van de preview-knop. Dit komt omdat de overige-objecten-api dezelfde logica gebruikt om data te verzamelen. De oude versie was daardoor te ingewikkeld om te onderhouden. Deze nieuwe oplossing maakt de preview-knop in Strapi eenvoudiger.

Veranderingen

  • Een nieuwe preview-functie toegevoegd aan de overige-objecten-api.
  • Een mini-Kiss-dashboard gebouwd dat de data laat zien met het NL Design System.
  • Een nieuwe copy-to-clipboard functie toegevoegd om de HTML van de preview eenvoudig te kopiëren.

Voordelen

  • De nieuwe versie kan hergebruikt worden voor andere organisaties.
  • Als de overige-objecten-api naar Strapi 5 gaat, is alleen een kleine update nodig.

Gebruik

Bezoek de volgende URL’s met de juiste parameters om een Kennisartikel of VAC te bekijken:

http://localhost:4001/api/v2/preview?slug=vac&secret=xxxx&apiToken=xxxxx&uuid=vac-uuid
http://localhost:4001/api/v2/preview?slug=kennisartikelen&secret=xxxx&apiToken=xxxxx&uuid=product-uuid

Zorg dat het Strapi-dashboard actief is.

Screenshots

Screenshot 2026-01-20 at 12 38 30 Screenshot 2026-01-20 at 12 39 15 Screenshot 2026-01-20 at 12 40 07

issue

@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
cms-frameless-io Error Error Jan 27, 2026 4:18pm
tiptap Ready Ready Preview, Comment Jan 27, 2026 4:18pm

Request Review

@AliKdhim87 AliKdhim87 linked an issue Jan 20, 2026 that may be closed by this pull request
12 tasks
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
apps/overige-objecten-api/src/utils/getVacData.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

gap: var(--utrecht-preview-sidebar-nav-gap);
}

.utrecht-preview-sidebar__button {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is het echt nodig om een nieuwe button hiervoor te maken ipv Utrecht buttons hergebruiken?

--utrecht-button-secondary-action-hover-border-color: var(--utrecht-preview-sidebar-button-hover-border-color);
}

.utrecht-preview-sidebar__button--active {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ik vind iets als --current vaak meer gepast omdat active te verwarren is met :active pseudo class

Comment on lines 9 to 15
const { slug, secret, apiToken, uuid } = req.query as {
slug?: 'vac' | 'kennisartikelen';
secret?: string;
// status?: 'DRAFT' | 'PUBLISHED'; this will be enable when we migrate to Strapi v5 with draft and publish system
apiToken?: string;
uuid?: string;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Nog even aan het nadenken hier. Dit stopt zowel de api token als secret in de URL. Dat voelt gek (ivm url logging en what not dergelijke waar die tokens dan zichtbaar zijn). Maar ik zie ook niet echt een andere aanpak zonder de koppeling vanaf strapi te implementeren en iets met een sessie te doen. Is dit een probleem?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ja, dat is inderdaad een goed punt, het is beter om de apiToken niet in de URL op te nemen. In plaats daarvan kan het naar de overige objecten-API worden verplaatst als een ENV variable, dan wordt het veiliger.

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.

Migratie: preview-button (Strapi v5)

3 participants