Skip to content

HubSpot meetings embed: new iframe per mount (follow-up to #5906) - #5910

Closed
dimitrieh wants to merge 7 commits into
mainfrom
fix/hubspot-meetings-embed-followup
Closed

dimitrieh wants to merge 7 commits into
mainfrom
fix/hubspot-meetings-embed-followup

Conversation

@dimitrieh

Copy link
Copy Markdown
Contributor

Description

Follow-up to #5906 and built on its branch, so its commits show here until it merges.

Each mount now asks HubSpot for a new iframe in the component's own container instead of re-attaching the earlier one, and the fallback stays until that iframe is actually in place. Withdrawing analytics consent removes the embed. The VPP blog post's "Book a Demo" pointed at the retired calendar and now links /book-demo/.

Known cost: HubSpot's script never removes its window listeners, so after a client-side revisit the old iframe's listener throws a TypeError in HubSpot's code. The calendar is unaffected.

Related Issue(s)

#5906

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
  • For blog PRs, an Art Request has been created (instructions)

Yndira-E and others added 7 commits October 2, 2026 16:09
Builds on the consent check from the previous commits and replaces the
retained-iframe approach:

- Each mount calls hbspt.meetings.create() for its own container (unique id
  from useId), so a page reached by client-side navigation gets a fresh,
  correctly addressed iframe without rewriting HubSpot's src by hand. This
  also keeps the current HubSpot utk, and lets two instances coexist.
- The fallback stays until an iframe is actually in the container, watched
  with a MutationObserver. HubSpot inserts it after create() returns, so
  setting embedded on script load emptied the slot early, and a blocked or
  stubbed script left neither calendar nor fallback.
- The script 'load' listener is removed on unmount, so a stale instance can
  no longer call create() on another page.
- Withdrawing analytics consent removes the embed.
- The VPP blog post linked the retired round-robin calendar through a mangled
  URL; it now links /book-demo/.

Known cost: HubSpot's script adds two window message listeners per iframe and
never removes them. After a client-side revisit, the old iframe's consent
listener throws "Cannot read properties of null (reading 'postMessage')" in
HubSpot's own code when the new iframe loads. The calendar is unaffected.
@dimitrieh dimitrieh mentioned this pull request Oct 5, 2026
2 of 5 tasks
@dimitrieh
dimitrieh requested a review from Yndira-E October 5, 2026 12:38
@netlify

netlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for flowfuse-website ready!

Name Link
🔨 Latest commit c2da0de
🔍 Latest deploy log https://app.netlify.com/projects/flowfuse-website/deploys/6ac39a2328c5f700081f170a
😎 Deploy Preview https://deploy-preview-5910--flowfuse-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 39 (🟢 up 7 from production)
Accessibility: 95 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@dimitrieh

Copy link
Copy Markdown
Contributor Author

Landed through #5906, closing.

@dimitrieh dimitrieh closed this Oct 5, 2026
@dimitrieh
dimitrieh deleted the fix/hubspot-meetings-embed-followup branch October 5, 2026 16:00
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.

2 participants