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

VUU-333: Improve Screenshot Functionality #1076

Merged

Conversation

vferraro-scottlogic
Copy link
Contributor

There is an open BUG tracking this issue on the html-to-image repo. The following changes are aimed at mitigating the issue with the UI freezing when taking a screenshot of a very complex layout

Changes

  • When taking the screenshot, filter DOM elements out based on role (exclude the content of every element that has role="row")
  • add spinner while image is loading
  • takeScreenshot function will reject with an error message if something went wrong while taking the screenshot
  • SaveLayoutDialog will render:
    • a screenshot if screenshot state is not undefined
    • an error message if screenshotErrorMessage is not undefined
    • or else a spinner

Before
2
before

After
1
after

takeScreenshot function throws error (in this case the error is thrown because the layout is not displayed in the DOM)
3

Note

  • Filtering out the row elements means we won't be displaying the content of the tables inside the screenshot which could be a positive thing if we are worried about the data being sensitive

Copy link

netlify bot commented Dec 13, 2023

Deploy Preview for papaya-valkyrie-395400 ready!

Name Link
🔨 Latest commit fa1ed92
🔍 Latest deploy log https://app.netlify.com/sites/papaya-valkyrie-395400/deploys/6579bddae6e2d30008181d4a
😎 Deploy Preview https://deploy-preview-1076--papaya-valkyrie-395400.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@heswell heswell merged commit e510ba3 into finos:main Dec 21, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants