Skip to content
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

Issue-24918: Favorite pages: print the error message from the HTML2Canvas lib to the console #24936

Conversation

manuelrojas
Copy link
Contributor

@manuelrojas manuelrojas commented May 15, 2023

Proposed Changes

🤖 Generated by Copilot at 2550ba3

Improved the functionality and appearance of the dot-favorite-page component and the dot-html-to-image component. Fixed an unused import and added error handling in the former, and enhanced iframe loading and rendering in the latter. Adjusted the height and position of the components to avoid extra space and overlapping.

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (add notes if applicable)

Additional Info

** any additional useful context or info **

Screenshots

image

image

image
Screen.Recording.2023-05-17.at.5.41.14.PM.mov
Screen.Recording.2023-05-17.at.5.42.27.PM.mov

@manuelrojas manuelrojas marked this pull request as ready for review May 15, 2023 15:36
…e-error-message-from-the-html2canvas-lib-to-the-console
@manuelrojas manuelrojas linked an issue May 15, 2023 that may be closed by this pull request
@dotcms-sonarqube
Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition 0.0% 0.0% Coverage on New Code (is less than 80%)

See analysis details on SonarQube

@@ -34,6 +36,8 @@ export class DotHtmlToImage {
}).then((canvas) => {
canvas.toBlob((blob) => {
const fileObj = new File([blob], 'image.png');
const iframe = parent.document.querySelector('#${this.iframeId}');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check if this shouldn't be a be a backtick, instead of a single quote?
const iframe = parent.document.querySelector(`#${this.iframeId}`);

also on lines 42 and 49

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been generated correctly:

image

@fmontes fmontes merged commit d7d97b4 into release-23.06 May 18, 2023
@fmontes fmontes deleted the issue-24918-favorite-pages-print-the-error-message-from-the-html2canvas-lib-to-the-console branch May 18, 2023 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants