Skip to content

Commit 0d56580

Browse files
Make the quick start readable to someone who has not seen the wizard
A design and product review of the tabbed quick start found the VS Code panel narrated a wizard the reader has never seen, and led with a deep link that silently does nothing for the very person the tab is for. Copy: - The prerequisite now says the VS Code path still uses Docker, and that the extension never installs Docker or changes the user's system, rather than the jargon "in your VS Code environment". - Step 01 names what gets installed instead of pinning extension version 0.10.1, which is maintenance debt on a homepage and is noise for a new installer who gets the latest anyway. - Step 02 was a four-action transcript of wizard buttons; it now says click, allow, and follow the wizard. - Step 03 states the outcome, port and generated credentials, so the reader knows what they got. - The fallback names the likely cause instead of treating "no VS Code", "no extension", and "old extension" as the same thing. - The Docker steps drop the one that restated the command above it, add a first-run time expectation, and end on a concrete connect-and-query instead of "the setup you need". Structure: - Tabs are Terminal and VS Code. Labelling one "Docker" implied the other avoided Docker, when both start the same container. - Install the extension is now the primary action; the deep link is secondary, matching the order of the steps. - The card footer link follows the active tab and points at that path's full guide. Download packages is gone, since the hero already has Download pointing at the same page. - Each panel links to the other path so neither is hidden behind a tab. Presentation: - The tablist gets a solid active state and larger hit targets, so it reads as a control rather than as another badge between the Quick start chip and the numbered step markers. - The hero grid is items-start. It was items-center, and since the card is the taller column, switching tabs moved the DocumentDB headline. - Home and End keys move between tabs, per the ARIA authoring practices. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017dU6YABKoUxKLU2AB1qeH1
1 parent cb4c620 commit 0d56580

3 files changed

Lines changed: 132 additions & 63 deletions

File tree

‎app/components/QuickStartTabs.tsx‎

Lines changed: 77 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@ type QuickStartTabsProps = {
1717
vscodeDeepLinkUrl: string;
1818
/** Marketplace page, for visitors who do not have the extension yet. */
1919
vscodeMarketplaceUrl: string;
20+
/** Full guide for each path, linked from the footer of the matching panel. */
21+
dockerDocsUrl: string;
22+
vscodeDocsUrl: string;
2023
};
2124

25+
// "Terminal" rather than "Docker": both paths run the same Docker container, and labelling one
26+
// of them "Docker" implies the other avoids it.
2227
const TABS = [
23-
{ id: "docker", label: "Docker" },
28+
{ id: "terminal", label: "Terminal" },
2429
{ id: "vscode", label: "VS Code" },
2530
] as const;
2631

