Skip to content

Commit 1ddb8fa

Browse files
committed
fix(ux): make site tour optional and clear
1 parent df20489 commit 1ddb8fa

2 files changed

Lines changed: 13 additions & 33 deletions

File tree

‎app/layout.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import "driver.js/dist/driver.css";
99
import "./globals.css";
1010
import { ThemeProvider } from "@/components/theme-provider";
1111
import { SiteChrome } from "@/components/site-chrome";
12-
import { SmoothCursor } from "@/components/ui/smooth-cursor";
1312

1413
const anton = Anton({
1514
subsets: ["latin"],
@@ -389,7 +388,6 @@ export default function RootLayout({
389388
}}
390389
/>
391390
<ThemeProvider>
392-
<SmoothCursor />
393391
<SiteChrome>{children}</SiteChrome>
394392
<Analytics />
395393
<SpeedInsights />

‎components/experience-provider.tsx‎

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { ScrollTrigger } from "gsap/ScrollTrigger";
1717
import Lenis from "lenis";
1818
import type { Driver, DriveStep } from "driver.js";
1919

20-
const TOUR_STORAGE_KEY = "bnb-cinematic-tour-v1";
2120
const MOTION_STORAGE_KEY = "bnb-immersive-motion";
2221

2322
type ExperienceContextValue = {
@@ -71,7 +70,6 @@ export function ExperienceProvider({ children }: { children: ReactNode }) {
7170
});
7271
const progressRef = useRef<HTMLDivElement>(null);
7372
const tourRef = useRef<Driver | null>(null);
74-
const autoTourStartedRef = useRef(false);
7573

7674
useEffect(() => {
7775
setSettledPath(null);
@@ -236,9 +234,9 @@ export function ExperienceProvider({ children }: { children: ReactNode }) {
236234
{
237235
element: document.querySelector('[data-tour="navigation"]'),
238236
popover: {
239-
title: "the map",
237+
title: "Site navigation",
240238
description:
241-
"seven doors, one network. move between the work, the people, and the public record from here.",
239+
"Use these links to explore our events, programmes, impact, team, and press resources.",
242240
side: "bottom",
243241
align: "center",
244242
},
@@ -248,39 +246,39 @@ export function ExperienceProvider({ children }: { children: ReactNode }) {
248246
document.querySelector('[data-tour="page-hero"]') ??
249247
document.querySelector("main h1"),
250248
popover: {
251-
title: "start with the claim",
249+
title: "About this page",
252250
description:
253-
"each page opens with the thing it can prove. the rest of the scroll is the evidence.",
251+
"This introduction gives you the key information first. Scroll down for details and supporting work.",
254252
side: "bottom",
255253
align: "start",
256254
},
257255
},
258256
{
259257
element: document.querySelector('[data-tour="prospectus"]'),
260258
popover: {
261-
title: "take the full brief",
259+
title: "Partnership prospectus",
262260
description:
263-
"the partnership prospectus puts the whole story in one file. download it, forward it, and use it to start the serious conversation.",
261+
"Download our 2026 prospectus for partnership opportunities, programmes, reach, and contact information.",
264262
side: "bottom",
265263
align: "start",
266264
},
267265
},
268266
{
269267
element: getTopLevelSections()[1] ?? getTopLevelSections()[0] ?? null,
270268
popover: {
271-
title: "follow the build",
269+
title: "Scroll progress",
272270
description:
273-
"the chapters sharpen as they enter the frame. scroll normally; the site keeps your place without taking over.",
271+
"The page marker shows which section you are reading and how far you have progressed.",
274272
side: "top",
275273
align: "start",
276274
},
277275
},
278276
{
279277
element: document.querySelector('[data-tour="footer-trust"]'),
280278
popover: {
281-
title: "the rules are public",
279+
title: "Trust center",
282280
description:
283-
"safety, privacy, conduct, and brand stewardship live here. being teen-led still means being accountable.",
281+
"Read our safety, privacy, conduct, and intellectual-property policies from the footer.",
284282
side: "top",
285283
align: "center",
286284
},
@@ -312,12 +310,11 @@ export function ExperienceProvider({ children }: { children: ReactNode }) {
312310
popoverClass: "bnb-driver-popover",
313311
showProgress: true,
314312
progressText: "{{current}} / {{total}}",
315-
nextBtnText: "next",
316-
prevBtnText: "back",
317-
doneBtnText: "done",
313+
nextBtnText: "Next",
314+
prevBtnText: "Back",
315+
doneBtnText: "Done",
318316
steps,
319317
onDestroyed: () => {
320-
window.localStorage.setItem(TOUR_STORAGE_KEY, "seen");
321318
tourRef.current = null;
322319
},
323320
});
@@ -326,21 +323,6 @@ export function ExperienceProvider({ children }: { children: ReactNode }) {
326323
tour.drive();
327324
}, [motionEnabled]);
328325

329-
useEffect(() => {
330-
if (
331-
pathname !== "/" ||
332-
autoTourStartedRef.current ||
333-
window.localStorage.getItem(TOUR_STORAGE_KEY) ||
334-
window.innerWidth < 900
335-
) {
336-
return;
337-
}
338-
339-
autoTourStartedRef.current = true;
340-
const timer = window.setTimeout(startTour, 1300);
341-
return () => window.clearTimeout(timer);
342-
}, [pathname, startTour]);
343-
344326
useEffect(() => () => tourRef.current?.destroy(), [pathname]);
345327

346328
const toggleMotion = useCallback(() => {

0 commit comments

Comments
 (0)