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

US152268 - Handle RTL scrolling/overflow cases #190

Merged
merged 6 commits into from
Sep 25, 2023

Conversation

svanherk
Copy link
Contributor

@svanherk svanherk commented Sep 25, 2023

Because of how Playwright screenshots work, overflow and scrolling in RTL is not handled properly when capturing beyond the viewport is off. But if we force it on, we have to do all the calculations ourselves. This PR tries to do those in the background automatically, if we detect we are in RTL mode and overflowing (negative x value) or scrolling (window.scrollX value).

I've first pushed the new tests to highlight the issue, and merged those goldens in. Then I added the fix, so this second report shows what used to be captured and what is now captured.

From what I can tell running it locally, none of the current core tests hit this new calculation (which is expected). Once this is in, I'll open the table PR that needs it.

@svanherk svanherk requested a review from a team as a code owner September 25, 2023 13:30
Copy link
Member

@dlockhart dlockhart left a comment

Choose a reason for hiding this comment

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

Yay, amazing!

@svanherk svanherk merged commit e574b26 into main Sep 25, 2023
2 checks passed
@svanherk svanherk deleted the US152268_Handle_RTL_scrolling_cases branch September 25, 2023 17:27
@ghost
Copy link

ghost commented Sep 25, 2023

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants