Skip to content

Commit 852c457

Browse files
committed
docs: refine interface tour screenshot
1 parent 50ee66c commit 852c457

3 files changed

Lines changed: 65 additions & 7 deletions

File tree

docs/docs/guides/interface-tour.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ AkôFlow Desktop is the visual client for the AkôFlow daemon. The application d
1313

1414
<AnnotatedScreenshot
1515
src="/img/interface/overview.png"
16+
darkSrc="/img/interface/overview-dark.png"
1617
alt="AkôFlow Desktop overview with the sidebar, global search, notifications, instance status, and workflow summary identified"
17-
caption="The overview is a current snapshot of the connected daemon. Counts and workflow names change with the selected instance; use a workflow row or View all to continue into the record rather than treating the dashboard as a report export."
18+
caption="A current Desktop overview. The numbered markers identify the navigation and status controls; counts and workflow names change with the selected instance. Open a workflow row or select View all to continue into a record."
1819
callouts={[
19-
{number: 1, label: 'The sidebar groups workflows, infrastructure, runs, artifacts, provenance, and audit.'},
20-
{number: 2, label: 'Global search opens entities without first visiting their list page.'},
21-
{number: 3, label: 'Notifications report operations that need attention.'},
22-
{number: 4, label: 'The instance indicator confirms which daemon the client is using.'},
20+
{number: 1, x: 4.8, y: 16.0, label: 'The sidebar groups workflows, infrastructure, runs, artifacts, provenance, and audit.'},
21+
{number: 2, x: 50.0, y: 7.5, label: 'Global search opens entities without first visiting their list page.'},
22+
{number: 3, x: 92.1, y: 7.5, label: 'Notifications report operations that need attention.'},
23+
{number: 4, x: 8.2, y: 91.5, label: 'The instance indicator confirms which daemon the client is using.'},
2324
]}
2425
/>
2526

docs/src/components/AnnotatedScreenshot.tsx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
import React from 'react';
2+
import {useColorMode} from '@docusaurus/theme-common';
3+
import useBaseUrl from '@docusaurus/useBaseUrl';
24

35
type Callout = {
46
number: number;
57
label: string;
8+
x?: number;
9+
y?: number;
610
};
711

812
type AnnotatedScreenshotProps = {
913
src?: string;
14+
darkSrc?: string;
1015
alt: string;
1116
caption?: string;
1217
callouts?: Callout[];
1318
};
1419

1520
export default function AnnotatedScreenshot({
1621
src,
22+
darkSrc,
1723
alt,
1824
caption,
1925
callouts = [],
2026
}: AnnotatedScreenshotProps) {
21-
if (!src) {
27+
const {colorMode} = useColorMode();
28+
const activeSrc = colorMode === 'dark' && darkSrc ? darkSrc : src;
29+
const resolvedSrc = useBaseUrl(activeSrc ?? '');
30+
31+
if (!activeSrc) {
2232
return (
2333
<aside className="akoflow-media-placeholder" aria-label={alt}>
2434
<strong>Screenshot planned</strong>
@@ -29,7 +39,21 @@ export default function AnnotatedScreenshot({
2939

3040
return (
3141
<figure className="akoflow-annotated-screenshot">
32-
<img src={src} alt={alt} loading="lazy" />
42+
<div className="akoflow-annotated-screenshot__image">
43+
<img src={resolvedSrc} alt={alt} loading="lazy" />
44+
{callouts
45+
.filter((callout) => callout.x !== undefined && callout.y !== undefined)
46+
.map((callout) => (
47+
<span
48+
key={callout.number}
49+
className="akoflow-annotated-screenshot__marker"
50+
style={{left: `${callout.x}%`, top: `${callout.y}%`}}
51+
aria-hidden="true"
52+
>
53+
{callout.number}
54+
</span>
55+
))}
56+
</div>
3357
{(caption || callouts.length > 0) && (
3458
<figcaption>
3559
{caption && <p>{caption}</p>}

docs/src/css/custom.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,39 @@ html {
308308
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
309309
}
310310

311+
.akoflow-annotated-screenshot__image {
312+
position: relative;
313+
overflow: hidden;
314+
border-radius: 12px;
315+
}
316+
317+
.akoflow-annotated-screenshot__image img {
318+
border-radius: 12px;
319+
}
320+
321+
.akoflow-annotated-screenshot__marker {
322+
position: absolute;
323+
display: grid;
324+
width: 1.65rem;
325+
height: 1.65rem;
326+
place-items: center;
327+
transform: translate(-50%, -50%);
328+
border: 2px solid #fff;
329+
border-radius: 999px;
330+
background: #111;
331+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
332+
color: #fff;
333+
font-size: 0.78rem;
334+
font-weight: 800;
335+
line-height: 1;
336+
}
337+
338+
[data-theme='dark'] .akoflow-annotated-screenshot__marker {
339+
border-color: #111;
340+
background: #fff;
341+
color: #111;
342+
}
343+
311344
.akoflow-annotated-screenshot figcaption,
312345
.akoflow-demo-video figcaption {
313346
margin-top: 0.75rem;

0 commit comments

Comments
 (0)