Skip to content

Add main subtitle list multi-select and selected-cue actions #39

@laubonghaudoi

Description

@laubonghaudoi

Summary

Add first-class multi-select to the main subtitle list so users can apply operations to selected cues instead of only the whole active track or dialog-local selections.

Why this is in scope

Many high-value subtitle tools need a selection model: QA fixes, text cleanup, retiming, deleting ranges, and selected-cue export. The app already has checkbox/range selection patterns inside Bulk Offset and Find / Replace; this issue brings that capability into the main editor.

Initial scope

  • Click selects the active cue as today.
  • Cmd/Ctrl-click toggles cues in the selection.
  • Shift-click selects a range.
  • Escape clears selection.
  • Delete removes selected cues after confirmation or with undo-friendly behavior.
  • Tools can receive selected UUIDs when present.

Non-goals

  • Collaborative selections.
  • Persistent named selections.
  • Spreadsheet-style cell editing.

Implementation plan

  1. Add selection state.

    • Add active-track selection state in context/subtitle-context.tsx or a focused hook if keeping context smaller is preferable.
    • Store selected subtitle UUIDs, not numeric IDs.
    • Clear or prune selection when track changes, subtitles are deleted, or a track is reloaded.
  2. Update subtitle list interactions.

    • Extend components/subtitle/subtitle-list.tsx and subtitle-item.tsx.
    • Handle Cmd/Ctrl-click and Shift-click without breaking current click-to-scroll behavior.
    • Add selected-row styling that remains distinct from the currently playing cue.
  3. Add selected-cue actions.

    • Delete selected cues.
    • Apply bulk offset to selected cues by default when opening Bulk Offset.
    • Let future QA/text tools target selected cues by default.
  4. Keyboard behavior.

    • Escape clears selection.
    • Delete removes selected cues when not editing text.
    • Arrow navigation should keep working without accidentally expanding selection in the first pass.
  5. Tests.

    • Unit test selection reducer/helper logic if extracted.
    • Add React tests for range/toggle behavior if feasible with the current setup.
    • Test that deleting selected cues preserves ordering and undo history.

Acceptance criteria

  • Users can select multiple cues directly in the main subtitle list.
  • Selected cues can be deleted or passed into existing bulk tools.
  • Selection is UUID-based and robust across reorder/delete operations.
  • Existing single-click editing/playback behavior remains intact.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions