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: rtl scroll converter test asserting incorrect values #6859

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

radium-v
Copy link
Collaborator

@radium-v radium-v commented Nov 8, 2023

Pull Request

πŸ“– Description

Changes the invertedGetRtlScrollConverter returns correct value test to pass when any value < 0 is returned.

🎫 Issues

This PR reverts #6857.

πŸ‘©β€πŸ’» Reviewer Notes

The behavior seems to be related to this Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1324251

It's something called "zoom for DSF" on MacOS, which leads to inaccurate value reporting:

browser value
Chrome 119.0.6045.107 (Headless/Karma) on Windows 11 1
Chrome 119.0.6045.123 on Mac (MBP M1, MacOS 14.0) 0.5
Webkit Nightly 0
Firefox Nightly 0

So while I do still think that screen DPI is partly to blame for Chrome returning 0.5, it seems that setting scrollLeft to 1 when in rtl mode and receiving anything other than 0 is a bug.

βœ… Checklist

General

  • I have included a change request file using $ yarn change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

@radium-v radium-v force-pushed the users/jokreitl/fix-rtl-scroll-converter-test branch from 6f2448e to 758ddfd Compare November 8, 2023 21:48
@radium-v radium-v marked this pull request as draft November 9, 2023 21:31
@radium-v radium-v force-pushed the users/jokreitl/fix-rtl-scroll-converter-test branch from 758ddfd to 5e8ecde Compare November 9, 2023 21:51
@radium-v radium-v marked this pull request as ready for review November 9, 2023 21:53
@chrisdholt chrisdholt merged commit fd65254 into master Nov 10, 2023
5 checks passed
@chrisdholt chrisdholt deleted the users/jokreitl/fix-rtl-scroll-converter-test branch November 10, 2023 23:28
janechu pushed a commit that referenced this pull request Jun 10, 2024
* Revert "fix: RtlScrollConverter test on high dpi systems in fast-web-utilities (#6857)"

This reverts commit a7a3c89.

* force 1x display scale factor in karma

* fix RtlScrollConverter test

- Chromium reports 0.5
- Webkit and Firefox both report 0

* Change files
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.

3 participants