Skip to content

Align with TPEN messaging contract — UPDATE_CURRENT_LINE#2

Merged
thehabes merged 1 commit into
mainfrom
5-2-tools-align
May 8, 2026
Merged

Align with TPEN messaging contract — UPDATE_CURRENT_LINE#2
thehabes merged 1 commit into
mainfrom
5-2-tools-align

Conversation

@thehabes
Copy link
Copy Markdown
Member

@thehabes thehabes commented May 8, 2026

Summary

Align Line-Breaking with the canonical TPEN messaging contract. Replace SELECT_ANNOTATION/CURRENT_LINE_INDEX with the canonical UPDATE_CURRENT_LINE (single message, single field name currentLineId). The full contract is defined in CenterForDigitalHumanities/TPEN-interfaces#564.

Changes

  • line-breaking.js
    • Window message handler now matches UPDATE_CURRENT_LINE instead of the two legacy aliases.
    • Reads event.data.currentLineId (was event.data.lineId under the old contract).
    • Outbound UPDATE_LINE_TEXT unchanged.

Coordinated cut

Hard cut, all PRs must merge together. Full contract and other PRs:

Test plan

Developer-validated locally on 2026-05-08 against CenterForDigitalHumanities/TPEN-interfaces#564 on :4000:

  • In TPEN-interfaces (jekyll s), add Line-Breaking to a project's tools. Open /transcribe.
  • Click a line in the parent → UPDATE_CURRENT_LINE arrives and the tool's data-line-id attribute on #insert-text updates.
  • Insert a line break via the tool → outbound UPDATE_LINE_TEXT reaches the parent transcription-block.

Replace SELECT_ANNOTATION / CURRENT_LINE_INDEX inbound with the
canonical UPDATE_CURRENT_LINE (currentLineId field). Outbound
UPDATE_LINE_TEXT unchanged.
@thehabes thehabes merged commit 50a9a26 into main May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants