Skip to content

Offboard Wix: 4 marketing pages + contact form#351

Open
kylefritz wants to merge 32 commits into
masterfrom
wix-marketing-pages
Open

Offboard Wix: 4 marketing pages + contact form#351
kylefritz wants to merge 32 commits into
masterfrom
wix-marketing-pages

Conversation

@kylefritz

@kylefritz kylefritz commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Folds the four marketing pages (/, /about, /subscribe, /contact) from the Wix-hosted motzibread.com into the Rails app, pixel-matched to the live Wix design (fonts/colors captured via DevTools: Raleway/Oswald/EB Garamond, cream #FFEED6 / terracotta #D3725F / purple #5B4062). Closes #334.

  • Marketing shell: MarketingController base (public, skips push_gon), marketing.html.erb layout + marketing.scss scoped under body.marketing so styles can't leak into /menu or /admin
  • Home cutover: / renders the marketing home instead of redirecting to /menu; post-login still lands on /menu via after_sign_in_path_for (behavior-preserving); /signout round-trip unchanged
  • Contact form: ContactMessage model + ActiveAdmin triage (/admin/contact_messages, newest-first) + ContactMailer.notify_bakery (text-only, CONTACT_INBOX env with info@motzibread.com default, submitter as Reply-To); honeypot field + rack-attack throttle 5/hr/IP (verified solid_cache supports the atomic increments the throttle needs); server-captured user agents truncated to the column cap
  • Assets: 10 Wix images mirrored to s3://motzi/public/marketing/ via one-shot bin/rails marketing:fetch_assets (oversized originals re-fetched at display resolution — about hero 8.9MB → 810KB); map at docs/superpowers/specs/marketing-assets-map.md
  • Holiday menu: MarketingHelper#holiday_menu_link surfaces Menu.current_holiday in the nav, replacing the old Wix → motzibread.square.site flow
  • Visual QA: test/visual/marketing-screenshots.spec.ts (Playwright + Claude Haiku, manual not CI) — 8/8 passing, all pages STATUS: ok at mobile + desktop

Out of scope per spec: newsletter signup bar (MailerLite embed) and live IG feed (replaced with a static follow link).

Before merging

  • Set CONTACT_INBOX on Heroku (defaults to info@motzibread.com if unset; confirm with Maya/Russell): heroku config:set CONTACT_INBOX=... --app motzibread

Test plan

  • CI: Rails suite (467 runs, 0 failures), JS suite (53 pass), bun run typecheck clean
  • All four pages verified in-browser against the live Wix site (desktop + 390px mobile)
  • Contact form submitted end-to-end in-browser: flash notice renders, row persists with IP/UA, appears in /admin/contact_messages (test rows cleaned up)
  • /menu and /admin unaffected (auth seams verified; marketing layout doesn't leak)
  • Signed in as admin at /: Admin + Account links appear; /signout redirects back to /
  • Email order links unaffected (all order/reminder mailers use current_menu_url)
  • bunx playwright test test/visual/marketing-screenshots.spec.ts — 8/8
  • After deploy: verify the four pages on motzibread.herokuapp.com and send a real contact-form test to the bakery inbox

Follow-ups (separate work)

  • Phase 2 DNS cutover: point motzibread.com at Heroku, retire Wix subscription
  • Retire motzibread.square.site once holiday menus run through the in-app flow
  • Content audit with Maya/Russell — phone, hours, retail partners, owner blurb, and the hard-coded "Currently Sold Out" badge on /subscribe may be stale
  • Setting.holiday_menu_id has no teardown — after a holiday ends the nav link persists until manually cleared (consider auto-expiry)
  • The Wix announcement bar (pre-order link + hours) wasn't ported; home's Find Us section covers the same info

🤖 Generated with Claude Code

Post-review updates (2026-07-14)

  • Merged master (Rubocop adoption, uptime monitoring, order-item price snapshots) and brought the branch's files in line with the new lint config
  • Holiday gating: the marketing nav link now requires the holiday menu to still be orderable (can_publish?), not just a lingering Setting.holiday_menu_id
  • Subscribe pricing renders from CreditBundle (the rows checkout charges) instead of Wix's stale $182/$98 copy
  • Pixel-fidelity pass from side-by-side screenshots vs motzibread.com: Mulish body font (Wix uses Avenir Light), full-bleed home hero with overlaid tagline boxes, purple announcement bar (hours + pre-order link), Wix-style underline contact form, three-column footer, accent-colored section headings, restored About grain-movement sentence
  • Integration: GA + ahoy + browser error reporter now run on marketing pages (new marketing pack, shared _analytics partial), per-page meta descriptions + OG tags, sign-out link in the nav
  • Cutover-ready: CanonicalHostRedirect middleware — set CANONICAL_HOST=motzibread.com on Heroku at DNS flip and herokuapp URLs 301 to the custom domain (no-op until then)
  • CONTACT_INBOX=motzi.bread@gmail.com set on Heroku (v521)

Screenshots

about

about

subscribe

subscribe

contact

contact

kylefritz and others added 27 commits June 11, 2026 12:26
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ibe /contact

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the stub view with the full Subscription Details page ported
from the live Wix site (scraped 2026-06-11): hero, sold-out badge, Why
Subscribe, How It Works sections, credit pricing, and CTA.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds ContactMailer#notify_bakery (text-only, Reply-To set to the
submitter) and wires it into ContactController#create via deliver_later.
Honeypot submissions are intentionally excluded. CONTACT_INBOX env var
controls the destination (defaults to info@motzibread.com).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Squish the user-supplied name in the subject and From line so a
multi-line name can't inject headers or visually spoof body content.
Use layout false — the shared text layout's "Thanks!!" sign-off is
customer-facing and odd on an internal notification.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds MarketingHelper#holiday_menu_link which calls Menu.current_holiday
and renders a link (class marketing-nav-holiday) when a holiday menu is
active, or returns nil when none is set. Wired into _marketing_header
after the Order link, replacing the old Wix → Square holiday-preorder
flow. Refs #334.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`/` now renders a full marketing home page (hero illustration, Find Us
hours, Subscriptions CTA, Your Neighbors bio) instead of redirecting to
/menu. HomeController inherits MarketingController for layout + auth
skip. signout action preserved verbatim.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Before the cutover, sign-in landed on / which redirected to /menu.
Now / renders the marketing home, so override after_sign_in_path_for
to send members to /menu (stored_location_for still wins when set).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mirrors the existing email-screenshots visual test pattern. Covers the four
new marketing pages (home, about, subscribe, contact) at mobile (390px) and
desktop (1280px) viewports. Each screenshot is reviewed by claude-haiku-4-5
using a marketing-specific prompt; the test fails if STATUS is "broken".

