-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Experimental fast visibility #6337
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
base: release/15.8.0
Are you sure you want to change the base?
Conversation
cypress-documentation
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress-documentation
|
| Branch Review |
experimental-fast-visibility
|
| Run status |
|
| Run duration | 05m 23s |
| Commit |
|
| Committer | Cacie Prins |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
311
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
10.67%
|
|
|---|---|
|
|
2546
|
|
|
3
|
Accessibility
97.2%
|
|
|---|---|
|
|
1 critical
3 serious
4 moderate
0 minor
|
|
|
27
|
| #### An element is considered hidden if: | ||
|
|
||
| - Its `width` or `height` is `0`. | ||
| - Its CSS property (or ancestors) is `visibility: hidden`. |
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.
More of a nit but this reads kind of strange to me since elements can have multiple properties? Feel free to ignore this since you are just moving the section 😅
| - Its CSS property (or ancestors) is `visibility: hidden`. | |
| - It (or ancestors) has CSS property `visibility: hidden`. |
| hidden when | ||
| [asserting on the element's visibility directly](/app/references/assertions#Visibility). | ||
|
|
||
| However elements where the CSS property (or ancestors) is `opacity: 0` are |
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.
| However elements where the CSS property (or ancestors) is `opacity: 0` are | |
| However, elements where the CSS property (or ancestors) is `opacity: 0` are |
|
|
||
| #### Limitations | ||
|
|
||
| Experimental fast visibility is an experimental feature that is still under development. It is not yet fully compatible with the legacy visibility algorithm. |
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.
does this imply that we are trying to achieve backwards compatibility at some point?
|
|
||
| The fast visibility algorithm provides several advantages over the legacy algorithm: | ||
|
|
||
| - **Better performance**: Constant-time in the best case, and bounded exponential in the worst case (when point sampling on a fully hidden element) |
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.
Do we know how this compares directly to the current algorithm or is determining complexity for that incredibly challenging to distill briefly?
|
|
||
| :::caution | ||
|
|
||
| The experimental fast visibility algorithm is not yet fully compatible with the legacy visibility algorithm. Tests that rely on edge-case behavior of the legacy visibility algorithm may fail or behave incorrectly. |
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.
This transition feels awkward but I don't love my suggestion.
| The experimental fast visibility algorithm is not yet fully compatible with the legacy visibility algorithm. Tests that rely on edge-case behavior of the legacy visibility algorithm may fail or behave incorrectly. | |
| The experimental fast visibility algorithm is not yet fully compatible with the legacy visibility algorithm. Tests that rely on edge-case behavior of the legacy visibility algorithm may fail or behave incorrectly. Remember, following apply to the experimental fast visibility algorithm: |
Expands the visibility section in "interacting with elements" to include the "fast" visibility algorithm heuristics/semantics. Cross-references with links, and links to the main github issue tracking this experiment.