SSWConsulting / SSWConsulting/SSW.Website
💸 Perf - Mount the Eventbrite Popup only when it opens
@isaaclombardssw is already working on this.
Since Jul 23, 2026.
- Dominant language
- HTML
- Stars
- 14
- Forks
- 10
- Avg merge
- 13h 51m
- Merged PRs (30d)
- 38
Description
Sub-issue of the AI for Business Leaders performance PBI. Fully isolated.
Description
Blocks 5 and 37 of content/eventsv2/ai-for-business-leaders.json are the same "Pick your city" card carousel, four cards each — so eight EmbeddedCardButtons render, each with an eventbriteEventId.
components/eventbrite/eventbriteModalButton.tsx correctly defers the Eventbrite widget script until the user opens a modal — that part is well done and should stay. But the Popup itself is mounted unconditionally (the comment notes this is for the close animation), so eight copies of react-responsive-modal plus its global stylesheet are live in the tree at all times.
Proposed solution
- Render the
Popuponly once it has been opened — track a "has ever opened" flag so the close animation still plays, but nothing mounts on first paint - Alternatively, hoist a single shared modal to the page level and have the buttons drive it, so eight CTAs cost one modal
- Check whether
react-responsive-modal's stylesheet can be scoped rather than imported globally
Acceptance criteria
- No modal DOM or
react-responsive-modalcode is mounted on initial page load - Clicking any "Reserve my seat" CTA still opens the Eventbrite checkout, and the open/close animation is unchanged
- Opening a second card's checkout after closing the first still works (no stacked iframes)
- The existing script-timeout fallback link still appears when the Eventbrite script fails
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.