CenterForDigitalHumanities / CenterForDigitalHumanities/TPEN-interfaces

Broadcast parent-side line-text edits to active tool iframes

Open
#565 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Surfaced during testing of the `5-2-tools-align` cut (PR #564). The parent `transcription-block` does not broadcast text-input changes to the active tool iframe, so iframe tools that display line text (notably Preview-Transcription) show only the values fetched at boot, plus values they themselves sent via `UPDATE_LINE_TEXT`. Edits typed directly into the parent stay invisible to the tool until reload.

This is a pre-existing gap, not introduced by #564. Deferred so the contract-standardization PR stays focused on standardization.

## Proposed shape

Extend the parent → tool contract with one new message:

```js
{ type: 'LINE_TEXT_UPDATED', lineId: '', text: '' }
```

Wire `transcription-block`'s input-change handler (around the existing `markLineDirty` / `scheduleLineSave` sites in `components/transcription-block/index.js`) to call `simple-transcription`'s `#postToTool` with the new message. The active iframe's `#activeToolIframe` is already tracked in `simple-transcription`.

## Companion work

Preview-Transcription needs a corresponding inbound handler. Tracked separately so each repo carries its own commit.

## Companion issue

CenterForDigitalHumanities/Preview-Transcription#7

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.