-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Mobile] - KeyboardAwareFlatList - Enable FlatList virtualization for iOS #59833
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
161e045
Mobile - KeyboardAwareFlatList - Enable virtualization and optimizati…
2c0684d
Merge branch 'trunk' into try/virtualization-ios-flatlist
f4f866f
Merge branch 'trunk' into try/virtualization-ios-flatlist
6b14857
Mobile - KeyboardAwareFlatList - Unitfy optimization props for both p…
2f2e79d
Keyboard Aware FlatList - Unify props
0646a9f
BlockList - Update extraScrollHeight value and remove unneeded scroll…
1e438da
RichText - Clear block selection when a block is unmounted
699c451
Merge branch 'trunk' into try/virtualization-ios-flatlist
8cf317e
Fix import
08b86dc
RichText - Fix clearing current selection when a block is unmounted
9701fbd
Only clear selection if an AztecView is currently focused
b0287c3
RichText - Use isFocused instead of calling InputState
c76db40
Fix clipping issue on Android
66718ff
Merge branch 'trunk' into try/virtualization-ios-flatlist
4132abc
Update FlatList optimization props
be48861
Update Changelog
af847e4
Merge branch 'trunk' into try/virtualization-ios-flatlist
0ae7bae
Merge branch 'trunk' into try/virtualization-ios-flatlist
a9dc932
KeyboardAwareFlatList - Add docs for shared optimization properties
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
This file contains 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 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 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 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 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
26 changes: 26 additions & 0 deletions
26
packages/components/src/mobile/keyboard-aware-flat-list/shared.native.js
This file contains 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,26 @@ | ||
/** | ||
* Optimization properties for FlatList. | ||
* @typedef {Object} OptimizationProps | ||
* @property {number} maxToRenderPerBatch - Controls the amount of items rendered per batch during scrolling. | ||
* Increasing this number reduces visual blank areas but may affect responsiveness. | ||
* Default: 10 | ||
* @property {number} windowSize - Measurement unit representing viewport height. | ||
* Default: 21 (10 viewports above, 10 below, and 1 in between). | ||
* Larger values reduce chances of seeing blank spaces while scrolling but increase memory consumption. | ||
* Smaller values save memory but increase chances of seeing blank areas. | ||
*/ | ||
|
||
/** | ||
* Threshold for applying optimization settings. | ||
* @type {number} | ||
*/ | ||
export const OPTIMIZATION_ITEMS_THRESHOLD = 30; | ||
|
||
/** | ||
* Optimization properties for FlatList. | ||
* @type {OptimizationProps} | ||
*/ | ||
export const OPTIMIZATION_PROPS = { | ||
maxToRenderPerBatch: 15, | ||
windowSize: 17, | ||
}; |
8 changes: 8 additions & 0 deletions
8
packages/components/src/mobile/keyboard-aware-flat-list/styles.native.scss
This file contains 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,8 @@ | ||
.list__container { | ||
flex-grow: 1; | ||
align-items: stretch; | ||
} | ||
|
||
.list__content { | ||
margin-bottom: $mobile-block-toolbar-height; | ||
} |
This file contains 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
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.
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.
At some point, we may want to consider exporting the
scrollEventThrottle
value from a shared constant, as it's used in a few other places. Also not a blocker (since it wasn't a change in this PR), but in context of adding the shared.native.js file for optimization prop values, it may also help provide some context for other developers in the future if all non-default scroll behavior values are exported from the same place.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 agree!