@@ -32,9 +37,9 @@ function StepList({ steps }: { steps: QuickStartStep[] }) {
3237
{steps.map((item) => (
3338
<li
3439
key={item.step}
35-
className="grid grid-cols-[auto_1fr] items-center gap-3 border-t border-neutral-800/80 px-4 py-3.5 first:border-t-0"
40+
className="grid grid-cols-[auto_1fr] items-start gap-3 border-t border-neutral-800/80 px-4 py-3.5 first:border-t-0"
3641
>
37-
<span className="inline-flex h-7 w-7 items-center justify-center rounded-full border border-blue-400/30 bg-blue-500/10 text-[11px] font-semibold text-blue-200">
42+
<span className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-blue-400/30 bg-blue-500/10 text-[11px] font-semibold text-blue-200">
3843
{item.step}
3944
</span>
4045
<p className="text-sm leading-6 text-gray-300">{item.description}</p>
@@ -50,32 +55,50 @@ export default function QuickStartTabs({
5055
vscodeSteps,
5156
vscodeDeepLinkUrl,
5257
vscodeMarketplaceUrl,
58+
dockerDocsUrl,
59+
vscodeDocsUrl,
5360
}: QuickStartTabsProps) {
54-
const [activeTab, setActiveTab] = useState<TabId>("docker");
61+
const [activeTab, setActiveTab] = useState<TabId>("terminal");
5562
const tabRefs = useRef<Record<string, HTMLButtonElement | null>>({});
5663

64+
const selectTab = (id: TabId) => {
65+
setActiveTab(id);
66+
tabRefs.current[id]?.focus();
67+
};
68+
5769
// Arrow keys move between tabs, which is what a tablist is expected to do; without it the
58-
// only way through is Tab, and that leaves the panel.
70+
// only way through is Tab, and that leaves the panel. Home/End jump to the ends, per the
71+
// ARIA authoring practices for tabs.
5972
const onTabKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {
60-
if (event.key !== "ArrowRight" && event.key !== "ArrowLeft") {
61-
return;
62-
}
63-
64-
event.preventDefault();
6573
const currentIndex = TABS.findIndex((tab) => tab.id === activeTab);
66-
const delta = event.key === "ArrowRight" ? 1 : -1;
67-
const next = TABS[(currentIndex + delta + TABS.length) % TABS.length];
6874

69-
setActiveTab(next.id);
70-
tabRefs.current[next.id]?.focus();
75+
switch (event.key) {
76+
case "ArrowRight":
77+
case "ArrowLeft": {
78+
event.preventDefault();
79+
const delta = event.key === "ArrowRight" ? 1 : -1;
80+
selectTab(TABS[(currentIndex + delta + TABS.length) % TABS.length].id);
81+
break;
82+
}
83+
case "Home":
84+
event.preventDefault();
85+
selectTab(TABS[0].id);
86+
break;
87+
case "End":
88+
event.preventDefault();
89+
selectTab(TABS[TABS.length - 1].id);
90+
break;
91+
default:
92+
break;
93+
}
7194
};
7295

7396
return (
7497
<div>
7598
<div
7699
role="tablist"
77100
aria-label="Ways to run DocumentDB locally"
78-
className="mb-4 inline-flex rounded-full border border-neutral-700 bg-neutral-900/80 p-1"
101+
className="mb-4 flex w-full rounded-full border border-neutral-700 bg-neutral-900/80 p-1 sm:inline-flex sm:w-auto"
79102
>
80103
{TABS.map((tab) => {
81104
const isActive = tab.id === activeTab;
@@ -95,9 +118,11 @@ export default function QuickStartTabs({
95118
tabIndex={isActive ? 0 : -1}
96119
onClick={() => setActiveTab(tab.id)}
97120
onKeyDown={onTabKeyDown}
98-
className={`rounded-full px-4 py-1.5 text-xs font-semibold transition-colors ${
121+
// Solid active state so the tablist reads as a control rather than as another
122+
// badge next to the "Quick start" chip and the numbered step markers.
123+
className={`flex-1 rounded-full px-5 py-3 text-sm font-semibold transition-colors sm:flex-none ${
99124
isActive
100-
? "bg-blue-500/20 text-blue-100"
125+
? "bg-blue-500 text-white"
101126
: "text-gray-400 hover:text-gray-200"
102127
}`}
103128
>
@@ -109,12 +134,23 @@ export default function QuickStartTabs({
109134

110135
<div
111136
role="tabpanel"
112-
id="quickstart-panel-docker"
113-
aria-labelledby="quickstart-tab-docker"
114-
hidden={activeTab !== "docker"}
137+
id="quickstart-panel-terminal"
138+
aria-labelledby="quickstart-tab-terminal"
139+
hidden={activeTab !== "terminal"}
115140
>
116141
<CommandSnippet command={dockerCommand} label="Docker" />
117142
<StepList steps={dockerSteps} />
143+
<p className="mt-4 text-sm leading-6 text-gray-400">
144+
Prefer to set it up from your editor? Use the{" "}
145+
<button
146+
type="button"
147+
onClick={() => selectTab("vscode")}
148+
className="font-semibold text-blue-300 underline-offset-2 transition-colors hover:text-blue-200 hover:underline"
149+
>
150+
VS Code
151+
</button>{" "}
152+
tab.
153+
</p>
118154
</div>
119155

120156
<div
@@ -124,34 +160,47 @@ export default function QuickStartTabs({
124160
hidden={activeTab !== "vscode"}
125161
>
126162
<p className="mb-4 text-sm leading-6 text-gray-400">
127-
Requires Docker Engine or Docker Desktop running Linux containers in
128-
your VS Code environment.
163+
Needs Docker Desktop or Docker Engine on the same machine as VS Code.
164+
The extension pulls the image, starts it, and saves the connection for
165+
you. It never installs Docker or changes your system.
129166
</p>
130167
<div className="flex flex-col gap-2 sm:flex-row">
131168
<Link
132169
href={vscodeMarketplaceUrl}
133170
target="_blank"
134171
rel="noopener noreferrer"
135-
className="inline-flex items-center justify-center rounded-lg border border-neutral-600 px-4 py-2.5 text-sm font-semibold text-gray-200 transition-colors hover:border-neutral-500 hover:bg-neutral-800"
172+
className="inline-flex items-center justify-center rounded-lg border border-blue-400/30 bg-blue-500/20 px-4 py-2.5 text-sm font-semibold text-blue-100 transition-colors hover:bg-blue-500/30"
136173
>
137-
Get the extension
174+
Install the extension
138175
</Link>
139176
<Link
140177
href={vscodeDeepLinkUrl}
141-
className="inline-flex items-center justify-center rounded-lg border border-blue-400/30 bg-blue-500/20 px-4 py-2.5 text-sm font-semibold text-blue-100 transition-colors hover:bg-blue-500/30"
178+
className="inline-flex items-center justify-center rounded-lg border border-neutral-600 px-4 py-2.5 text-sm font-semibold text-gray-200 transition-colors hover:border-neutral-500 hover:bg-neutral-800"
142179
>
143-
Open in VS Code
180+
Open setup in VS Code
144181
</Link>
145182
</div>
146183
<StepList steps={vscodeSteps} />
147184
<p className="mt-4 text-sm leading-6 text-gray-400">
148-
If the link does not open setup, run{" "}
185+
If nothing happens, check that the extension is installed and up to
186+
date, then run{" "}
149187
<strong className="font-semibold text-gray-300">
150188
DocumentDB: Set up DocumentDB Local
151189
</strong>{" "}
152-
from the VS Code Command Palette.
190+
from the Command Palette.
153191
</p>
154192
</div>
193+
194+
<div className="mt-4 text-sm">
195+
<Link
196+
href={activeTab === "vscode" ? vscodeDocsUrl : dockerDocsUrl}
197+
className="font-semibold text-blue-300 transition-colors hover:text-blue-200"
198+
>
199+
{activeTab === "vscode"
200+
? "Full VS Code guide"
201+
: "Full Docker guide"}
202+
</Link>
203+
</div>
155204
</div>
156205
);
157206
}

‎app/page.tsx‎

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,36 @@ const quickRunCommand = `docker run -dt --name documentdb \\
4646
const dockerQuickStartSteps = [
4747
{
4848
step: "01",
49-
description: "Run DocumentDB Local with Docker.",
49+
description:
50+
"Run the command above. Docker pulls the image on the first run, so give it about a minute.",
5051
},
5152
{
5253
step: "02",
53-
description: "Connect on port 10260 with your app, shell, or client.",
54+
description:
55+
"Connect on port 10260 with mongosh, any MongoDB driver, or your app.",
5456
},
5557
{
5658
step: "03",
57-
description: "Continue with the docs or Linux packages for the setup you need.",
59+
description:
60+
"Run your first query. The Docker guide has connection strings and sample data.",
5861
},
5962
];
6063

6164
const vscodeQuickStartSteps = [
6265
{
6366
step: "01",
6467
description:
65-
"Install or update DocumentDB for VS Code to version 0.10.1 or later.",
68+
"Install the free DocumentDB for VS Code extension from the Marketplace.",
6669
},
6770
{
6871
step: "02",
6972
description:
70-
"Select Open setup when VS Code confirms the link, then Continue, review the defaults, and select Start DocumentDB Local.",
73+
"Select Open setup in VS Code and allow it to open the link. The wizard starts DocumentDB Local with defaults you can review.",
7174
},
7275
{
7376
step: "03",
7477
description:
75-
"When setup finishes, select Open Connection to browse data and run queries.",
78+
"You get a container on port 10260 with generated credentials. Select Open Connection to browse data and run your first query.",
7679
},
7780
];
7881

@@ -338,7 +341,7 @@ export default function Home() {
338341
<section className="relative overflow-hidden border-b border-neutral-800 bg-gradient-to-b from-neutral-800 via-neutral-900 to-black">
339342
<div className="absolute inset-0 bg-[radial-gradient(circle_at_top_right,_rgba(59,130,246,0.2),_transparent_45%),radial-gradient(circle_at_bottom_left,_rgba(16,185,129,0.18),_transparent_45%)]" />
340343
<div className="relative mx-auto max-w-7xl px-4 py-14 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
341-
<div className="grid items-center gap-8 lg:gap-10 xl:grid-cols-[1.15fr_0.85fr]">
344+
<div className="grid items-start gap-8 lg:gap-10 xl:grid-cols-[1.15fr_0.85fr]">
342345
<div className="min-w-0">
343346
<p className="mb-3 text-xs font-semibold uppercase tracking-[0.24em] text-blue-300">
344347
Open source document database
@@ -397,8 +400,8 @@ export default function Home() {
397400
Run DocumentDB locally
398401
</h2>
399402
<p className="mt-2 text-sm leading-6 text-gray-400">
400-
Start DocumentDB Local with Docker, or let the VS Code
401-
extension set it up for you.
403+
Run it from your terminal, or let the VS Code extension set it
404+
up for you. Both start the same DocumentDB Local container.
402405
</p>
403406
</div>
404407
<QuickStartTabs
@@ -407,21 +410,9 @@ export default function Home() {
407410
vscodeSteps={vscodeQuickStartSteps}
408411
vscodeDeepLinkUrl={documentdbVsCodeLocalQuickStartDeepLink}
409412
vscodeMarketplaceUrl={documentdbVsCodeExtensionMarketplaceUrl}
413+
dockerDocsUrl="/docs/getting-started/docker"
414+
vscodeDocsUrl="/docs/getting-started/vscode-quickstart"
410415
/>
411-
<div className="mt-4 flex flex-col gap-2 text-sm sm:flex-row sm:flex-wrap sm:items-center sm:gap-4">
412-
<Link
413-
href="/docs/getting-started/docker"
414-
className="font-semibold text-blue-300 transition-colors hover:text-blue-200"
415-
>
416-
Docker quick start
417-
</Link>
418-
<Link
419-
href="/packages"
420-
className="font-semibold text-gray-300 transition-colors hover:text-white"
421-
>
422-
Download packages
423-
</Link>
424-
</div>
425416
</div>
426417
</div>
427418
</div>

‎tests/quickStart.test.ts‎

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ import {
1010
const html = renderToStaticMarkup(createElement(Home));
1111

1212
describe('homepage local quick start', () => {
13-
it('preserves the public anchor and Docker as the default tab', () => {
13+
it('preserves the public anchor and the terminal path as the default tab', () => {
1414
expect(html).toContain('id="run-with-docker"');
1515
expect(html).toMatch(
16-
/id="quickstart-tab-docker" aria-selected="true" aria-controls="quickstart-panel-docker" tabindex="0"/,
16+
/id="quickstart-tab-terminal" aria-selected="true" aria-controls="quickstart-panel-terminal" tabindex="0"/,
1717
);
1818
expect(html).toMatch(
1919
/id="quickstart-tab-vscode" aria-selected="false" aria-controls="quickstart-panel-vscode" tabindex="-1"/,
2020
);
2121
expect(html).toMatch(
22-
/id="quickstart-panel-docker" aria-labelledby="quickstart-tab-docker">/,
22+
/id="quickstart-panel-terminal" aria-labelledby="quickstart-tab-terminal">/,
2323
);
2424
expect(html).toMatch(
2525
/id="quickstart-panel-vscode" aria-labelledby="quickstart-tab-vscode" hidden=""/,
@@ -31,7 +31,15 @@ describe('homepage local quick start', () => {
3131
);
3232
});
3333

34-
it('offers the marketplace before the supported local setup deep link', () => {
34+
it('labels the tabs by interface rather than implying one path avoids Docker', () => {
35+
expect(html).toContain('>Terminal</button>');
36+
expect(html).toContain('>VS Code</button>');
37+
expect(html).toContain(
38+
'Both start the same DocumentDB Local container.',
39+
);
40+
});
41+
42+
it('leads with installing the extension, then opening setup', () => {
3543
expect(documentdbVsCodeExtensionMarketplaceUrl).toBe(
3644
'https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-documentdb',
3745
);
@@ -46,24 +54,45 @@ describe('homepage local quick start', () => {
4654
);
4755
expect(marketplace).toBeGreaterThan(-1);
4856
expect(setup).toBeGreaterThan(marketplace);
57+
expect(html).toContain('Install the extension');
58+
expect(html).toContain('Open setup in VS Code');
59+
});
60+
61+
it('states that the VS Code path still needs Docker and changes nothing else', () => {
62+
expect(html).toContain(
63+
'Needs Docker Desktop or Docker Engine on the same machine as VS Code.',
64+
);
65+
expect(html).toContain('It never installs Docker or changes your system.');
4966
});
5067

51-
it('states the shipped minimum version and Docker prerequisite', () => {
52-
expect(html).toContain('version 0.10.1 or later');
68+
it('describes the setup outcome without pinning an extension version', () => {
69+
expect(html).toContain(
70+
'Install the free DocumentDB for VS Code extension from the Marketplace.',
71+
);
5372
expect(html).toContain(
54-
'Requires Docker Engine or Docker Desktop running Linux containers in your VS Code environment.',
73+
'The wizard starts DocumentDB Local with defaults you can review.',
5574
);
75+
expect(html).toContain(
76+
'You get a container on port 10260 with generated credentials.',
77+
);
78+
// A pinned minimum version on the homepage rots; the guide carries it instead.
79+
expect(html).not.toContain('0.10.1');
5680
});
5781

58-
it('describes the setup actions and provides a Command Palette fallback', () => {
82+
it('gives each path a concrete first query and a full guide', () => {
5983
expect(html).toContain(
60-
'Select Open setup when VS Code confirms the link, then Continue, review the defaults, and select Start DocumentDB Local.',
84+
'Connect on port 10260 with mongosh, any MongoDB driver, or your app.',
6185
);
86+
expect(html).toContain('Run your first query.');
87+
expect(html).toContain('href="/docs/getting-started/docker"');
88+
expect(html).toContain('Full Docker guide');
89+
});
90+
91+
it('provides a Command Palette fallback that names the likely cause', () => {
6292
expect(html).toContain(
63-
'When setup finishes, select Open Connection to browse data and run queries.',
93+
'If nothing happens, check that the extension is installed and up to',
6494
);
65-
expect(html).toContain('If the link does not open setup, run ');
6695
expect(html).toContain('DocumentDB: Set up DocumentDB Local');
67-
expect(html).toContain('from the VS Code Command Palette.');
96+
expect(html).toContain('from the Command Palette.');
6897
});
6998
});

0 commit comments

Comments
 (0)