Skip to content

refactor(hubspot): deduplicate expert-consultation and newsletter form logic#1771

Open
samuv wants to merge 4 commits intotalk-to-expertfrom
pass-instance-id
Open

refactor(hubspot): deduplicate expert-consultation and newsletter form logic#1771
samuv wants to merge 4 commits intotalk-to-expertfrom
pass-instance-id

Conversation

@samuv
Copy link
Collaborator

@samuv samuv commented Mar 19, 2026

This is a stacked PR that need to be merged after this

  • Extract shared HubSpot submission logic, dismissal check, and constants into renderer/src/common/lib/hubspot.ts
  • Add useHubSpotForm hook for consent state, instance ID fetching, and pre-wired submit function
  • Extract shared dialog leaf components (HubSpotDialogContent, SuccessDialogContent, ConsentCheckbox, PrivacyFooter) into hubspot-form-parts.tsx
  • Migrate both expert-consultation banner and newsletter modal to use shared utilities, hook, and components
  • Pass instance_id as a hidden field in both HubSpot form submissions

@samuv samuv self-assigned this Mar 19, 2026
@samuv
Copy link
Collaborator Author

samuv commented Mar 19, 2026

/build-test

@github-actions
Copy link
Contributor

Build Artifacts for PR #1771

Platform Architecture Status
macOS arm64 ✅ Ready
macOS x64 ✅ Ready
Windows arm64 ✅ Ready
Windows x64 ✅ Ready
Linux arm64 ✅ Ready
Linux x64 ✅ Ready

Download artifacts from workflow run

Version: pr-1771 | Artifacts expire in 7 days | Triggered by @samuv

Note: macOS builds are signed (not notarized). Windows and Linux builds are unsigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants