Skip to content

Minimize the virtualized-lists fork#3026

Draft
Saadnajmi wants to merge 1 commit into
microsoft:mainfrom
Saadnajmi:saadnajmi/unfork-virtualized-lists
Draft

Minimize the virtualized-lists fork#3026
Saadnajmi wants to merge 1 commit into
microsoft:mainfrom
Saadnajmi:saadnajmi/unfork-virtualized-lists

Conversation

@Saadnajmi

Copy link
Copy Markdown
Collaborator

Summary

  • sync @react-native-macos/virtualized-lists implementation and tests with the React Native merge-base
  • retain one macOS-only delta for native vertical inversion so trackpad, mouse-wheel, and scrollbar behavior remain native
  • keep horizontal inverted lists transform-based
  • move opt-in keyboard selection state, callbacks, isSelected, and selectRowAtIndex into FlatList
  • keep ScrollView generic; it only preserves native children when macOS native inversion is active

Why

The fork duplicated upstream list implementation primarily for keyboard selection and native inversion. Selection is FlatList/listbox semantics, while VirtualizedList should remain generic virtualization infrastructure. Native vertical inversion still needs a minimal strategy clause because upstream transform inversion does not provide correct macOS scrolling interactions.

After this change, the virtualized-lists fork differs from the upstream merge-base in only Lists/VirtualizedList.js, where vertical macOS inversion omits transform styles.

Behavior notes

  • FlatList keeps the existing macOS keyboard-selection API.
  • SectionList and direct VirtualizedList no longer expose the unused keyboard-selection API.
  • Vertical inverted lists continue using native macOS inversion.
  • Horizontal inverted lists use scaleX(-1) because AppKit native inversion is vertical only.

Validation

  • yarn flow-check
  • 11 focused Jest suites: 189 passed, 2 skipped, 82 snapshots
  • Prettier and ESLint on all changed source files
  • verified the virtualized-lists package has exactly one implementation-file delta from upstream

Move macOS keyboard selection into FlatList and sync the virtualized-lists implementation with upstream, retaining only native vertical inversion support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant