Skip to content

Commit bc38dc6

Browse files
ofriwclaude
andcommitted
Add compact mode support to visual components for presentations
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f82fefd commit bc38dc6

File tree

3 files changed

+32
-13
lines changed

3 files changed

+32
-13
lines changed

website/src/components/PresentationMode/RevealSlideshow.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import WorkflowCircle from '../VisualElements/WorkflowCircle';
1111
import GroundingComparison from '../VisualElements/GroundingComparison';
1212
import ContextWindowMeter from '../VisualElements/ContextWindowMeter';
1313
import AbstractShapesVisualization from '../VisualElements/AbstractShapesVisualization';
14+
import PlanningStrategyComparison from '../VisualElements/PlanningStrategyComparison';
1415

1516
interface SpeakerNotes {
1617
talkingPoints: string;
@@ -66,6 +67,7 @@ const VISUAL_COMPONENTS = {
6667
GroundingComparison,
6768
ContextWindowMeter,
6869
AbstractShapesVisualization,
70+
PlanningStrategyComparison,
6971
};
7072

7173
export default function RevealSlideshow({ presentation, onClose }: RevealSlideshowProps) {
@@ -85,7 +87,7 @@ export default function RevealSlideshow({ presentation, onClose }: RevealSlidesh
8587
// Display controls
8688
controls: true,
8789
progress: true,
88-
center: true,
90+
center: false,
8991
hash: true,
9092
slideNumber: 'c/t',
9193

@@ -197,7 +199,7 @@ export default function RevealSlideshow({ presentation, onClose }: RevealSlidesh
197199
</code>
198200
</pre>
199201
{slide.caption && (
200-
<p className={styles.caption}>{slide.caption}</p>
202+
<p className={`${styles.caption} ${styles.slideCaption}`}>{slide.caption}</p>
201203
)}
202204
</section>
203205
);
@@ -266,13 +268,16 @@ export default function RevealSlideshow({ presentation, onClose }: RevealSlidesh
266268
<section key={key} data-notes={formatSpeakerNotes(slide.speakerNotes)}>
267269
<h2>{slide.title}</h2>
268270
<div className={styles.visualContainer}>
269-
{VisualComponent && <VisualComponent />}
271+
{VisualComponent && <VisualComponent compact={true} />}
270272
{!VisualComponent && (
271273
<p className={styles.error}>Visual component '{slide.component}' not found</p>
272274
)}
273275
</div>
274276
{slide.caption && (
275-
<p className={styles.caption}>{slide.caption}</p>
277+
<p className={`${styles.caption} ${styles.slideCaption}`}>{slide.caption}</p>
278+
)}
279+
{slide.subtitle && (
280+
<p className={`${styles.subtitle} ${styles.slideCaption}`}>{slide.subtitle}</p>
276281
)}
277282
</section>
278283
);

website/src/components/VisualElements/WorkflowCircle.module.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
animation: fadeIn 0.6s ease-in-out;
99
}
1010

11+
/* Compact mode for presentations - maximize diagram size for prominence */
12+
.container.compact {
13+
padding: 0;
14+
margin: 0 auto;
15+
max-width: 1000px;
16+
max-height: none;
17+
}
18+
1119
@keyframes fadeIn {
1220
from {
1321
opacity: 0;

website/src/components/VisualElements/WorkflowCircle.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ interface Connection {
1515
endY: number;
1616
}
1717

18-
export default function WorkflowCircle() {
18+
interface WorkflowCircleProps {
19+
compact?: boolean;
20+
}
21+
22+
export default function WorkflowCircle({ compact = false }: WorkflowCircleProps) {
1923
const centerX = 250;
2024
const centerY = 250;
21-
const radius = 140;
22-
const nodeRadius = 50;
25+
const radius = 170;
26+
const nodeRadius = 60;
2327

2428
// Calculate positions for each phase (clockwise starting from top)
2529
const phases: Phase[] = [
@@ -67,7 +71,7 @@ export default function WorkflowCircle() {
6771

6872
// Calculate control points for curved arrows on the outer ring
6973
// Use the midpoint between start and end angles, pushed outward
70-
const outerRadius = radius + 60;
74+
const outerRadius = radius + 50;
7175

7276
// Calculate angles for start and end points
7377
const startAngle = Math.atan2(startY - centerY, startX - centerX);
@@ -94,7 +98,7 @@ export default function WorkflowCircle() {
9498

9599
return (
96100
<div
97-
className={styles.container}
101+
className={`${styles.container} ${compact ? styles.compact : ''}`}
98102
role="img"
99103
aria-label="Four-phase iterative workflow diagram showing Research, Plan, Execute, and Validate phases in a continuous cycle"
100104
>
@@ -183,10 +187,12 @@ export default function WorkflowCircle() {
183187
</svg>
184188

185189
{/* Text description for additional context */}
186-
<p className={styles.description}>
187-
Each phase flows into the next in a continuous cycle. After validation,
188-
iterate back to research as needed to refine and improve.
189-
</p>
190+
{!compact && (
191+
<p className={styles.description}>
192+
Each phase flows into the next in a continuous cycle. After validation,
193+
iterate back to research as needed to refine and improve.
194+
</p>
195+
)}
190196
</div>
191197
);
192198
}

0 commit comments

Comments
 (0)