Screenshot and video errors#104
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the widget’s attachment/screenshot handling to support video uploads and reduce screenshot-generation failures by introducing a dom-to-image-more-based capture path with an html2canvas fallback, alongside a small UI expand/collapse CSS adjustment.
Changes:
- Allow additional attachment MIME types (
video/mp4,video/webm). - Rework screenshot creation to try
dom-to-image-morefirst (loaded dynamically) and fall back tohtml2canvas. - Adjust finished-tasks expansion styling and remove (comment out) console logging for attachment-send failures.
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| styles/doboard-widget.css | Changes finished-tasks expanded container max-height behavior. |
| js/src/widget.js | Alters error-handling logging behavior for attachment upload failures. |
| js/src/fileuploader.js | Adds video MIME support and rewrites screenshot generation logic with a new dynamic loader. |
| dist/doboard-widget-bundle.js | Updates the built bundle to reflect the source changes above. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async loadDomToImage() { | ||
| return new Promise((resolve, reject) => { | ||
| if (window.domtoimage) { | ||
| resolve(window.domtoimage); | ||
| return; | ||
| } | ||
| const script = document.createElement('script'); | ||
| script.src = 'https://cdn.jsdelivr.net/npm/dom-to-image-more@3.1.6/dist/dom-to-image-more.min.js'; | ||
| script.onload = () => resolve(window.domtoimage); | ||
| script.onerror = () => reject(new Error('Failed to load dom-to-image-more')); | ||
| document.head.appendChild(script); | ||
| }); |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 7 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
js/src/widget.js:373
signupContainer.style.displayis being set to'block'/'none', which will override CSS that expects this container to bedisplay: flexwhen the widget is maximized (.doboard_task_widget-container-maximize .doboard_task_widget-auth-inputs-container). This can break the layout in maximized mode. Prefer toggling a hidden class (e.g.doboard_task_widget-hidden) or clearing the inline style ('') so the CSS rules can apply, and only setdisplay: nonewhen hiding.
if (signupContainer) {
signupContainer.style.display = loginContainer?.classList?.contains('doboard_task_widget-hidden')
? 'none'
: 'block'
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async loadDomToImage() { | ||
| return new Promise((resolve, reject) => { | ||
| if (window.domtoimage) { | ||
| resolve(window.domtoimage); | ||
| return; | ||
| } | ||
| const script = document.createElement('script'); | ||
| script.src = 'https://cdn.jsdelivr.net/npm/dom-to-image-more@3.1.6/dist/dom-to-image-more.min.js'; | ||
| script.onload = () => resolve(window.domtoimage); | ||
| script.onerror = () => reject(new Error('Failed to load dom-to-image-more')); | ||
| document.head.appendChild(script); | ||
| }); |
No description provided.