Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3d8fafa
Add word highlights to the transcript editor, with optional RTF expor…
erklu Oct 18, 2026
f4a4636
Give the Highlight button a marker pen instead of a torch
erklu Oct 18, 2026
728f236
Add comments on words to the transcript editor, with optional Word co…
erklu Oct 18, 2026
4320c42
Test that comments travel with the undo history
erklu Oct 18, 2026
f87fdee
Show comments in a card under the video instead of a box beside the w…
erklu Oct 18, 2026
b8d7ab0
Mark where the comments card is in the text, and say where in words (…
erklu Oct 18, 2026
56a6ee8
Merge remote-tracking branch 'origin/main' into feature/comments-on-w…
krihal Oct 19, 2026
8256275
Merge remote-tracking branch 'origin/main' into feature/comments-on-w…
krihal Oct 19, 2026
37d4fd4
Comments card: follow a renamed speaker and the text being typed (WCA…
erklu Oct 19, 2026
060f415
One-word moves: a comment stays on its word
erklu Oct 19, 2026
d29a633
Comments panel: Remove and Cancel meet the text contrast in light mode
erklu Oct 19, 2026
1b3b036
Merge branch 'a11y/comments-panel-button-contrast' into feature/comme…
erklu Oct 19, 2026
3b9918e
Merge branch 'a11y/comments-follow-the-text' into feature/comments-on…
erklu Oct 19, 2026
86c529f
Merge branch 'a11y/comments-follow-a-moved-word' into feature/comment…
erklu Oct 19, 2026
2770e8e
Comments: a switch to hide them, and a command that turns them back on
erklu Oct 19, 2026
84b15f0
Comments switch tests: pass the preference by keyword
erklu Oct 19, 2026
69d6cb5
Merge branch 'a11y/comments-visibility-toggle' into feature/comments-…
erklu Oct 19, 2026
e1ac682
Comments switch: not saved between sessions
erklu Oct 19, 2026
963627e
Merge branch 'a11y/comments-visibility-toggle' into feature/comments-…
erklu Oct 19, 2026
9a2ab7a
Say why Word comments are written by "Scribe" (#131)
erklu Oct 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions AGENTS.md

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions pages/srt.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
TIMELINE_SHOW_KEY,
)
from utils.speech_timeline import SpeechTimeline
from utils.comments_panel import CommentsPanel
from utils.validation_panel import ValidationPanel
from utils.transcript_editor import TranscriptEditor
from utils.video import create_video_proxy
Expand Down Expand Up @@ -256,6 +257,52 @@ async def look_up_original() -> None:
"click",
lambda: editor.validate_captions(),
)
else:
# Where Validate is in the subtitle editor: the one thing
# about the text that is not history or finding. The same
# as Ctrl+Shift+H. Transcriptions only, for now.
#
# A mouse press must not take focus, or the selection it
# is meant to act on is the first thing it would lose --
# the same reason the caption row's music-note icon
# prevents the default on mousedown.
# sym_o_ is Quasar's prefix for Material Symbols Outlined, which
# ships with NiceGUI and has the marker pen the plain
# Material Icons "highlight" (a torch) does not.
with ui.button("Highlight", icon="sym_o_format_ink_highlighter").props(
"flat aria-keyshortcuts=Control+Shift+H"
).classes(
"editor-btn editor-toolbar-btn editor-quiet"
) as highlight_button:
highlight_button.tooltip(
"Highlight the selection, or remove the highlight "
"(Ctrl + Shift + H)"
)
highlight_button.on(
"mousedown", js_handler="(event) => event.preventDefault()"
)
highlight_button.on(
"click", lambda: transcript.highlight_selection()
)

# Beside it: a note on the selected words. The same as
# Ctrl+Shift+K, and for the same reason it does not take
# focus on a mouse press.
with ui.button("Comment", icon="sym_o_add_comment").props(
"flat aria-keyshortcuts=Control+Shift+K"
).classes(
"editor-btn editor-toolbar-btn editor-quiet"
) as comment_button:
comment_button.tooltip(
"Comment on the selection, or open its comment "
"(Ctrl + Shift + K)"
)
comment_button.on(
"mousedown", js_handler="(event) => event.preventDefault()"
)
comment_button.on(
"click", lambda: transcript.comment_selection()
)

with ui.row().classes("editor-toolbar-group"):
editor.show_keyboard_shortcuts()
Expand Down Expand Up @@ -797,6 +844,50 @@ def save_show_edits(event) -> None:
"changed"
)

# Only a transcription can hold comments; a
# set of subtitles is saved as plain SRT.
if data_format != "srt":

def save_show_comments(event) -> None:
value = bool(event.sender.value)

# The comment command turns this on
# itself and moves the switch to
# match, which lands here too.
if value != editor.show_comments:
transcript.set_show_comments(value)

# Not saved: hiding them is a way of
# looking at the text for a while, and
# every editor opens with them shown.

# See save_follow above (F-74).
focus_element(event.sender)

comments_switch = ui.switch(
"Comments",
value=editor.show_comments,
).props("dense").classes(
"editor-switch comments-switch"
)
# Same reason as the switches above:
# "click" is mouse-only on a QToggle,
# and update:model-value fires for a
# keyboard activation too.
comments_switch.on(
"update:model-value", save_show_comments
)
with comments_switch:
ui.tooltip(
"Show the comments on words. "
"Hiding them keeps them."
)

def comments_shown() -> None:
comments_switch.value = True

editor.on_comments_shown = comments_shown

# One control rather than a switch plus a level:
# "off" is just the lowest setting of the same
# thing, and splitting them meant two places to
Expand Down Expand Up @@ -928,3 +1019,12 @@ def save_sensitivity(event) -> None:
transcript.on_caret = (
editor.validation_panel.follow_caret
)
else:
# Its counterpart in a transcription: the card
# where comments are written and read, drawn like
# the validation card and following the caret the
# same way. Shut until needed -- except in a file
# that already has comments, which opens on the
# first.
transcript.comments_panel = CommentsPanel(transcript)
transcript.comments_panel.open_first()
Loading
Loading