-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Virtualizer: Static scroll hooks and embedded scrollview #26985
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
Merged
Mitch-At-Work
merged 33 commits into
microsoft:master
from
Mitch-At-Work:user/mifraser/virtualizer-scroll-hooks
Mar 22, 2023
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
dbba330
Initial static size measurement
Mitch-At-Work bd18c96
Fix up algo to ensure algo is unidirectional when scroll is
Mitch-At-Work 687f7be
Add scroll container and implement built in hooks
Mitch-At-Work cdbbc7d
Fix up container and scroll refs
Mitch-At-Work db2d20a
Fix up virtualizer length updates to ensure they always propogate
Mitch-At-Work 74f6f25
Add new functionality and hooks
Mitch-At-Work c0cb6ad
Tidy up types and add change files
Mitch-At-Work 5b3ea6b
Add fluent/react package as dev dep for demos
Mitch-At-Work 67dbfe6
Fix up key indexing on multi-unbounded demo
Mitch-At-Work a019ecc
Add fluentui/react as dep
Mitch-At-Work 9ed155d
Ensure resize observer is only enabled once mounted (SSR tests)
Mitch-At-Work a8ba178
Touch up PR comments
Mitch-At-Work 9b0d725
Add ref callback and touch up PR comments
Mitch-At-Work 8c0b331
Remove block
Mitch-At-Work 3c0641e
Test render cycles
Mitch-At-Work 74635fa
Add PR comments
Mitch-At-Work e0326cc
Rebase and touch up
Mitch-At-Work 72adb3a
Update package dep
Mitch-At-Work 02a142d
Fix up undefined ref
Mitch-At-Work b0e53cf
Fix up API
Mitch-At-Work 7e6bd3c
Fix up example type
Mitch-At-Work e38bb49
Update api
Mitch-At-Work c4f92fe
Add document.body call
Mitch-At-Work 6d9059d
Fix up ref callback to be an actual callback func
Mitch-At-Work 1c27efd
Update api
Mitch-At-Work fd24239
PR Comments and update version
Mitch-At-Work 214ca90
Remove I notation from types
Mitch-At-Work 318abe1
Fix up virtualizer length
Mitch-At-Work 99dac13
Remove dynamic type file
Mitch-At-Work 2bca704
Ensure resize observer disconnects on unload
Mitch-At-Work 1e8178e
Remove unused ref in horizontal example
Mitch-At-Work 65ec330
Add PR comments
Mitch-At-Work 3a81dc1
Update package deps
Mitch-At-Work File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-components-267e8104-5e4e-487c-b7aa-766926d9c6bc.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "feat: Add static measurement hooks and embedded scroll option to react-virtualizer", | ||
| "packageName": "@fluentui/react-components", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-virtualizer-4e79b7e8-b7bf-493b-b8cb-fba5a70fecf7.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "[feat] Add static measurement hooks and embedded scroll option", | ||
| "packageName": "@fluentui/react-virtualizer", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "patch" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react-components/react-virtualizer/src/VirtualizerScrollView.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './components/VirtualizerScrollView/index'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...omponents/react-virtualizer/src/components/VirtualizerScrollView/VirtualizerScrollView.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { VirtualizerScrollViewProps } from './VirtualizerScrollView.types'; | ||
| import { useVirtualizerScrollView_unstable } from './useVirtualizerScrollView'; | ||
| import { renderVirtualizerScrollView_unstable } from './renderVirtualizerScrollView'; | ||
| import { useVirtualizerScrollViewStyles_unstable } from './useVirtualizerScrollViewStyles'; | ||
| import * as React from 'react'; | ||
|
|
||
| /** | ||
| * Virtualizer ScrollView | ||
| */ | ||
|
|
||
| export const VirtualizerScrollView: React.FC<VirtualizerScrollViewProps> = (props: VirtualizerScrollViewProps) => { | ||
| const state = useVirtualizerScrollView_unstable(props); | ||
|
|
||
| useVirtualizerScrollViewStyles_unstable(state); | ||
|
|
||
| return renderVirtualizerScrollView_unstable(state); | ||
| }; | ||
|
|
||
| VirtualizerScrollView.displayName = 'VirtualizerScrollView'; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.