-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
feat(trace-viewer): Add setting for display canvas content in snapshots #34010
feat(trace-viewer): Add setting for display canvas content in snapshots #34010
Conversation
…ettings-dialog-with-canvas-option
This comment has been minimized.
This comment has been minimized.
else | ||
canvas.title = `Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution.`; | ||
} else { | ||
canvas.title = 'Canvas content display is disabled.'; |
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.
Open to comments/suggestions on these strings
value: shouldPopulateCanvasFromScreenshot, | ||
set: setShouldPopulateCanvasFromScreenshot, | ||
name: 'Display canvas content', | ||
title: 'Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate.' |
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.
Open to comments/suggestions on these strings
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.
"Best effort canvas element visualization." ?
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.
That string is very long. I'd prefer it be shorter so it fits better in the settings UI. I do like the content though.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
packages/trace-viewer/src/ui/settings/useShouldPopulateCanvasFromScreenshot.ts
Outdated
Show resolved
Hide resolved
value: shouldPopulateCanvasFromScreenshot, | ||
set: setShouldPopulateCanvasFromScreenshot, | ||
name: 'Display canvas content', | ||
title: 'Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate.' |
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.
"Best effort canvas element visualization." ?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"3 failed 8 flaky37535 passed, 654 skipped Merge workflow run. |
As discussed in #33940, this PR adds a new setting to the Trace Viewer that allows users to toggle the error-prone psuedo-display of canvas content in snapshots. By default, canvas display is reverted to the previous functionality of displaying a checkered background. If enabled, the canvas content will be extracted from the browser screenshot and displayed.
Additionally adds a Settings dialog dropdown for Trace Viewer, as to group all settings.
Trace Viewer
UI Mode