feat(tradein): white-label branded page for client «Практика» (#657) #672

Merged
bot-reviewer merged 1 commit from feat/tradein-657-brand into main 2026-05-29 16:09:24 +00:00
Collaborator

Adds ?brand=praktika white-label re-skin ("отдельная страничка под практику" = branded experience over the existing /trade-in page, no new route):

  • frontend/src/lib/useBrand.ts: reads ?brand= slug, fetches /api/v1/brand/{slug} (TanStack Query, mirrors useMe)
  • app/page.tsx: runtime override of --accent/--accent-2 CSS vars + .brand-active; full no-op when ?brand= absent
  • trade-in.css: Manrope (OPEN replacement for paid HalvarMittel), scoped to .brand-active; .brand-logo
  • Topbar.tsx: client logo (hotlink) + brand name when logo_url present
  • OfferCard.tsx: ?brand passthrough on the PDF link (backend already honors it)
  • migration 084_brand_praktika_fill.sql: fills praktika row (#235F49 green / #1FCECB cyan, hotlink logo, footer). 084 because 083 reserved by #656.

Validation: tsc --noEmit clean. next lint not runnable in this bundle (no eslint.config.js, ESLint v9) — matched existing eslint-disable convention for the external .
Notes: hotlinked logo is the magenta MARK only (no full wordmark) — paired with text name; consider self-hosting vs hotlink for prod (CORS/availability). Manrope pulled via Google Fonts @import.

Milestone 6 (Praktika demo). Closes #657

Adds ?brand=praktika white-label re-skin ("отдельная страничка под практику" = branded experience over the existing /trade-in page, no new route): - frontend/src/lib/useBrand.ts: reads ?brand= slug, fetches /api/v1/brand/{slug} (TanStack Query, mirrors useMe) - app/page.tsx: runtime override of --accent/--accent-2 CSS vars + .brand-active; full no-op when ?brand= absent - trade-in.css: Manrope (OPEN replacement for paid HalvarMittel), scoped to .brand-active; .brand-logo - Topbar.tsx: client logo (hotlink) + brand name when logo_url present - OfferCard.tsx: ?brand passthrough on the PDF link (backend already honors it) - migration 084_brand_praktika_fill.sql: fills praktika row (#235F49 green / #1FCECB cyan, hotlink logo, footer). 084 because 083 reserved by #656. Validation: tsc --noEmit clean. next lint not runnable in this bundle (no eslint.config.js, ESLint v9) — matched existing eslint-disable convention for the external <img>. Notes: hotlinked logo is the magenta MARK only (no full wordmark) — paired with text name; consider self-hosting vs hotlink for prod (CORS/availability). Manrope pulled via Google Fonts @import. Milestone 6 (Praktika demo). Closes #657
bot-backend added 1 commit 2026-05-29 15:52:35 +00:00
?brand=praktika re-skin: useBrand hook (reads ?brand= slug, fetches
/api/v1/brand/{slug}), runtime CSS-var override of accent palette +
Manrope font (open replacement for paid HalvarMittel), client logo in
Topbar, ?brand passthrough on the PDF link. No-op when ?brand= absent.
Migration 084 fills the praktika brand row (#235F49 / #1FCECB, logo, footer).

Closes #657
bot-reviewer approved these changes 2026-05-29 16:09:23 +00:00
bot-reviewer left a comment
Collaborator

White-label re-skin for Praktika (#657). Verified end-to-end: backend GET /api/v1/brand/{slug} + PDF ?brand= support + brands table/columns (slug,logo_url,primary_color,accent_color,footer_text) all exist on main; migration 084 UPDATEs existing praktika seed (idempotent, BEGIN/COMMIT, numbered to avoid 083 collision). Frontend: useBrand graceful null fallback (no-op without ?brand=), runtime CSS-var override with proper useEffect cleanup, encodeURIComponent on PDF query + slug, SSR-safe slug read, justified eslint-disable for external img. ADVISORY (non-blocking): Topbar logo hotlinks client live site (gk-praktika.ru/.../logo-pink.svg) and fallback-to-wordmark is keyed on logo_url being set, not load success -> broken external URL shows broken-image icon, not TI wordmark. Recommend self-hosting the asset + onError fallback; also verify logo-pink.svg is the correct asset vs green/cyan brand. APPROVE.

<!-- gendesign-review-bot: sha=5f6b0d6 verdict=approve --> White-label re-skin for Praktika (#657). Verified end-to-end: backend GET /api/v1/brand/{slug} + PDF ?brand= support + brands table/columns (slug,logo_url,primary_color,accent_color,footer_text) all exist on main; migration 084 UPDATEs existing praktika seed (idempotent, BEGIN/COMMIT, numbered to avoid 083 collision). Frontend: useBrand graceful null fallback (no-op without ?brand=), runtime CSS-var override with proper useEffect cleanup, encodeURIComponent on PDF query + slug, SSR-safe slug read, justified eslint-disable for external img. ADVISORY (non-blocking): Topbar logo hotlinks client live site (gk-praktika.ru/.../logo-pink.svg) and fallback-to-wordmark is keyed on logo_url being set, not load success -> broken external URL shows broken-image icon, not TI wordmark. Recommend self-hosting the asset + onError fallback; also verify logo-pink.svg is the correct asset vs green/cyan brand. APPROVE.
bot-reviewer merged commit 3b29936245 into main 2026-05-29 16:09:24 +00:00
bot-reviewer deleted branch feat/tradein-657-brand 2026-05-29 16:09:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#672
No description provided.