Repository navigation
docs(du): close the document viewer README's gaps for app builders - #222
Merged
Merged
Conversation
Base automatically changed from
docs/document-viewer-supported-formats
to
develop
November 26, 2026 06:06
- Quick start: host, load (includeFonts, .catch) and render as three steps,
with a copy-paste staging script.
- Data sources: required/optional data fields, stable `data` reference,
the hook's { artifacts, error } shape, and the loading/error states.
- Supported formats: an unsupported original leaves the page blank and
onReady never fires; no automatic text-view fallback, with a snippet.
- Linking: a self-contained example using only this package and the
SDK's DuFramework types.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sergiubologa
force-pushed
the
docs/document-viewer-readme-gaps
branch
from
November 26, 2026 06:10
503a804 to
b59cf87
Compare
Contributor
📊 Coverage Report
|
anatolie-darii
approved these changes
Nov 26, 2026
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.
What
Fills the gaps a coding agent hit when building a coded app from the
document-viewerREADME alone. We ran it as a test: an agent built from the docs, wrote down every guess it had to make, then checked each one against the source.Quick start is now three steps:
stage-dv-wcscript and a.gitignoreentry.configureDocumentViewerWc({ includeFonts: true }).catch(...).The default
deploymentUrlalready resolves for both Vite and deployed Coded Apps, and the Quick start now says so.Data sources
datafields, marking which are required.dataas a stable reference: every new object triggers a refetch.{ artifacts, error }.Loading and errors
Loading...and surfaces only on theconfigureDocumentViewerWcpromise.Supported formats (corrects docs(du): list the document viewer's supported formats #221)
onReadynever fires; no error message appears.originalby MIME type.Linking it to a form
artifacts.extractionResultfrom the Validation Station package, so it fails type-checking with this package's ownuseDvDocumentArtifacts.DuFrameworktypes, and gives their import paths.Source of truth
useResolvedArtifacts.ts(fetch key,dataidentity dependency, error strings) andbucketArtifactsUtil.ts(required fields,folderScope).renderWc.ts(loadingFallback) anduseWcReady.ts(a failed load stays not-ready).ui-pdf-viewer.component.ts: aloadDocumenterror is filtered out, so no page definitions are created andreadynever fires. The template only hides the progress bar.Docs only, no code change.
🤖 Generated with Claude Code