chore: Add positioning test for scroll jumps#21878
chore: Add positioning test for scroll jumps#21878ling1726 wants to merge 6 commits intomicrosoft:masterfrom
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.
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.
| 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.
| 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.
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.