Skip to content

Commit c0b7252

Browse files
committed
Merge podcast branch: compact mode with JSX-compliant apostrophes
Resolves merge conflict in UShapeAttentionCurve.tsx by: - Accepting podcast's compact mode feature (conditional text rendering) - Preserving main's JSX-escaped apostrophes (') - Merging CSS changes (reduced padding in compact mode) The component now supports presentation mode while maintaining linting compliance.
2 parents 63359a9 + c2e16dc commit c0b7252

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/* Compact mode for presentations - maximize diagram size */
1010
.container.compact {
1111
margin: 0 auto;
12-
padding: 0.75rem;
12+
padding: 0.5rem;
1313
max-width: 95%;
1414
}
1515

website/src/components/VisualElements/UShapeAttentionCurve.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,15 @@ export default function UShapeAttentionCurve({
185185

186186
return (
187187
<div className={containerClassName}>
188-
<div className={styles.header}>
189-
<h4 className={styles.title}>Context Window Attention Curve</h4>
190-
<span className={styles.subtitle}>
191-
Information at the beginning and end gets strong attention, middle
192-
gets skimmed
193-
</span>
194-
</div>
188+
{!compact && (
189+
<div className={styles.header}>
190+
<h4 className={styles.title}>Context Window Attention Curve</h4>
191+
<span className={styles.subtitle}>
192+
Information at the beginning and end gets strong attention, middle
193+
gets skimmed
194+
</span>
195+
</div>
196+
)}
195197

196198
<svg
197199
className={styles.svg}
@@ -406,14 +408,16 @@ export default function UShapeAttentionCurve({
406408
))}
407409
</div>
408410

409-
<div className={styles.explanation}>
410-
<strong>The U-Curve Effect:</strong> The curve&apos;s width shows
411-
context length, while depth shows attention quality. As context length
412-
increases, the attention drop in the middle becomes more pronounced.
413-
Short contexts (30%) have minimal degradation. Medium contexts (60%)
414-
show a noticeable U-curve. Long contexts (90%) exhibit severe attention
415-
loss—only the beginning and end are reliably processed.
416-
</div>
411+
{!compact && (
412+
<div className={styles.explanation}>
413+
<strong>The U-Curve Effect:</strong> The curve&apos;s width shows
414+
context length, while depth shows attention quality. As context length
415+
increases, the attention drop in the middle becomes more pronounced.
416+
Short contexts (30%) have minimal degradation. Medium contexts (60%)
417+
show a noticeable U-curve. Long contexts (90%) exhibit severe
418+
attention loss—only the beginning and end are reliably processed.
419+
</div>
420+
)}
417421
</div>
418422
);
419423
}

0 commit comments

Comments
 (0)