Skip to content

Commit 115ad85

Browse files
joevilchesfacebook-github-bot
authored andcommitted
Allow RCTScrollViewComponentView to be subclass-able
Summary: While RCTScrollViewComponentView is overridable, its NOT a UIScrollView. It has a private property this is the scroll view and if you want to override UIScrollView behavior you have to change this. Changelog: [Internal] Reviewed By: sbuggay Differential Revision: D99462381
1 parent e681736 commit 115ad85

7 files changed

Lines changed: 69 additions & 3 deletions

File tree

packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
3636
/*
3737
* Returns an actual UIScrollView that this component uses under the hood.
3838
*/
39-
@property (nonatomic, strong, readonly) UIScrollView *scrollView;
39+
@property (nonatomic, strong, readwrite) UIScrollView *scrollView;
4040

4141
/** Focus area of newly-activated text input relative to the window to compare against UIKeyboardFrameBegin/End */
4242
@property (nonatomic, assign) CGRect firstResponderFocus;

scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,6 +3871,11 @@ class facebook::react::NativeVibrationSpecJSI : public facebook::react::JavaTurb
38713871
public NativeVibrationSpecJSI(const facebook::react::JavaTurboModule::InitParams& params);
38723872
}
38733873

3874+
class facebook::react::NativeViewTransition : public facebook::react::NativeViewTransitionCxxSpec<facebook::react::NativeViewTransition> {
3875+
public NativeViewTransition(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
3876+
public std::optional<facebook::jsi::Object> getViewTransitionInstance(facebook::jsi::Runtime& rt, const std::string& name, const std::string& pseudo);
3877+
}
3878+
38743879
class facebook::react::NativeWebSocketModuleSpecJSI : public facebook::react::JavaTurboModule {
38753880
public NativeWebSocketModuleSpecJSI(const facebook::react::JavaTurboModule::InitParams& params);
38763881
}
@@ -5657,6 +5662,7 @@ enum facebook::react::BlendMode {
56575662
Multiply,
56585663
Normal,
56595664
Overlay,
5665+
PlusLighter,
56605666
Saturation,
56615667
Screen,
56625668
SoftLight,
@@ -8920,6 +8926,12 @@ class facebook::react::NativeVibrationCxxSpec : public facebook::react::TurboMod
89208926
public static constexpr std::string_view kModuleName;
89218927
}
89228928

8929+
template <typename T>
8930+
class facebook::react::NativeViewTransitionCxxSpec : public facebook::react::TurboModule {
8931+
protected NativeViewTransitionCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8932+
public static constexpr std::string_view kModuleName;
8933+
}
8934+
89238935
template <typename T>
89248936
class facebook::react::NativeWebSocketModuleCxxSpec : public facebook::react::TurboModule {
89258937
protected NativeWebSocketModuleCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -10673,6 +10685,7 @@ class facebook::react::jsinspector_modern::RuntimeAgent {
1067310685
public const facebook::react::jsinspector_modern::ExecutionContextDescription& getExecutionContextDescription() const;
1067410686
public facebook::react::jsinspector_modern::RuntimeAgent::ExportedState getExportedState();
1067510687
public void notifyBindingCalled(const std::string& bindingName, const std::string& payload);
10688+
public void notifyFastRefreshComplete();
1067610689
public ~RuntimeAgent();
1067710690
}
1067810691

scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3868,6 +3868,11 @@ class facebook::react::NativeVibrationSpecJSI : public facebook::react::JavaTurb
38683868
public NativeVibrationSpecJSI(const facebook::react::JavaTurboModule::InitParams& params);
38693869
}
38703870

3871+
class facebook::react::NativeViewTransition : public facebook::react::NativeViewTransitionCxxSpec<facebook::react::NativeViewTransition> {
3872+
public NativeViewTransition(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
3873+
public std::optional<facebook::jsi::Object> getViewTransitionInstance(facebook::jsi::Runtime& rt, const std::string& name, const std::string& pseudo);
3874+
}
3875+
38713876
class facebook::react::NativeWebSocketModuleSpecJSI : public facebook::react::JavaTurboModule {
38723877
public NativeWebSocketModuleSpecJSI(const facebook::react::JavaTurboModule::InitParams& params);
38733878
}
@@ -5648,6 +5653,7 @@ enum facebook::react::BlendMode {
56485653
Multiply,
56495654
Normal,
56505655
Overlay,
5656+
PlusLighter,
56515657
Saturation,
56525658
Screen,
56535659
SoftLight,
@@ -8911,6 +8917,12 @@ class facebook::react::NativeVibrationCxxSpec : public facebook::react::TurboMod
89118917
public static constexpr std::string_view kModuleName;
89128918
}
89138919

8920+
template <typename T>
8921+
class facebook::react::NativeViewTransitionCxxSpec : public facebook::react::TurboModule {
8922+
protected NativeViewTransitionCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
8923+
public static constexpr std::string_view kModuleName;
8924+
}
8925+
89148926
template <typename T>
89158927
class facebook::react::NativeWebSocketModuleCxxSpec : public facebook::react::TurboModule {
89168928
protected NativeWebSocketModuleCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -10529,6 +10541,7 @@ class facebook::react::jsinspector_modern::RuntimeAgent {
1052910541
public const facebook::react::jsinspector_modern::ExecutionContextDescription& getExecutionContextDescription() const;
1053010542
public facebook::react::jsinspector_modern::RuntimeAgent::ExportedState getExportedState();
1053110543
public void notifyBindingCalled(const std::string& bindingName, const std::string& payload);
10544+
public void notifyFastRefreshComplete();
1053210545
public ~RuntimeAgent();
1053310546
}
1053410547

scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,8 +1987,8 @@ interface RCTScrollView : public RCTView <UIScrollViewDelegate, RCTScrollablePro
19871987
interface RCTScrollViewComponentView {
19881988
protected __pad0__;
19891989
public @property (assign) CGRect firstResponderFocus;
1990+
public @property (strong) UIScrollView* scrollView;
19901991
public @property (strong, readonly) RCTGenericDelegateSplitter<id<UIScrollViewDelegate>>* scrollViewDelegateSplitter;
1991-
public @property (strong, readonly) UIScrollView* scrollView;
19921992
public @property (strong, readonly) UIView* containerView;
19931993
public @property (weak) UIView* firstResponderViewOutsideScrollView;
19941994
public virtual static _Nullable RCTScrollViewComponentView* findScrollViewComponentViewForView:(UIView* view);
@@ -6469,6 +6469,11 @@ class facebook::react::NativeVibrationSpecJSI : public facebook::react::ObjCTurb
64696469
public NativeVibrationSpecJSI(const facebook::react::ObjCTurboModule::InitParams& params);
64706470
}
64716471

6472+
class facebook::react::NativeViewTransition : public facebook::react::NativeViewTransitionCxxSpec<facebook::react::NativeViewTransition> {
6473+
public NativeViewTransition(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
6474+
public std::optional<facebook::jsi::Object> getViewTransitionInstance(facebook::jsi::Runtime& rt, const std::string& name, const std::string& pseudo);
6475+
}
6476+
64726477
class facebook::react::NativeWebSocketModuleSpecJSI : public facebook::react::ObjCTurboModule {
64736478
public NativeWebSocketModuleSpecJSI(const facebook::react::ObjCTurboModule::InitParams& params);
64746479
}
@@ -8262,6 +8267,7 @@ enum facebook::react::BlendMode {
82628267
Multiply,
82638268
Normal,
82648269
Overlay,
8270+
PlusLighter,
82658271
Saturation,
82668272
Screen,
82678273
SoftLight,
@@ -11295,6 +11301,12 @@ class facebook::react::NativeVibrationCxxSpec : public facebook::react::TurboMod
1129511301
public static constexpr std::string_view kModuleName;
1129611302
}
1129711303

11304+
template <typename T>
11305+
class facebook::react::NativeViewTransitionCxxSpec : public facebook::react::TurboModule {
11306+
protected NativeViewTransitionCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
11307+
public static constexpr std::string_view kModuleName;
11308+
}
11309+
1129811310
template <typename T>
1129911311
class facebook::react::NativeWebSocketModuleCxxSpec : public facebook::react::TurboModule {
1130011312
protected NativeWebSocketModuleCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -12964,6 +12976,7 @@ class facebook::react::jsinspector_modern::RuntimeAgent {
1296412976
public const facebook::react::jsinspector_modern::ExecutionContextDescription& getExecutionContextDescription() const;
1296512977
public facebook::react::jsinspector_modern::RuntimeAgent::ExportedState getExportedState();
1296612978
public void notifyBindingCalled(const std::string& bindingName, const std::string& payload);
12979+
public void notifyFastRefreshComplete();
1296712980
public ~RuntimeAgent();
1296812981
}
1296912982

scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,8 +1987,8 @@ interface RCTScrollView : public RCTView <UIScrollViewDelegate, RCTScrollablePro
19871987
interface RCTScrollViewComponentView {
19881988
protected __pad0__;
19891989
public @property (assign) CGRect firstResponderFocus;
1990+
public @property (strong) UIScrollView* scrollView;
19901991
public @property (strong, readonly) RCTGenericDelegateSplitter<id<UIScrollViewDelegate>>* scrollViewDelegateSplitter;
1991-
public @property (strong, readonly) UIScrollView* scrollView;
19921992
public @property (strong, readonly) UIView* containerView;
19931993
public @property (weak) UIView* firstResponderViewOutsideScrollView;
19941994
public virtual static _Nullable RCTScrollViewComponentView* findScrollViewComponentViewForView:(UIView* view);
@@ -6466,6 +6466,11 @@ class facebook::react::NativeVibrationSpecJSI : public facebook::react::ObjCTurb
64666466
public NativeVibrationSpecJSI(const facebook::react::ObjCTurboModule::InitParams& params);
64676467
}
64686468

6469+
class facebook::react::NativeViewTransition : public facebook::react::NativeViewTransitionCxxSpec<facebook::react::NativeViewTransition> {
6470+
public NativeViewTransition(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
6471+
public std::optional<facebook::jsi::Object> getViewTransitionInstance(facebook::jsi::Runtime& rt, const std::string& name, const std::string& pseudo);
6472+
}
6473+
64696474
class facebook::react::NativeWebSocketModuleSpecJSI : public facebook::react::ObjCTurboModule {
64706475
public NativeWebSocketModuleSpecJSI(const facebook::react::ObjCTurboModule::InitParams& params);
64716476
}
@@ -8253,6 +8258,7 @@ enum facebook::react::BlendMode {
82538258
Multiply,
82548259
Normal,
82558260
Overlay,
8261+
PlusLighter,
82568262
Saturation,
82578263
Screen,
82588264
SoftLight,
@@ -11286,6 +11292,12 @@ class facebook::react::NativeVibrationCxxSpec : public facebook::react::TurboMod
1128611292
public static constexpr std::string_view kModuleName;
1128711293
}
1128811294

11295+
template <typename T>
11296+
class facebook::react::NativeViewTransitionCxxSpec : public facebook::react::TurboModule {
11297+
protected NativeViewTransitionCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
11298+
public static constexpr std::string_view kModuleName;
11299+
}
11300+
1128911301
template <typename T>
1129011302
class facebook::react::NativeWebSocketModuleCxxSpec : public facebook::react::TurboModule {
1129111303
protected NativeWebSocketModuleCxxSpec(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
@@ -12830,6 +12842,7 @@ class facebook::react::jsinspector_modern::RuntimeAgent {
1283012842
public const facebook::react::jsinspector_modern::ExecutionContextDescription& getExecutionContextDescription() const;
1283112843
public facebook::react::jsinspector_modern::RuntimeAgent::ExportedState getExportedState();
1283212844
public void notifyBindingCalled(const std::string& bindingName, const std::string& payload);
12845+
public void notifyFastRefreshComplete();
1283312846
public ~RuntimeAgent();
1283412847
}
1283512848

scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,6 +2519,11 @@ class facebook::react::NativeToJsBridge {
25192519
public void* getJavaScriptContext();
25202520
}
25212521

2522+
class facebook::react::NativeViewTransition : public NativeViewTransitionCxxSpec<facebook::react::NativeViewTransition> {
2523+
public NativeViewTransition(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
2524+
public std::optional<facebook::jsi::Object> getViewTransitionInstance(facebook::jsi::Runtime& rt, const std::string& name, const std::string& pseudo);
2525+
}
2526+
25222527
class facebook::react::NetworkReporter {
25232528
public bool isDebuggingEnabled() const;
25242529
public static facebook::react::NetworkReporter& getInstance();
@@ -4053,6 +4058,7 @@ enum facebook::react::BlendMode {
40534058
Multiply,
40544059
Normal,
40554060
Overlay,
4061+
PlusLighter,
40564062
Saturation,
40574063
Screen,
40584064
SoftLight,
@@ -7744,6 +7750,7 @@ class facebook::react::jsinspector_modern::RuntimeAgent {
77447750
public const facebook::react::jsinspector_modern::ExecutionContextDescription& getExecutionContextDescription() const;
77457751
public facebook::react::jsinspector_modern::RuntimeAgent::ExportedState getExportedState();
77467752
public void notifyBindingCalled(const std::string& bindingName, const std::string& payload);
7753+
public void notifyFastRefreshComplete();
77477754
public ~RuntimeAgent();
77487755
}
77497756

scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,6 +2516,11 @@ class facebook::react::NativeToJsBridge {
25162516
public void* getJavaScriptContext();
25172517
}
25182518

2519+
class facebook::react::NativeViewTransition : public NativeViewTransitionCxxSpec<facebook::react::NativeViewTransition> {
2520+
public NativeViewTransition(std::shared_ptr<facebook::react::CallInvoker> jsInvoker);
2521+
public std::optional<facebook::jsi::Object> getViewTransitionInstance(facebook::jsi::Runtime& rt, const std::string& name, const std::string& pseudo);
2522+
}
2523+
25192524
class facebook::react::NetworkReporter {
25202525
public bool isDebuggingEnabled() const;
25212526
public static facebook::react::NetworkReporter& getInstance();
@@ -4044,6 +4049,7 @@ enum facebook::react::BlendMode {
40444049
Multiply,
40454050
Normal,
40464051
Overlay,
4052+
PlusLighter,
40474053
Saturation,
40484054
Screen,
40494055
SoftLight,
@@ -7735,6 +7741,7 @@ class facebook::react::jsinspector_modern::RuntimeAgent {
77357741
public const facebook::react::jsinspector_modern::ExecutionContextDescription& getExecutionContextDescription() const;
77367742
public facebook::react::jsinspector_modern::RuntimeAgent::ExportedState getExportedState();
77377743
public void notifyBindingCalled(const std::string& bindingName, const std::string& payload);
7744+
public void notifyFastRefreshComplete();
77387745
public ~RuntimeAgent();
77397746
}
77407747

0 commit comments

Comments
 (0)