-
Notifications
You must be signed in to change notification settings - Fork 2.9k
chore: Add positioning test for scroll jumps #21878
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
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8454944:
|
📊 Bundle size report🤖 This report was generated against 1940164411685db2967f8452406bb703b94ec266 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 1940164411685db2967f8452406bb703b94ec266 (build) |
cd8b517 to
3db8d21
Compare
| ); | ||
| }; | ||
|
|
||
| storiesOf('Positioning - scroll', module).addStory('no jump', () => { |
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.
separate category here because the position: fixed; centering for other stories doesn't play nicely with scrolling.
Adding overflow: scroll to the previous stories need an update of all the screenshots
apps/vr-tests-react-components/src/stories/Positioning.stories.tsx
Outdated
Show resolved
Hide resolved
apps/vr-tests-react-components/src/stories/Positioning.stories.tsx
Outdated
Show resolved
Hide resolved
apps/vr-tests-react-components/src/stories/Positioning.stories.tsx
Outdated
Show resolved
Hide resolved
| </Portal> | ||
| ) : ( | ||
| <Box ref={containerRef}> | ||
| Focusable element <button ref={buttonRef}>Focus me</button>{' '} |
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.
| Focusable element <button ref={buttonRef}>Focus me</button>{' '} | |
| Focusable element <button ref={buttonRef}>Focus me</button> |
| const floating = renderPortal ? ( | ||
| <Portal> | ||
| <Box ref={containerRef}> | ||
| Focusable element <button ref={buttonRef}>Focus me</button>{' '} |
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.
| Focusable element <button ref={buttonRef}>Focus me</button>{' '} | |
| Focusable element <button ref={buttonRef}>Focus me</button> |
|
|
||
| const floating = renderPortal ? ( | ||
| <Portal> | ||
| <Box ref={containerRef}> |
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.
nit: you can extract Box to a variable to avoid duplication
|
Because this pull request has not had activity for over 150 days, we're automatically closing it for house-keeping purposes. The pull request will still be available for reference. If it's still relevant to merge at some point, you can reopen or make a new version based on the latest code. |
Adds a VR test that focuses an element inside the positioned container as soon as it is open to prevent regression for scroll jumps.