Skip to content

Commit e40c10b

Browse files
lunaleapsfacebook-github-bot
authored andcommitted
Introduce experimental VirtualView (facebook#52519)
Summary: Pull Request resolved: facebook#52519 Changelog: [Internal] - Experiment with intersection logic for VirtualViews in scrollView. Currently only on Android ### Changes in detail `VirtualViewContainer` is held by the ScrollView and is lazily instantiated once a VirtualView tries to access. Upon initial layout, a VirtualView will add itself to the container and report its updated `rect`. `VirtualViewContainer` holds a sorted list of VirtualViews and iterates through them to update mode Reviewed By: yungsters Differential Revision: D77313890 fbshipit-source-id: 30843143bf1828dcac9091479964e83934bf330c
1 parent aa5b855 commit e40c10b

File tree

17 files changed

+1149
-18
lines changed

17 files changed

+1149
-18
lines changed

packages/react-native/Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ let reactFabric = RNTarget(
398398
"components/textinput/platform/ios/",
399399
"components/unimplementedview",
400400
"components/virtualview",
401+
"components/virtualviewexperimental",
401402
"components/root/tests",
402403
],
403404
dependencies: [.reactNativeDependencies, .reactJsiExecutor, .rctTypesafety, .reactTurboModuleCore, .jsi, .logger, .reactDebug, .reactFeatureFlags, .reactUtils, .reactRuntimeScheduler, .reactCxxReact, .reactRendererDebug, .reactGraphics, .yoga],
@@ -433,7 +434,7 @@ let reactFabricComponents = RNTarget(
433434
"conponents/rncore", // this was the old folder where RN Core Components were generated. If you ran codegen in the past, you might have some files in it that might make the build fail.
434435
],
435436
dependencies: [.reactNativeDependencies, .reactCore, .reactJsiExecutor, .reactTurboModuleCore, .jsi, .logger, .reactDebug, .reactFeatureFlags, .reactUtils, .reactRuntimeScheduler, .reactCxxReact, .yoga, .reactRendererDebug, .reactGraphics, .reactFabric, .reactTurboModuleBridging],
436-
sources: ["components/inputaccessory", "components/modal", "components/safeareaview", "components/text", "components/text/platform/cxx", "components/textinput", "components/textinput/platform/ios/", "components/unimplementedview", "components/virtualview", "textlayoutmanager", "textlayoutmanager/platform/ios"]
437+
sources: ["components/inputaccessory", "components/modal", "components/safeareaview", "components/text", "components/text/platform/cxx", "components/textinput", "components/textinput/platform/ios/", "components/unimplementedview", "components/virtualview", "components/virtualviewexperimental", "textlayoutmanager", "textlayoutmanager/platform/ios"]
437438
)
438439

439440
/// React-FabricImage.podspec
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#import <UIKit/UIKit.h>
9+
10+
#import <React/RCTViewComponentView.h>
11+
12+
NS_ASSUME_NONNULL_BEGIN
13+
14+
@interface RCTVirtualViewExperimentalComponentView : RCTViewComponentView
15+
16+
+ (instancetype)new NS_UNAVAILABLE;
17+
- (instancetype)init NS_UNAVAILABLE;
18+
- (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
19+
20+
- (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER;
21+
22+
@end
23+
24+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)