Skip to content

Commit 6893b34

Browse files
ofriwclaude
andcommitted
Implement compact mode in all visual components
Add PresentationAwareProps support to all visual components (CapabilityMatrix, UShapeAttentionCurve, WorkflowCircle, GroundingComparison, PlanningStrategyComparison, AbstractShapesVisualization, ContextWindowMeter). Each component now accepts compact prop to maximize content area within 1280x720 presentation viewport. Improvements: - Reduce padding/margins in compact mode (max-width: 95%, padding: 0.5rem) - Fix sizing constraints (max-width/max-height: 100% in visualContainer) - Reduce min-heights for tighter layouts (180px → 120px in AbstractShapes) - Use color-mix() with CSS variables for theme-aware shadows - Add --visual-bg-error CSS variable for consistent error styling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7e3f22e commit 6893b34

13 files changed

+98
-34
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
border: 1px solid var(--visual-decision);
77
}
88

9+
.container.compact {
10+
margin: 0 auto;
11+
padding: 0.5rem;
12+
max-width: 95%;
13+
}
14+
915
.comparison {
1016
display: flex;
1117
gap: 3rem;
@@ -28,7 +34,7 @@
2834
}
2935

3036
.shapes {
31-
min-height: 180px;
37+
min-height: 120px;
3238
display: flex;
3339
align-items: center;
3440
justify-content: center;

website/src/components/VisualElements/AbstractShapesVisualization.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import React from 'react';
2+
import type { PresentationAwareProps } from '../PresentationMode/types';
23
import styles from './AbstractShapesVisualization.module.css';
34

4-
export default function AbstractShapesVisualization() {
5+
export default function AbstractShapesVisualization({ compact = false }: PresentationAwareProps = {}) {
6+
const containerClassName = compact
7+
? `${styles.container} ${styles.compact}`
8+
: styles.container;
9+
510
return (
611
<div
7-
className={styles.container}
12+
className={containerClassName}
813
role="img"
914
aria-label="Comparison of cluttered context with multiple squares versus clean context with single circle, demonstrating how context density affects agent solutions"
1015
>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
border: 1px solid var(--visual-capability);
77
}
88

9+
/* Compact mode for presentations - maximize table size */
10+
.container.compact {
11+
margin: 0 auto;
12+
padding: 0.5rem;
13+
max-width: 95%;
14+
}
15+
916
.tableWrapper {
1017
overflow-x: auto;
1118
margin-bottom: 1.5rem;

website/src/components/VisualElements/CapabilityMatrix.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import type { PresentationAwareProps } from '../PresentationMode/types';
23
import styles from './CapabilityMatrix.module.css';
34

45
interface Capability {
@@ -60,9 +61,13 @@ function getTrustIndicator(level: 'high' | 'medium' | 'low'): {
6061
}
6162
}
6263

63-
export default function CapabilityMatrix() {
64+
export default function CapabilityMatrix({ compact = false }: PresentationAwareProps = {}) {
65+
const containerClassName = compact
66+
? `${styles.container} ${styles.compact}`
67+
: styles.container;
68+
6469
return (
65-
<div className={styles.container}>
70+
<div className={containerClassName}>
6671
<div className={styles.tableWrapper}>
6772
<table className={styles.table}>
6873
<thead>

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
border: 1px solid var(--visual-workflow);
77
}
88

9+
/* Compact mode for presentations - maximize content area */
10+
.container.compact {
11+
margin: 0 auto;
12+
padding: 0.5rem;
13+
max-width: 95%;
14+
}
15+
916
.header {
1017
display: flex;
1118
justify-content: space-between;
@@ -114,7 +121,7 @@
114121
background: var(--visual-workflow);
115122
color: white;
116123
transform: translateY(-1px);
117-
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
124+
box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
118125
}
119126

120127
.button:disabled {
@@ -130,7 +137,7 @@
130137
.buttonReset:hover:not(:disabled) {
131138
background: var(--visual-neutral);
132139
color: white;
133-
box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
140+
box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
134141
}
135142

136143
.statusMessage {
@@ -159,7 +166,7 @@
159166
}
160167

161168
.alertCritical {
162-
background: rgba(239, 68, 68, 0.1);
169+
background: var(--visual-bg-error, rgba(225, 29, 72, 0.1));
163170
border: 1px solid var(--visual-error);
164171
color: var(--visual-error);
165172
}

website/src/components/VisualElements/ContextWindowMeter.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import React, { useState } from 'react';
2+
import type { PresentationAwareProps } from '../PresentationMode/types';
23
import styles from './ContextWindowMeter.module.css';
34

4-
interface ContextWindowMeterProps {
5+
interface ContextWindowMeterProps extends PresentationAwareProps {
56
initialTokens?: number;
67
maxTokens?: number;
78
}
89

910
export default function ContextWindowMeter({
1011
initialTokens = 2000,
1112
maxTokens = 200000,
13+
compact = false,
1214
}: ContextWindowMeterProps) {
15+
const containerClassName = compact
16+
? `${styles.container} ${styles.compact}`
17+
: styles.container;
1318
const [tokens, setTokens] = useState(initialTokens);
1419

1520
const percentage = (tokens / maxTokens) * 100;
@@ -29,7 +34,7 @@ export default function ContextWindowMeter({
2934
};
3035

3136
return (
32-
<div className={styles.container}>
37+
<div className={containerClassName}>
3338
<div className={styles.header}>
3439
<h4 className={styles.title}>Context Window Usage</h4>
3540
<span className={styles.stats}>

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
}
1919
}
2020

21+
.container.compact {
22+
margin: 0 auto;
23+
padding: 0.5rem;
24+
max-width: 95%;
25+
}
26+
2127
.header {
2228
padding: 1.5rem;
2329
text-align: center;
@@ -81,7 +87,7 @@
8187
.comparisonWrapper {
8288
position: relative;
8389
display: flex;
84-
min-height: 400px;
90+
height: 100%;
8591
overflow: hidden;
8692
}
8793

@@ -281,7 +287,7 @@
281287
}
282288

283289
.phaseDetailsExpanded {
284-
max-height: 800px;
290+
max-height: 100vh;
285291
}
286292

287293
.phaseDetailsContent {

website/src/components/VisualElements/GroundingComparison.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState } from 'react';
2+
import type { PresentationAwareProps } from '../PresentationMode/types';
23
import styles from './GroundingComparison.module.css';
34

45
// Import icons
@@ -167,7 +168,10 @@ function PhaseCard({ phase, side, isExpanded, onToggle }: PhaseCardProps) {
167168
);
168169
}
169170

170-
export default function GroundingComparison() {
171+
export default function GroundingComparison({ compact = false }: PresentationAwareProps = {}) {
172+
const containerClassName = compact
173+
? `${styles.container} ${styles.compact}`
174+
: styles.container;
171175
const [expandedPhases, setExpandedPhases] = useState<Set<string>>(new Set());
172176

173177
const togglePhase = (phaseId: number, side: 'without' | 'with') => {
@@ -198,7 +202,7 @@ export default function GroundingComparison() {
198202

199203
return (
200204
<div
201-
className={styles.container}
205+
className={containerClassName}
202206
role="region"
203207
aria-label="Grounding comparison visualization"
204208
>

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

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

11+
/* Compact mode for presentations - maximize content area */
12+
.container.compact {
13+
margin: 0 auto;
14+
padding: 0.5rem;
15+
max-width: 95%;
16+
}
17+
1118
@keyframes fadeIn {
1219
from {
1320
opacity: 0;

website/src/components/VisualElements/PlanningStrategyComparison.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import React from 'react';
2+
import type { PresentationAwareProps } from '../PresentationMode/types';
23
import styles from './PlanningStrategyComparison.module.css';
34

4-
export default function PlanningStrategyComparison() {
5+
export default function PlanningStrategyComparison({ compact = false }: PresentationAwareProps = {}) {
6+
const containerClassName = compact
7+
? `${styles.container} ${styles.compact}`
8+
: styles.container;
9+
510
return (
611
<div
7-
className={styles.container}
12+
className={containerClassName}
813
role="img"
914
aria-label="Abstract visualization comparing exploration planning approach with scattered discovery pattern versus exact planning with direct linear path"
1015
>

0 commit comments

Comments
 (0)