-
Notifications
You must be signed in to change notification settings - Fork 3
Standardize TPEN ↔ tool messaging contract #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0b35bbb
4b3ba49
1af3adc
0ccf3f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -155,16 +155,11 @@ export default class TranscriptionBlock extends HTMLElement { | |
| if (typeof index === 'number') this.scheduleLineSave(index) | ||
| }) | ||
|
|
||
| // Window message handler for external tool communication | ||
| // Window message handler for external tool communication. Line | ||
| // navigation is owned by simple-transcription; this listener only | ||
| // handles UPDATE_LINE_TEXT (e.g. Line-Breaking, Preview-Transcription | ||
| // pushing edited line text into the active transcription block). | ||
| this.renderCleanup.onWindow('message', (event) => { | ||
| if (event.data?.type === "RETURN_LINE_ID") { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be replaced with NAVIGATE? It seems to fit here better than the simple-transcription, above. Probably even more correct would be to watch
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good architectural question — agreed it's worth it. Filing as a follow-up: this cut intentionally centralizes line-nav ownership in |
||
| const lineIndex = this.#page.items.findIndex(item => item.id === event.data.lineId) | ||
| if (lineIndex !== -1) { | ||
| this.moveToLine(lineIndex, 'next') | ||
| this.updateTranscriptionUI() | ||
| } | ||
| } | ||
|
|
||
| if (event.data?.type === "UPDATE_LINE_TEXT") { | ||
| if (typeof event.data.lineIndex === 'number') { | ||
| this.shadowRoot.querySelector('.transcription-input').value = event.data.text | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compare to canvas-panel handling which also checks these events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transcription-canvas-panel/index.jsis orphaned — flagged out of scope in the plan and not instantiated anywhere. Left alone here; eventual removal is its own piece of work.