UX: PDF viewer has no loading indicator or error state when pdfjs-dist fails to initialise #543
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
PdfViewer.sveltecallsinit()fromonMount, which loadspdfjs-distvia a dynamic import. Between mount andpdfjsReady = true, the component is in an indeterminate state:init()rejects (network failure, missing bundle),pdfjsReadystaysfalseand the user sees no error messageThe
libLoaderinjection added in PR #536 makes both states explicitly testable via thePdfViewerlibLoaderprop.Acceptance criteria
init()is pendinginit()rejects (theerrorstate returned bycreatePdfRenderercan drive this)libLoader:Raised by Sara Holt and Leonie Voss in PR #536 round-4 review.