Skip to content

feat: shared mock-up banner across all research prototypes#18

Merged
yepzdk merged 4 commits intomainfrom
feature/shared-mock-banner
Apr 29, 2026
Merged

feat: shared mock-up banner across all research prototypes#18
yepzdk merged 4 commits intomainfrom
feature/shared-mock-banner

Conversation

@yepzdk
Copy link
Copy Markdown
Contributor

@yepzdk yepzdk commented Apr 29, 2026

Summary

  • Introduces a shared mock-banner component (docs/public/design-system/v1/mock-banner.{css,js}) so every research prototype renders a consistent "this is a mock" strip from one place
  • Adds a CI check (npm run lint:mocks, wired into verify_build.yml) that fails the build if a new prototype HTML forgets the banner; supports an allowlist for deliberate exceptions
  • Migrates all eight prototypes onto the shared component (and gives book-aarhus, deltag-aarhus-timeline, wcag-contrast-checker a banner for the first time); deltag-aarhus is allowlisted and keeps its intentional red staging-style banner

Notes

  • Banner is loaded outside .ds so prototypes that opt out of the design system can still use it
  • Custom labels (e.g. salary-negotiation, climate-nudging, agentic-orchestration) carried over via data-banner-text
  • See docs/projects/design-system/components.md → "Mock banner" for the full usage docs

Test plan

  • npm run docs:build — passes locally
  • npm run lint:mocks — exit 0 with all banners present; verified exit 1 when banner is removed from a single file
  • Visual check of each migrated mock via task dev / npm run docs:dev, especially:
    • salary-negotiation (dropped .app-layout { padding-top: 32px } — body padding now set by JS)
    • agentic-orchestration (dropped .sidebar { padding-top: 28px })
    • climate-nudging mocks (dark backgrounds, banner now light yellow instead of blue)
  • Confirm deltag-aarhus red banner still renders unchanged

🤖 Generated with Claude Code

yepzdk and others added 4 commits April 29, 2026 12:00
Standalone CSS+JS pair under design-system/v1/ that any prototype can
load to render a consistent "this is a mock" banner. Loaded outside .ds
so prototypes that opt out of the design system can still use it. JS
auto-injects the markup, sets body padding-top, and supports a
data-banner-text override.

Co-authored-by: Claude <noreply@anthropic.com>
scripts/check-mock-banners.mjs scans docs/public/projects/**/*.html and
fails if any prototype does not reference the shared mock-banner.js. An
ALLOWLIST keeps deliberate exceptions (deltag-aarhus uses a red banner
that mimics aarhus.dk staging). Wired into verify_build.yml as
"npm run lint:mocks".

Co-authored-by: Claude <noreply@anthropic.com>
Removes per-prototype banner copies (six different inline implementations
across yellow/blue/minimal styles) and switches every mock HTML to load
the shared design-system/v1/mock-banner component. Prototypes with
custom labels (salary-negotiation, climate-nudging × 3,
agentic-orchestration) keep their text via data-banner-text. Three
prototypes that previously had no banner at all (book-aarhus,
deltag-aarhus-timeline, wcag-contrast-checker) gain the default banner.
deltag-aarhus is unchanged — it stays on the lint allowlist with its
intentional red staging-style banner.

Co-authored-by: Claude <noreply@anthropic.com>
Adds a "Mock banner" section to the design-system components page,
notes the new files in the v1 README, extends the CLAUDE.md "Adding a
new research project" checklist with the banner requirement, and
records the change under [Unreleased] in CHANGELOG.md.

Co-authored-by: Claude <noreply@anthropic.com>
@yepzdk yepzdk force-pushed the feature/shared-mock-banner branch from f75e531 to 22fb01d Compare April 29, 2026 10:01
@yepzdk yepzdk requested a review from jeppekroghitk April 29, 2026 10:03
@yepzdk yepzdk merged commit 3ee9b08 into main Apr 29, 2026
1 check passed
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