Conversation
…c prop, import site.json in contact-us
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.
2 of 5 tasks
✅ Deploy Preview for flowfuse-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
Contributor
Author
|
Landed through #5906, closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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