Skip to content

Commit 9cb7dc5

Browse files
Make visualizer always visible inline, remove hyperlink toggle
Co-Authored-By: Dan Ince <dince@assemblyai.com>
1 parent b3e8484 commit 9cb7dc5

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

fern/assets/components/TurnDetectionVisualizer.tsx

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function generateWaveformBars(start: number, end: number, seed: number): number[
5656
}
5757

5858
export function TurnDetectionVisualizer() {
59-
const [isOpen, setIsOpen] = React.useState(false);
6059
const [preset, setPreset] = React.useState<string>("balanced");
6160

6261
const config = PRESETS[preset];
@@ -70,22 +69,7 @@ export function TurnDetectionVisualizer() {
7069
[]
7170
);
7271

73-
if (!isOpen) {
74-
return (
75-
<p style={{ margin: "16px 0" }}>
76-
<a
77-
href="#turn-detection-visualizer"
78-
onClick={(e) => { e.preventDefault(); setIsOpen(true); }}
79-
style={{ color: "var(--accent-9, #4f46e5)", textDecoration: "underline", cursor: "pointer", fontWeight: 500 }}
80-
>
81-
Open the interactive turn detection visualizer
82-
</a>
83-
{" "}to see how parameters affect end-of-turn detection.
84-
</p>
85-
);
86-
}
87-
88-
const toX = (t: number) => (t / DURATION) * 100;
72+
const toX= (t: number) => (t / DURATION) * 100;
8973

9074
const turnsNotEnded: Set<number> = new Set();
9175
for (let i = 0; i < SEGMENTS.length; i++) {
@@ -113,24 +97,10 @@ export function TurnDetectionVisualizer() {
11397
boxSizing: "border-box" as const,
11498
}}
11599
>
116-
<div style={{ display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "16px" }}>
100+
<div style={{ marginBottom: "16px" }}>
117101
<span style={{ fontSize: "15px", fontWeight: 600, color: "var(--grayscale-12, #111827)" }}>
118102
Turn Detection Visualizer
119103
</span>
120-
<button
121-
onClick={() => setIsOpen(false)}
122-
style={{
123-
background: "none",
124-
border: "1px solid var(--grayscale-a4, #d1d5db)",
125-
borderRadius: "6px",
126-
padding: "4px 12px",
127-
cursor: "pointer",
128-
fontSize: "13px",
129-
color: "var(--grayscale-11, #6b7280)",
130-
}}
131-
>
132-
Close
133-
</button>
134104
</div>
135105

136106
<div style={{ display: "flex", gap: "8px", marginBottom: "16px", flexWrap: "wrap" as const }}>

0 commit comments

Comments
 (0)