mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 01:40:13 -04:00
701f1602c6
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Refactor + feature ## What is the current behavior? The AWS Activate offer page used a one-off `HubSpotFormEmbed` component (an iframe-style HubSpot script embed) living under `apps/www/_go/lead-gen/components/`. It was single-destination (HubSpot only) and not reusable. Closes [DEBR-266](https://linear.app/supabase/issue/DEBR-266). ## What is the new behavior? Adds a reusable `MarketingForm` component to the `marketing` package that fans out submissions to HubSpot, Customer.io, and Notion in parallel via the existing `submitFormAction` server action. The go-page `FormSection` is now a thin adapter on top of `MarketingForm`, and `aws-activate-offer.tsx` uses `MarketingForm` directly. The legacy `HubSpotFormEmbed` is deleted. ## Additional context - `MarketingForm` is exported from `marketing` so it can be used outside go pages. - Customer.io / Notion fan-out for AWS Activate is wired but not yet configured — drop in `crm.customerio` / `crm.notion` blocks once [DEBR-265](https://linear.app/supabase/issue/DEBR-265) lands. - The original HubSpot embed had conditional field formatting which the new form does not replicate; verify HubSpot field internal names (`firstname`, `lastname`, `email`, `company`, `aws_account_id`) match the target form before merging. - Requires `HUBSPOT_PORTAL_ID` env to point at portal `19953346` (was previously hardcoded in the embed). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * New reusable marketing form with responsive two-column layout, validation, error display, success UI or redirect, optional title/description and markdown disclaimer. * Added URL and checkbox field types plus conditional field visibility. * HubSpot embed accepts typed props and improves script loading with retry and clearer error logging. * **Refactor** * Forms consolidated into a shared marketing module; form sections now delegate to the shared form component. <!-- end of auto-generated comment: release notes by coderabbit.ai -->