Manual only — not wired into CI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A garbled or empty model response previously yielded status "unknown",
which silently passed the not-"broken" assertion. Now assert status is
positively "ok" or "warning". Also type the page param as Page instead
of any.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ot notice parity

- Replace text logo with Motzi image (81×54) in marketing header
- Replace text "IG" link with Instagram icon image in header nav (24×24)
- Add matching Instagram icon link to marketing footer nav (Wix fidelity)
- Update marketing.scss: logo img sizing, nav/footer icon sizing
- Document CONTACT_INBOX env var in CLAUDE.md after Analysis Replies section
- Unify honeypot redirect notice with real success notice (removes fingerprint)
- Sync rake task inline comments with corrected asset map descriptions

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kylefritz and others added 2 commits July 13, 2026 23:44
# Conflicts:
#	app/controllers/home_controller.rb
#	config/initializers/rack_attack.rb
#	db/schema.rb
#	test/controllers/home_controller_test.rb
Master adopted repo-wide RuboCop after this branch was cut; bring the
branch's new files in line so the lint job passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kylefritz and others added 3 commits July 14, 2026 00:26
…m CreditBundle

Setting.holiday_menu_id lingers after a holiday ends, so the marketing
nav kept advertising a menu that no longer accepts orders (the member
app handles this gracefully with a closed state; marketing shouldn't
advertise it at all).

The subscribe page hardcoded Wix's stale $182/$98 pricing — 7-13%
below what checkout actually charges. Render from the same
CreditBundle rows the purchase flow uses so copy can't drift again.

Refs #334

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Visual fixes from side-by-side screenshot audit against motzibread.com:
- Body font: EB Garamond serif -> Mulish light (Wix uses Avenir LT
  Light / DIN Next Light; Mulish is the closest Google Fonts stand-in)
- Home hero: full-bleed illustration with the three-line brick-red
  tagline overlaid in cream highlight boxes, as on Wix
- Purple announcement bar under the header (pre-order link + hours;
  Wix renders it as a dismissible overlay, ours is a solid band)
- Contact form: underline-only fields, placeholder labels with required
  asterisks, name/email side by side, plain-text Send (labels stay in
  the markup, visually hidden)
- Section headings: Mulish instead of Oswald; terracotta on About,
  purple uppercase on Subscribe (with Wix's trailing dash quirk)
- Footer: Wix three-column layout (logo + vertical nav / one-line
  terracotta address / IG), stacked right-aligned credits
- About: restore the 'local grain movement' sentence Wix had; its
  'here' link is dead on Wix, pointed at Common Grain Alliance pending
  owner confirmation
- Sold-out badge angled like Wix's sticker

Integration:
- Marketing pages now load GA (shared layouts/_analytics partial), the
  browser error reporter, and ahoy tracking via a new marketing pack
- Per-page meta descriptions + OpenGraph tags
- Sign out link in the marketing nav for signed-in users
- CanonicalHostRedirect middleware: set CANONICAL_HOST at DNS cutover
  and motzibread.herokuapp.com 301s to the custom domain (no-op until
  then; health checks exempt)

Refs #334

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The subscription concept is legacy: creating an account just joins the
weekly menu email list (sign-up sets receive_weekly_menu), and credits
are an optional pre-purchase for a per-loaf discount. The Wix copy this
branch ported still sold 'subscriptions', including a hardcoded
'Currently Sold Out' badge that contradicts prod, where
Setting.accepting_subscribers is true.

- /subscribe: 'How It Works' page — weekly menu email, then credits
- Nav label Subscriptions -> How It Works (header + footer)
- Home purple band: 'Get the Weekly Menu'
- CTA: SUBSCRIBE NOW -> SIGN UP NOW
- Sold-out badge now renders only when accepting_subscribers is off

Refs #334

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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