Skip to content

Keep Transcription Workspace On Screen#570

Merged
cubap merged 4 commits into
mainfrom
551-tall-lines
May 13, 2026
Merged

Keep Transcription Workspace On Screen#570
cubap merged 4 commits into
mainfrom
551-tall-lines

Conversation

@thehabes
Copy link
Copy Markdown
Member

@thehabes thehabes commented May 13, 2026

Summary

Fixes #551 — a transcription line that boxes a tall region (a full un-split column, a tall decoration, etc.) was sizing #imgTop so large that #transWorkspace and the #imgBottom preview got pushed below the viewport. Body is overflow: hidden, so the editor for the active line became unreachable.

What changed

components/simple-transcription/index.js

  • Added #updateImgTopMaxHeight() — caps #imgTop's max-height to imageContainer.clientHeight - workspaceHeight - 40px, floored at 120px so we never collapse it on weird layouts.
  • Hooked it up two ways:
    • ResizeObserver on #transWorkspace so the cap recomputes whenever tools open/close change the workspace's height.
    • handleResize() now calls it as well, so viewport resizes pick up the new .image-container height (pinned at 100vh).
  • Observer is registered with renderCleanup so it disconnects on re-render / disconnect.

No changes to canvas-panel rendering, zoom math, or the line-overlay alignment — #imgTop keeps its natural sizing from adjustImages() and is only clamped at the top end via max-height.

…y the canvas-panel renderings, just keeps the workspace on screen.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

@thehabes thehabes marked this pull request as ready for review May 13, 2026 19:23
@thehabes thehabes requested a review from cubap May 13, 2026 19:25
Copy link
Copy Markdown
Member

@cubap cubap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with three things and it worked every time

@cubap cubap merged commit 7d8d5bc into main May 13, 2026
2 checks passed
@cubap cubap deleted the 551-tall-lines branch May 13, 2026 20:23
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.

Tall Lines Put Transcription Workspace In A Bad Spot

2 participants