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

fix(trace viewer): Screenshot click target placement #33114

Closed

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Oct 15, 2024

This closes the last element of #32847, so it reverts the changes where we hide the toggle.

Misplacement before:

Screen.Recording.2024-10-15.at.11.38.02.mov

Correct placement after:

Screen.Recording.2024-10-15.at.11.36.59.mov

The bug was two-fold.

  1. Because it's rendered as position: fixed, we need to take the <BrowserFrame />'s height into account.
  2. Our centering with margin: -10px 0 0 -10px was relying on a 20px width that wasn't perfect. transform works better, learned that through https://css-tricks.com/quick-css-trick-how-to-center-an-object-exactly-in-the-center/.

Closes #32847

@Skn0tt Skn0tt requested a review from dgozman October 15, 2024 09:42
@Skn0tt Skn0tt self-assigned this Oct 15, 2024
Copy link
Contributor

Test results for "tests 1"

2 fatal errors, not part of any test

1 flaky ⚠️ [webkit-library] › library/screenshot.spec.ts:204:14 › element screenshot › element screenshot should work with a mobile viewport @webkit-ubuntu-22.04-node18

35966 passed, 612 skipped, 1 did not run
✔️✔️✔️

Merge workflow run.

@Skn0tt
Copy link
Member Author

Skn0tt commented Oct 18, 2024

closing in favour of #33119

@Skn0tt Skn0tt closed this Oct 18, 2024
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.

[internal]: screenshot instead of snapshot polishing
2 participants