Fix blank canvas on pages without line annotations and add user guidance#371
Merged
Fix blank canvas on pages without line annotations and add user guidance#371
Conversation
Handle pages without lines in updateTranscriptionImages by still loading and displaying the canvas even when there are no line annotations. Shows the full page image instead of returning early. Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix loading of temp pages in transcribe interface
Fix blank canvas on pages without line annotations
Dec 16, 2025
cubap
requested changes
Dec 16, 2025
Member
cubap
left a comment
There was a problem hiding this comment.
also include a dismissible modal that the page has no lines with a line to the annotation interface to define lines manually.
Shows an alert when a page has no line annotations with a link to the annotation interface where users can manually define lines. The alert is dismissible by clicking the "Got it" button. Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
- Encode URL parameters to prevent injection vulnerabilities - Replace innerHTML with DOM element creation for better security - Add CSS via style element instead of inline styles - Add fallback for potential future public API on AlertContainer Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Contributor
Author
Added in commit 65fa6e2. The modal appears when a page has no lines with a link to |
Copilot
AI
changed the title
Fix blank canvas on pages without line annotations
Fix blank canvas on pages without line annotations and add user guidance
Dec 16, 2025
Contributor
Member
|
This illustrates some issues in annotator that I believe are being handled elsewhere. The |
cubap
approved these changes
Dec 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pages with no line annotations displayed blank instead of showing the canvas image.
updateTranscriptionImages()returned early whenthisLinewas undefined, preventing canvas setup.Changes
this.#page.items?.[0]is undefined, extract canvasID from page target viasetCanvasAndSelector(null, this.#page)and render full canvas/interfaces/annotator) with properly encoded project and page IDsSecurity
encodeURIComponent()to prevent injection vulnerabilitiesinnerHTML) for secure content rendering<style>element instead of inline stylesOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.