-
Notifications
You must be signed in to change notification settings - Fork 3k
feat: BROS-377: PDF.js for PDF tag #8344
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
base: develop
Are you sure you want to change the base?
Conversation
Use PDF.js from Mozilla to render pdfs into canvas
❌ Deploy Preview for heartex-docs failed. Why did it fail? →
|
❌ Deploy Preview for label-studio-docs-new-theme failed. Why did it fail? →
|
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
// Render a fallback message | ||
const errorElem = document.createElement("div"); | ||
errorElem.textContent = "Failed to load PDF"; | ||
errorElem.style.color = "#d00"; |
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.
This should use css variables
@@ -103,7 +103,9 @@ const HtxPdf = inject("store")( | |||
return () => { | |||
isCancelled = true; | |||
try { | |||
loadingTask.destroy(); | |||
// @todo this seems like a correct cleanup, but most probably it's called more than once, | |||
// @todo destroying properly loaded pdf |
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.
This is an issue all tag's have, the entire tree could be remounted, a parent can get remounted, and the rerenders which occur happen in an odd way I find.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8344 +/- ##
===========================================
- Coverage 66.22% 60.50% -5.72%
===========================================
Files 761 544 -217
Lines 56359 38277 -18082
Branches 10086 10094 +8
===========================================
- Hits 37324 23160 -14164
+ Misses 19032 15114 -3918
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
/git merge
|
Use PDF.js from Mozilla to render pdfs into canvas