Claude commited on
Commit
d2d35b6
·
1 Parent(s): 7829a47

Upload page UX, batch 2: differentiate buttons, group toggles, nest sub-toggle

Browse files

#2 The two preview buttons now read as parallel paths rather than
primary/secondary. Inline SVG icon on each (filmstrip-style for
the plain scene picker, sparkles for the AI-driven topic picker)
plus a small "AI" badge on the topic variant so the choice is
legible at a glance.

#3 AI assist section split into two visually-distinct clusters with
their own subheadings:
- Per-segment enrichments: section titles, alt-text drafts,
key terms, math equations, on-screen text.
- Whole-document features: topic-based segmentation (and its
sub-toggle).
Each cluster has a one-liner explaining its cost model so the
user can scan "cost scales with segments" vs "one-off whole-
video call" without reading every individual blurb.

#9 The "Also send slide images" sub-toggle is no longer a sibling
with an "↳" prefix. It now lives in its own .vgm-llm-subgrid
container with a left rail, indentation, lighter background,
and slightly smaller heading — visually nested under its
parent so the relationship is unambiguous.

Files changed (1) hide show
  1. app/templates/index.html +87 -5
app/templates/index.html CHANGED
@@ -330,6 +330,40 @@
330
  .vgm-llm-toggle__body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
331
  .vgm-llm-toggle strong { font-size: 0.9rem; font-weight: 600; }
