-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Transform visibility when height/width is set. #6000
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
Luckily, I got the number 6000. But test was unlucky. |
Another failure because of Page Load event. |
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.
I confirmed this fixes the original cases mentioned in the original issue. Just a couple notes about making the code more readable / describe what it's checking better.
@jennifer-shehane Refactor finished. |
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.
Yes, this is much better 👍
this caused an example repo to fail https://circleci.com/gh/cypress-io/cypress-test-example-repos/71863 |
* Transform visibility when parent height/width is set. * width: 0 or height: 0 + transform != 'none' => visible. * Refactor transform checker functions.
User facing changelog
When an element uses both
transform
andheight/width
, its bounding client rect becomes 0, but the child elements are visible. This visibility bug is fixed.Additional details
Why was this change necessary?
Visibility false negative
What is affected by this change?
elIsHiddenByTransform
became a bit complicated, because it doesn't usegetBoundingClientRect
but a bit complicated 3D math.Any implementation details to explain?
Check links in the comment.
How has the user experience changed?
Before: false positive.
After: Now, it passes.
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?