Skip to content

feat(campaign): a Black Friday notice, light mode light throughout, no dot, arrow or glow - #190

Merged
datlechin merged 2 commits into
mainfrom
feat/campaign-modal
Nov 28, 2026
Merged

datlechin merged 2 commits into
mainfrom
feat/campaign-modal

Conversation

@datlechin

@datlechin datlechin commented Nov 28, 2026 •

Copy link
Copy Markdown
Member
  • CampaignNotice opens once per page load while the sale is live. From 640px it is a modal <dialog> on --raised, in the reader's theme: the percentage off, Pro one-time and Pro yearly as ruled rows with struck list prices, the countdown, Buy Pro one-time for $47.40 (checkout with the sale's code), See both offers and Not now. Below 640px it is a card at the bottom that blocks nothing, following Google's guidance on intrusive dialogs.
  • It never renders in the server's HTML (the page sits in the edge cache), and it stays shut:
    • on /black-friday and Pricing (Banner::CAMPAIGN_NOTICE_HIDDEN_ON, sent as the banner prop's notice);
    • while the consent bar is asking on desktop, opening once it is answered;
    • for a reader whose regional discount takes more off (noticeOpens), so it never shows a price checkout does not charge;
    • once the reader has answered it, a click on an offer included. tablepro:campaign-closed holds {id}:notice, which keeps the banner; closing the banner still closes both. The privacy policy already lists the key as the closed sale notice.
  • Focus goes to the dialog itself; Escape, the backdrop and every action close it. The dialog closes once Polar's overlay has opened, which a modal would otherwise make inert.
  • useSettledRegionalPricing tells the notice when GET /v2/pricing has answered. The request is made only for a reader the notice may open for.
  • Countdown gains a row variant. All 12 catalogs gain campaign.notice, reusing the sale page's translated plan names, window and footnote.
  • The sale's banner, the license banner, the language bar and /black-friday lose the accent dot, the trailing arrows, the glow and the light under the pointer. The sale's banner writes its call to action out at every width; links that followed a sentence are underlined instead (WCAG 1.4.1).
  • Light mode is light throughout (owner, 2026-11-28): the sale's banner, its notice and /black-friday follow the reader's theme. The forced theme goes entirely: no data-theme-forced from Blade, no forceDark or alwaysDark, no sale theme-color, and the theme control shows on every page again. CLAUDE.md, positioning and the design system say so. The share card, an image shown off the site, keeps its black ground.
  • Fix: the language bar now takes the slot from the sale's banner. The rule that hid the banner lost on specificity, so both bars stacked; a test fails without the fix.
  • positioning.md (the notice, owner decision 2026-11-28), design-system.md and the analytics events in architecture.md (campaign_notice_view, campaign_notice_click, campaign_notice_close) are updated.
  • Contract: none
  • Waits for: nothing. The sale ends 2026-12-01 08:00 UTC; after that nothing here shows.
  • Tested:
    • npm run typecheck: passed, catalog parity included
    • npm run test:js: 248 passed, 0 failed (the two forced-theme tests are gone with forceDark)
    • npm run build: passed
    • vendor/bin/pint --test: passed
    • ./vendor/bin/pest: 1181 passed, 114 skipped (SSR)
    • REQUIRE_SSR=1 ./vendor/bin/pest --group=ssr with a local SSR service: 117 passed
    • Headless Chromium against a local build: in light mode no element on the homepage or /black-friday carries .dark; the notice opens; Escape stores black-friday-2026:notice and a reload keeps it shut with the banner still shown; it stays shut on /pricing and after the banner is closed. The sale's banner fits at 320, 360, 390, 768, 1024 and 1440px in all 12 languages (72 of 72).
    • Not tested locally: a real checkout from the notice (the API refuses localhost), and the consent bar wait (no analytics tag locally).

Screenshots

Light Dark
Notice, light Notice, dark
Sale page, light Sale page, dark
Mobile card, light Desktop, Vietnamese, dark
Mobile card, light Notice, Vietnamese

The sale's banner: no dot or arrow, in the reader's theme

Banner, light

Banner at 1440px, dark

Banner at 390px

The language bar takes the slot: one bar, not two

Language bar

🤖 Generated with Claude Code

…low on the sale

- CampaignNotice opens once per page load while the sale is live: a modal
  dialog from 640px (the two offers, the countdown, Buy Pro one-time, See both
  offers, Not now), a non-blocking card at the bottom below it.
- It stays shut on /black-friday and Pricing (the banner prop's `notice`),
  while the consent bar asks, for a reader whose regional discount takes
  more off, and once closed: `tablepro:campaign-closed` holds `{id}:notice`,
  which keeps the banner; closing the banner still closes both.
- The sale's banner, the license banner, the language bar and /black-friday
  lose the accent dot, the trailing arrows, the glow and the light under the
  pointer. The banner writes its call to action out at every width.
- The language bar now takes the slot from the sale's banner: the rule that
  hid it lost on specificity, so both bars stacked.
- The sale's banner, its notice and /black-friday follow the reader's theme
  instead of holding a dark island in light mode (owner, 2026-11-28).
- The forced theme goes: no `data-theme-forced` from Blade, no `forceDark`
  or `alwaysDark`, no sale `theme-color`, and the theme control shows on
  every page again.
- The banner sits on `--surface` under a `--rule` line; the dialog and the
  card on `--raised`.
- CLAUDE.md, positioning and the design system say so.
@datlechin datlechin changed the title feat(campaign): a Black Friday notice on load, and no dot, arrow or glow on the sale feat(campaign): a Black Friday notice, light mode light throughout, no dot, arrow or glow Nov 28, 2026
@datlechin
datlechin merged commit 4c741ff into main Nov 28, 2026
4 checks 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.

1 participant