332
  .vgm-llm-toggle small { font-size: 0.75rem; color: var(--color-text-muted); line-height: 1.3; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
 
334
  /* SCENE PICKER */
335
  .vgm-preview-btn {
@@ -356,7 +390,34 @@
356
  gap: 0.5rem;
357
  margin-top: 0.5rem;
358
  }
359
- .vgm-preview-btn-row .vgm-preview-btn { margin-top: 0; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  /* Twin button for the LLM-driven topic-scene preview. Same shape
361
  as the primary preview button but outlined so the user can tell
362
  the two CTAs apart at a glance. */
@@ -791,10 +852,22 @@
791
  <div class="vgm-field vgm-field--preview">
792
  <div class="vgm-preview-btn-row">
793
  <button type="button" id="preview-btn" class="vgm-preview-btn" disabled>
794
- Preview scenes
 
 
 
 
 
795
  </button>
796
  <button type="button" id="topic-preview-btn" class="vgm-preview-btn vgm-preview-btn--alt" disabled>
797
- Preview topic scenes
 
 
 
 
 
 
 
798
  </button>
799
  </div>
800
  <p class="vgm-preview-hint">Tip: preview first so you only generate the slides you'll keep.</p>
@@ -826,6 +899,8 @@
826
  With an API key above, Claude can enrich each segment. Toggle whichever you want; each runs only when checked.
827
  </p>
828
 
 
 
829
  <div class="vgm-llm-grid">
830
  <label class="vgm-llm-toggle">
831
  <input type="checkbox" name="llm_section_title" value="true">
@@ -862,6 +937,11 @@
862
  <small>Replaces Tesseract OCR for primary frames; better on coloured callouts and decorative fonts</small>
863
  </span>
864
  </label>
 
 
 
 
 
865
  <label class="vgm-llm-toggle">
866
  <input type="checkbox" name="llm_topic_segmentation" value="true" data-toggle="topic_seg">
867
  <span class="vgm-llm-toggle__body">
@@ -869,10 +949,12 @@
869
  <small>Group slides into topical sections instead of one segment per slide. Claude segments the transcript; each topic gets the longest-on-screen slide as primary and the other slides as switchable alternates. Fewer, more coherent sections; narration won't break mid-sentence.</small>
870
  </span>
871
  </label>
872
- <label class="vgm-llm-toggle" data-when="topic_seg" hidden>
 
 
873
  <input type="checkbox" name="llm_topic_segmentation_with_images" value="true">
874
  <span class="vgm-llm-toggle__body">
875
- <strong>↳ Also send slide images</strong>
876
  <small>Lets Claude see thumbnails of the slides while picking topic boundaries. Better on lectures with visual chapter markers (splash slides, title cards); slower and ~5–10× the tokens of the transcript-only call. Capped at 60 slides per video.</small>
877
  </span>
878
  </label>
 
330
  .vgm-llm-toggle__body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
331
  .vgm-llm-toggle strong { font-size: 0.9rem; font-weight: 600; }
332
  .vgm-llm-toggle small { font-size: 0.75rem; color: var(--color-text-muted); line-height: 1.3; }
333
+ /* Subheading inside the AI-assist section. Groups the cluster of
334
+ toggles that share a billing/cost model so the user can scan
335
+ "per-segment" vs "whole-document" at a glance. */
336
+ .vgm-llm-group-title {
337
+ margin: 0 0 0.15rem;
338
+ font-size: 0.82rem;
339
+ font-weight: 700;
340
+ color: var(--color-text);
341
+ font-family: var(--font-body);
342
+ text-transform: none;
343
+ letter-spacing: 0;
344
+ }
345
+ .vgm-llm-group-title--mt { margin-top: var(--space-md); }
346
+ .vgm-llm-group-intro {
347
+ margin: 0 0 var(--space-xs);
348
+ font-size: 0.8rem;
349
+ color: var(--color-text-muted);
350
+ line-height: 1.4;
351
+ }
352
+ /* Sub-toggle nested under its parent. Indented + left rail + lighter
353
+ background so the hierarchy is visually obvious — previously the
354
+ arrow "↳" prefix in the label was the only clue. */
355
+ .vgm-llm-subgrid {
356
+ display: grid;
357
+ grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
358
+ gap: 0.5rem;
359
+ margin: 0.4rem 0 0 1rem;
360
+ padding-left: 0.75rem;
361
+ border-left: 2px solid var(--color-border);
362
+ }
363
+ .vgm-llm-toggle--sub {
364
+ background: var(--color-bg);
365
+ }
366
+ .vgm-llm-toggle--sub strong { font-size: 0.85rem; }
367
 
368
  /* SCENE PICKER */
369
  .vgm-preview-btn {
 
390
  gap: 0.5rem;
391
  margin-top: 0.5rem;
392
  }
393
+ .vgm-preview-btn-row .vgm-preview-btn {
394
+ margin-top: 0;
395
+ display: inline-flex;
396
+ align-items: center;
397
+ gap: 0.45rem;
398
+ }
399
+ .vgm-preview-btn__icon {
400
+ width: 1.05rem;
401
+ height: 1.05rem;
402
+ flex: 0 0 auto;
403
+ }
404
+ /* Small inline badge used to mark the AI-powered preview button so
405
+ the two CTAs read as parallel paths rather than primary/secondary. */
406
+ .vgm-btn-badge {
407
+ display: inline-block;
408
+ font-size: 0.65rem;
409
+ font-weight: 700;
410
+ letter-spacing: 0.06em;
411
+ padding: 0.1rem 0.4rem;
412
+ border-radius: 999px;
413
+ background: var(--color-primary);
414
+ color: #fff;
415
+ vertical-align: 0.05em;
416
+ }
417
+ .vgm-preview-btn--alt .vgm-btn-badge {
418
+ background: var(--color-primary);
419
+ color: #fff;
420
+ }
421
  /* Twin button for the LLM-driven topic-scene preview. Same shape
422
  as the primary preview button but outlined so the user can tell
423
  the two CTAs apart at a glance. */
 
852
  <div class="vgm-field vgm-field--preview">
853
  <div class="vgm-preview-btn-row">
854
  <button type="button" id="preview-btn" class="vgm-preview-btn" disabled>
855
+ <svg class="vgm-preview-btn__icon" viewBox="0 0 20 20" aria-hidden="true" focusable="false">
856
+ <rect x="2" y="4" width="16" height="12" rx="1.5" fill="none" stroke="currentColor" stroke-width="1.6"/>
857
+ <line x1="6" y1="4" x2="6" y2="16" stroke="currentColor" stroke-width="1.2"/>
858
+ <line x1="14" y1="4" x2="14" y2="16" stroke="currentColor" stroke-width="1.2"/>
859
+ </svg>
860
+ <span>Preview scenes</span>
861
  </button>
862
  <button type="button" id="topic-preview-btn" class="vgm-preview-btn vgm-preview-btn--alt" disabled>
863
+ <svg class="vgm-preview-btn__icon" viewBox="0 0 20 20" aria-hidden="true" focusable="false">
864
+ <path d="M10 2 L11.5 6.5 L16 8 L11.5 9.5 L10 14 L8.5 9.5 L4 8 L8.5 6.5 Z"
865
+ fill="currentColor"/>
866
+ <circle cx="15.5" cy="14.5" r="1.6" fill="currentColor"/>
867
+ <circle cx="4.5" cy="15" r="1" fill="currentColor"/>
868
+ </svg>
869
+ <span>Preview topic scenes</span>
870
+ <span class="vgm-btn-badge">AI</span>
871
  </button>
872
  </div>
873
  <p class="vgm-preview-hint">Tip: preview first so you only generate the slides you'll keep.</p>
 
899
  With an API key above, Claude can enrich each segment. Toggle whichever you want; each runs only when checked.
900
  </p>
901
 
902
+ <h4 class="vgm-llm-group-title">Per-segment enrichments</h4>
903
+ <p class="vgm-llm-group-intro">Run once per kept slide. Cost scales with how many segments make it past the picker.</p>
904
  <div class="vgm-llm-grid">
905
  <label class="vgm-llm-toggle">
906
  <input type="checkbox" name="llm_section_title" value="true">
 
937
  <small>Replaces Tesseract OCR for primary frames; better on coloured callouts and decorative fonts</small>
938
  </span>
939
  </label>
940
+ </div>
941
+
942
+ <h4 class="vgm-llm-group-title vgm-llm-group-title--mt">Whole-document features</h4>
943
+ <p class="vgm-llm-group-intro">Run once for the whole video. Change the document's overall structure.</p>
944
+ <div class="vgm-llm-grid">
945
  <label class="vgm-llm-toggle">
946
  <input type="checkbox" name="llm_topic_segmentation" value="true" data-toggle="topic_seg">
947
  <span class="vgm-llm-toggle__body">
 
949
  <small>Group slides into topical sections instead of one segment per slide. Claude segments the transcript; each topic gets the longest-on-screen slide as primary and the other slides as switchable alternates. Fewer, more coherent sections; narration won't break mid-sentence.</small>
950
  </span>
951
  </label>
952
+ </div>
953
+ <div class="vgm-llm-subgrid" data-when="topic_seg" hidden>
954
+ <label class="vgm-llm-toggle vgm-llm-toggle--sub">
955
  <input type="checkbox" name="llm_topic_segmentation_with_images" value="true">
956
  <span class="vgm-llm-toggle__body">
957
+ <strong>Also send slide images</strong>
958
  <small>Lets Claude see thumbnails of the slides while picking topic boundaries. Better on lectures with visual chapter markers (splash slides, title cards); slower and ~5–10× the tokens of the transcript-only call. Capped at 60 slides per video.</small>
959
  </span>
960
  </label>