CenterForDigitalHumanities / CenterForDigitalHumanities/Preview-Transcription

Reflect parent-side line-text edits in real time

Open Beginner friendly
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Surfaced during testing of the `5-2-tools-align` cut (this repo's PR #6, authority PR CenterForDigitalHumanities/TPEN-interfaces#564). Preview-Transcription only shows the line text it fetches on boot from `annotationPage`, plus values it sends itself via `UPDATE_LINE_TEXT`. Edits made directly in the parent transcription-block do not propagate, so the preview drifts stale until the tool is reloaded.

This is a pre-existing gap, not introduced by PR #6.

## Required change

Pending the parent-side broadcaster (CenterForDigitalHumanities/TPEN-interfaces — see companion issue), add a case for `LINE_TEXT_UPDATED { lineId, text }` in the `window` `message` listener in `index.html`. Locate the row by `lineId` and update its `` value. The existing `highlightLine(lineId)` lookup pattern is the right shape to re-use.

## Companion issue

CenterForDigitalHumanities/TPEN-interfaces#565

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in index.html at the window message listener and review the existing highlightLine(lineId) lookup pattern. Add handling for LINE_TEXT_UPDATED { lineId, text } so the matching input reflects the new text. Done means parent-side line edits update the preview without reloading, once the companion broadcaster is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.