Skip to content

Commit a87c7c8

Browse files
committed
chore: remove narrating homepage comments
1 parent 5f763d7 commit a87c7c8

26 files changed

Lines changed: 179 additions & 477 deletions

apps/web/app/(site)/Navbar.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ interface NavbarProps {
99
stars?: string;
1010
}
1111

12-
/**
13-
* Flat, full-bleed header: logo and links on the left, a text link plus an
14-
* outlined and a filled action on the right. It sits flush at the top of the
15-
* viewport so page content passes underneath it rather than around a pill.
16-
*/
1712
export const Navbar = ({ stars }: NavbarProps) => {
1813
return (
1914
<NavbarFrame>

apps/web/components/pages/HomeTwo/Eyebrow.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ import { classNames } from "@cap/utils/helpers";
22
import type { ReactNode } from "react";
33
import { EYEBROW, INK } from "./theme";
44

5-
/**
6-
* 12px uppercase mono eyebrow with a small accent square, the way Intercom
7-
* marks its sections. `color` covers the dark band; `accent` picks up the
8-
* section's mode hue.
9-
*/
105
export const Eyebrow = ({
116
children,
127
accent = "#8DBCF0",

apps/web/components/pages/HomeTwo/Faq.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ import { homepageCopy } from "@/data/homepage-copy";
22
import { Eyebrow } from "./Eyebrow";
33
import { BODY_TEXT, H_SECTION, MODE_THEME } from "./theme";
44

5-
/**
6-
* The homepage FAQ, same questions and answers, rebuilt as hairline rows with
7-
* a plus that turns into a minus. Plain `details` elements, so it opens with
8-
* no JavaScript and stays keyboard native.
9-
*/
105
export const Faq = () => (
116
<section className="px-5 py-20 lg:py-28">
127
<div className="mx-auto grid max-w-[1100px] gap-12 lg:grid-cols-[minmax(0,340px)_minmax(0,1fr)] lg:gap-20">

apps/web/components/pages/HomeTwo/Features.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ import {
2222
type ModeKey,
2323
} from "./theme";
2424

25-
/**
26-
* The homepage's "built for how you actually work" grid, in the new type and
27-
* colour system. Same eight promises, one accent per card so the row reads in
28-
* the four mode hues rather than one flat block.
29-
*/
30-
3125
type Feature = {
3226
title: string;
3327
body: string;

apps/web/components/pages/HomeTwo/Hero.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ const WindowsGlyph = ({ className }: { className?: string }) => (
8181
</svg>
8282
);
8383

84-
/** Small muted link to /download for the platforms not shown on the button. */
8584
const AltIcon = ({
8685
label,
8786
children,
@@ -101,8 +100,7 @@ const AltIcon = ({
101100

102101
export const Hero = () => {
103102
const { platform, isIntel } = useDetectPlatform();
104-
// Default the display to macOS while detection resolves (same pattern as
105-
// the live homepage Header): majority platform, identical button size.
103+
106104
const displayPlatform = platform ?? "macos";
107105
const isWindows = displayPlatform === "windows";
108106
const isLinux = displayPlatform === "linux";
@@ -112,10 +110,6 @@ export const Hero = () => {
112110
: getDownloadUrl(displayPlatform, isIntel);
113111

114112
return (
115-
// On desktop the hero takes the fold minus the laptop's peek and centres
116-
// itself in it, so the space above and below the block stays even instead
117-
// of piling up under the buttons. Capped, because on a tall monitor a
118-
// viewport-tall hero just reads as a hole.
119113
<section className="relative px-5 pb-12 pt-12 sm:pt-14 md:pb-4 md:pt-[56px]">
120114
<span
121115
data-header-sentinel
@@ -162,8 +156,7 @@ export const Hero = () => {
162156
)}
163157
Download free for {platformName}
164158
</Link>
165-
{/* Scrolls to the demo AND starts the tour, so the click has an
166-
unmistakable payoff instead of landing on an idle laptop. */}
159+
167160
<button
168161
type="button"
169162
onClick={() => {

apps/web/components/pages/HomeTwo/HeroHeadline.tsx

Lines changed: 16 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,11 @@ import {
1010
import { MacCursor, WindowsCursor } from "./cursors";
1111
import { H_HERO, INK, MODE_THEME, type ModeKey } from "./theme";
1212

13-
/**
14-
* The hero headline is a three-slot machine: capture verb, middle beat,
15-
* payoff. The slots keep their rhythm while the words are revised, so one
16-
* sentence re-reads as a different mode.
17-
*
18-
* Record. Edit. Share. (at rest)
19-
* Record. Stop. Instant Share. (Instant)
20-
* Record. Edit. Export. (Studio)
21-
* Screenshot. Beautify. Paste. (Screenshot)
22-
*
23-
* Nothing moves on its own: the mode bar sits above the line from the first
24-
* paint with a cursor leaning in beside it, and you click a mode to watch
25-
* the line get revised. The revision is staged like an edit on paper: a rule
26-
* strikes through the word in the incoming mode's colour, the struck word
27-
* lifts away, and the replacement rises into the gap while the slot width
28-
* glides so the line re-centres. Words that survive the change are never
29-
* struck, so you see exactly what the mode changes, which is why Studio only
30-
* crosses out the last word.
31-
*/
32-
3313
type SlideKey = ModeKey | "all";
3414

3515
type Slide = {
3616
key: SlideKey;
37-
/** [capture, middle, payoff] */
17+
3818
words: [string, string, string];
3919
};
4020

@@ -45,12 +25,11 @@ const SLIDES: Slide[] = [
4525
{ key: "screenshot", words: ["Screenshot.", "Beautify.", "Paste."] },
4626
];
4727

48-
/** The cursor's one line: it invites the click, then retires once you take it. */
4928
const NUDGE = "Click me \u{1F440}";
5029
const NUDGE_TOUCH = "Tap me \u{1F440}";
5130
const TOUCH_QUERY = "(max-width: 767px)";
5231
const TYPE_MS = 26;
53-
/** The cursor leans in first, then starts talking. */
32+
5433
const NUDGE_AT = 520;
5534
const TYPE_AT = NUDGE_AT + 260;
5635

@@ -73,25 +52,20 @@ const PILL_ICON = {
7352
screenshot: ScreenshotIcon,
7453
} as const;
7554

76-
/* --------------------------------------------------------------- timing -- */
77-
78-
/** Per-slot head start, so the revision runs left to right down the line. */
7955
const SLOT_DELAY = [0, 120, 240];
80-
/** Rule sweeps across the word. */
56+
8157
const STRIKE_MS = 260;
82-
/** Beat where the struck word just sits there, crossed out. */
58+
8359
const HOLD_MS = 110;
84-
/** Struck word (and its rule) lift away. */
60+
8561
const LIFT_MS = 260;
86-
/** Replacement rises in, overlapping the lift so the two read as one move. */
62+
8763
const RISE_MS = 520;
8864

8965
const LIFT_AT = STRIKE_MS + HOLD_MS;
9066
const RISE_AT = LIFT_AT + 150;
9167
const WIDTH_AT = LIFT_AT + 60;
9268

93-
/* ------------------------------------------------------------------ slot -- */
94-
9569
type Departing = { text: string; color: string; id: number };
9670

9771
type Swap = { text: string; gen: number; from: Departing | null };
@@ -104,9 +78,9 @@ const Slot = ({
10478
animate,
10579
}: {
10680
text: string;
107-
/** Ink for most slots, the mode's colour for the payoff. */
81+
10882
color: string;
109-
/** Colour of the cross-out rule: the incoming mode's. */
83+
11084
strike: string;
11185
delay: number;
11286
animate: boolean;
@@ -121,15 +95,14 @@ const Slot = ({
12195
gen: 0,
12296
from: null,
12397
}));
124-
// Holds the colour the slot was painted in for the word now leaving.
98+
12599
const paintedColor = useRef(color);
126100

127101
if (swap.text !== text) {
128102
setSwap({
129103
text,
130104
gen: swap.gen + 1,
131-
// A word that survives the mode change is never struck out: it just
132-
// stays put while its neighbours are revised around it.
105+
133106
from: animate
134107
? { text: swap.text, color: paintedColor.current, id: swap.gen + 1 }
135108
: null,
@@ -183,7 +156,6 @@ const Slot = ({
183156
transitionDelay: `${delay + WIDTH_AT}ms`,
184157
}}
185158
>
186-
{/* Sets the slot's height and its natural (target) width. */}
187159
<span ref={ghostRef} className="ht-slot-ghost" aria-hidden="true">
188160
{text}
189161
</span>
@@ -220,8 +192,6 @@ const Slot = ({
220192
);
221193
};
222194

223-
/* -------------------------------------------------------------- headline -- */
224-
225195
export const HeroHeadline = () => {
226196
const { platform } = useDetectPlatform();
227197
const [index, setIndex] = useState(0);
@@ -231,8 +201,6 @@ export const HeroHeadline = () => {
231201
const [asked, setAsked] = useState(true);
232202
const [reduced, setReduced] = useState(false);
233203

234-
// Match the download button: assume macOS while detection resolves, so the
235-
// arrow never swaps shape under the reader.
236204
const Arrow = platform === "windows" ? WindowsCursor : MacCursor;
237205

238206
useEffect(() => {
@@ -243,8 +211,6 @@ export const HeroHeadline = () => {
243211
return () => query.removeEventListener("change", sync);
244212
}, []);
245213

246-
// The cursor leans in, then types its line. Reduced motion gets both at
247-
// once, already finished.
248214
useEffect(() => {
249215
const text = window.matchMedia(TOUCH_QUERY).matches ? NUDGE_TOUCH : NUDGE;
250216
setNudgeText(text);
@@ -275,11 +241,9 @@ export const HeroHeadline = () => {
275241
const theme = slide.key === "all" ? null : MODE_THEME[slide.key];
276242
const accent = theme ? theme.glyph : INK;
277243

278-
// Clicking the mode you're already on puts the plain line back, so you can
279-
// always see what Cap changed.
280244
const pick = (target: number) => {
281245
setIndex((current) => (current === target ? 0 : target));
282-
// The cursor and its bubble have done their job the moment you click.
246+
283247
setAsked(false);
284248
};
285249

@@ -318,9 +282,6 @@ export const HeroHeadline = () => {
318282
})}
319283
</div>
320284

321-
{/* Nothing cycles on its own, so the cursor is what says the line is
322-
yours to change. It retires as soon as you take it up on the
323-
offer. */}
324285
<span
325286
aria-hidden="true"
326287
className={`ht-nudge ${nudge && asked ? "is-on" : ""}`}
@@ -392,8 +353,7 @@ const CSS = `
392353
}
393354
.ht-layer > span { position: relative; display: inline-block; }
394355
395-
/* The cross-out rule, drawn through the x-height and running a hair past
396-
the word at both ends the way a pen would. */
356+
397357
.ht-strike {
398358
position: absolute;
399359
left: -0.04em;
@@ -417,7 +377,7 @@ const CSS = `
417377
.ht-out { animation: ht-out ${LIFT_MS}ms cubic-bezier(0.4, 0, 0.75, 0.2) both; }
418378
.ht-in { animation: ht-in ${RISE_MS}ms cubic-bezier(0.18, 0.9, 0.22, 1) both; }
419379
420-
/* Caret for the nudge as it types itself out. */
380+
421381
.ht-caret {
422382
display: inline-block;
423383
width: 1.5px;
@@ -429,8 +389,7 @@ const CSS = `
429389
}
430390
@keyframes ht-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
431391
432-
/* The cursor leaning in beside the mode bar. Hidden on phones, where there
433-
is no room beside a wrapped bar and no cursor to speak of on touch. */
392+
434393
.ht-nudge {
435394
display: block;
436395
position: absolute;
@@ -449,8 +408,7 @@ const CSS = `
449408
opacity: 1;
450409
transform: translate3d(0, 0, 0) scale(1);
451410
}
452-
/* Bubble and cursor sit side by side, the tail on the bubble's right edge
453-
reaching across the gap to the arrow. */
411+
454412
.ht-nudge-float {
455413
display: flex;
456414
align-items: flex-start;
@@ -471,10 +429,7 @@ const CSS = `
471429
height: auto;
472430
filter: drop-shadow(0 2px 5px rgba(17, 17, 17, 0.28));
473431
}
474-
/* An iMessage bubble sitting to the left of the cursor with its tail aimed
475-
back at it. The mode bar and the page behind it are all white, so the chip
476-
needs its own colour to land, and it stays a size under the mode toggles
477-
(13px) so it reads as an aside rather than a fourth control. */
432+
478433
.ht-nudge-chip {
479434
position: relative;
480435
display: block;

apps/web/components/pages/HomeTwo/LoomBridge.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ import {
1111
MODE_THEME,
1212
} from "./theme";
1313

14-
/**
15-
* The Loom-switcher bridge. The comparison cluster is the best-converting
16-
* message on the site, so it earns a dedicated moment on the homepage:
17-
* one-click library import plus the standing MIGRATE20 offer.
18-
*/
1914
export const LoomBridge = () => (
2015
<section className="px-5 pb-4 pt-2">
2116
<div

apps/web/components/pages/HomeTwo/ModeWalkthrough.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ type Step = {
5050
Icon: ComponentType<{ className?: string }>;
5151
};
5252

53-
/**
54-
* Static cards for the stacked fallback (mobile, and anyone who prefers
55-
* reduced motion). The pinned experience is the DesktopDemo.
56-
*/
5753
const STEPS: Step[] = [
5854
{
5955
key: "instant",
@@ -161,8 +157,6 @@ const StackedSteps = ({ className }: { className?: string }) => (
161157
</div>
162158
);
163159

164-
/* -------------------------------------------------------------------------- */
165-
166160
export const ModeWalkthrough = () => {
167161
// `false` on the server and on the first client render, so the markup the
168162
// server produced (CSS-driven responsive split) hydrates identically.

apps/web/components/pages/HomeTwo/Pricing.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,8 @@ import {
2020
type ModeTheme,
2121
} from "./theme";
2222

23-
/**
24-
* The homepage's two plans in the new system. Prices come from the shared
25-
* pricing copy so the page can never drift from /pricing; the checkout itself
26-
* still lives there, so both actions link out rather than mounting Stripe.
27-
*/
28-
2923
const { commercial, pro, subtitle, lovedBy } = homepageCopy.pricing;
3024

31-
/** Sentence case and plain punctuation, the house voice on this page. */
3225
const BLURB = {
3326
commercial:
3427
"A commercial licence for the Cap desktop app, with unlimited local recording and editing.",

apps/web/components/pages/HomeTwo/Testimonials.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ import { testimonials } from "@/data/testimonials";
55
import { Eyebrow } from "./Eyebrow";
66
import { BODY_TEXT, BTN_SECONDARY, H_SECTION, MODE_THEME } from "./theme";
77

8-
/**
9-
* The homepage's wall of quotes, straightened out: real cards in a masonry
10-
* column instead of a rotated scatter, so the type stays on the same grid as
11-
* the rest of the page. Steven Tey is deliberately absent, he leads the
12-
* ownership section above.
13-
*/
14-
158
const PICKS = [
169
"Olivia",
1710
"CJ",

0 commit comments

Comments
 (0)