Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(website): keep the sample workspace hidden until its entrance plays (#9471)
Jacob Beckermanfed6e7acef86
diff --git a/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsx b/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsxindex ab42dcf696..94b499b14f 100644--- a/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsx+++ b/apps/marketing/src/features/marketing/components/HomepageOpenSource.tsx@@ -113,6 +113,8 @@ function DesktopHomepageOpenSource(props: {class="homepage-embedded-demo workspace-demo"aria-label="Explore Macro interactively"id="interactive-demo"+ // animateDemoEntrance clears this; prerendered markup starts hidden too.+ data-entrance-waiting><div class="homepage-embedded-stage"><div class="homepage-embedded-wallpaper">diff --git a/apps/marketing/src/features/marketing/components/animateDemoEntrance.ts b/apps/marketing/src/features/marketing/components/animateDemoEntrance.tsindex 1da66bee33..5504d67484 100644--- a/apps/marketing/src/features/marketing/components/animateDemoEntrance.ts+++ b/apps/marketing/src/features/marketing/components/animateDemoEntrance.ts@@ -161,6 +161,15 @@ export function animateDemoEntrance(1200);};+ // Until the first scroll builds the keyframes, nothing hides the workspace.+ // Hold it at the entrance's first frame so it never shows, vanishes, and+ // reappears as the bubbles arrive.+ const syncWaiting = () => {+ section.toggleAttribute(+ 'data-entrance-waiting',+ !prepared && !engaged && !reduced.matches+ );+ };const update = () => {// A live edit can replace the constellation without remounting this// section. Detached sources measure as zero-sized boxes at (0, 0).@@ -172,6 +181,7 @@ export function animateDemoEntrance(measure();return;}+ syncWaiting();if (reduced.matches || engaged) return;const progress = Math.max(0,@@ -179,7 +189,10 @@ export function animateDemoEntrance();if (progress === lastProgress) return;lastProgress = progress;- if (!prepared && progress > 0) prepare();+ if (!prepared && progress > 0) {+ prepare();+ syncWaiting();+ }animations.forEach((animation) => {animation.currentTime = progress * 1450;});@@ -216,6 +229,7 @@ export function animateDemoEntrance(const settle = () => {engaged = true;clear();+ syncWaiting();};const frame = target.querySelector('iframe');let frameDocument: Document | null = null;@@ -249,5 +263,6 @@ export function animateDemoEntrance(scroller.removeEventListener('scroll', update);reduced.removeEventListener('change', measure);clear();+ section.removeAttribute('data-entrance-waiting');};}diff --git a/apps/marketing/src/features/marketing/components/homepage-open-source.css b/apps/marketing/src/features/marketing/components/homepage-open-source.cssindex aeb4f2b760..73124f40d3 100644--- a/apps/marketing/src/features/marketing/components/homepage-open-source.css+++ b/apps/marketing/src/features/marketing/components/homepage-open-source.css@@ -18,6 +18,8 @@}.homepage-embedded-wallpaper::before { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .45; mix-blend-mode: soft-light; background: url('../../../assets/desktop/gradient-grain.svg') repeat; }+/* The entrance's first frame, before animateDemoEntrance builds its keyframes. */+.homepage-embedded-demo[data-entrance-waiting] :is(.homepage-embedded-wallpaper, .homepage-demo-carousel) { opacity: 0; }.homepage-demo-travel { position: absolute; z-index: 3; inset: 0; pointer-events: none; }.homepage-demo-travel .feature-flow-icon, .homepage-demo-travel .feature-flow-core { display: grid; place-items: center; }