Skip to content
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

[WIP] Keep state for separate render regions inside of VirtualizedList #1

Open
wants to merge 368 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
368 commits
Select commit Hold shift + click to select a range
69030a4
Remove maxToRenderPerBatch defaultProps
Mar 17, 2021
e3c3ef0
Remove onEndReachedThreshold defaultProps
Mar 17, 2021
3c5fa3b
Remove scrollEventThrottle defaultProps
Mar 17, 2021
b310145
Remove windowSize defaultProps
Mar 17, 2021
76b6a66
Remove updateCellsBatchingPeriod defaultProps
Mar 17, 2021
1cbedb9
Remove keyExtractor defaultProps
Mar 17, 2021
f1cf2c3
Remove defaultProps
Mar 17, 2021
4b3c8e7
Update typed export and fix test
Mar 17, 2021
145110b
Add support for GIFs
sammy-SC Mar 17, 2021
85f9b7a
React Sync for revisions c3e20f1... c9f6d0a
JoshuaGross Mar 17, 2021
4079c04
Update paper interop lists
Mar 17, 2021
dbf5fa2
Workaround for bridge.isInspectable
Mar 18, 2021
729c6d2
Fix accessibilityElement accessibility frame
sammy-SC Mar 18, 2021
f293d41
Back out "Update typed export and fix test", Back out "[VirtualizedSe…
jimmy623 Mar 18, 2021
d40f2a2
Switch AdsManagerRefreshableScrollView to use ElementConfig instead o…
kacieb Mar 18, 2021
54f754b
Add LTR and RTL Horizontal ScrollViews for E2E Tests
kacieb Mar 18, 2021
a9bae13
Add sampling heap profiler APIs to JSI
Mar 18, 2021
bcc79bd
Add support for the sampling memory profiler to the Chrome inspector
Mar 18, 2021
8f2c51b
Example update to flex 1 and and make visibilityConfig as prop
Mar 18, 2021
c357cb4
Viewability examples
Mar 18, 2021
bbf571c
Adapt SectionListExamples
Mar 18, 2021
feebfe1
Fix typo in sendAccessibilityEvent in AccessibilityExample.js
kacieb Mar 18, 2021
cfb5b5e
Add test with Multiple Sticky Headers for ScrollView
kacieb Mar 18, 2021
ac7ba3e
Fix leak checker crash in bridgeless mode
Mar 19, 2021
a0dcc4c
Pressability: don't report touch telemetry events when the event does…
JoshuaGross Mar 19, 2021
629611d
C4244 possible precision loss warning fix
altaibayar Mar 20, 2021
3f57120
Deploy Flow v0.147.0
mroch Mar 20, 2021
eacc940
Extend AccessibilityInfo.sendAccessibilityEvent to support 'click' ev…
mdvacca Mar 20, 2021
3671712
Deprecate markerCancel
swillard13 Mar 22, 2021
f3fc425
Primitives.h -> Primitive.h
mdvacca Mar 22, 2021
866bf5f
Primitive.h -> primitives.h
mdvacca Mar 22, 2021
f69e096
feat: set disabled accessibilityState when TouchableHighlight is disa…
Naturalclar Mar 22, 2021
74682c5
Add @DoNotStrip to every Pojo and every Pojo method
RSNara Mar 23, 2021
aca0f41
Change State references to TextLayoutManager to a weak_ptr (Paragraph…
JoshuaGross Mar 23, 2021
8cc737e
Change State references to TextLayoutManager to a weak_ptr (AndroidTe…
JoshuaGross Mar 23, 2021
dbc2d84
Clean up - remove unused variables
luluwu2032 Mar 23, 2021
05418f8
codemod objects to interfaces where they appear as supertypes of classes
Mar 23, 2021
daaa1b2
Remove code supporting legacy paper interop from Picker view manager
Mar 23, 2021
563b42b
React Native sync for revisions c9f6d0a...6d3ecb7
rickhanlonii Mar 23, 2021
3dd9251
Fabric: Aligning `UIManager::startSurface` and `UIManager::stopSurfac…
shergin Mar 23, 2021
37a03ce
Clean up xplat/js/react-native-github/ReactAndroid/src/main/java/com/…
Mar 23, 2021
334da89
LayoutAnimation: don't call non-Fabric configurNext if Fabric is inst…
JoshuaGross Mar 23, 2021
70608ee
Clean up Paragraph Cxx/iOS code after D27238439
JoshuaGross Mar 23, 2021
ee539cb
Don't use setLayoutAnimationEnabledExperimental in RNTester AnimatedG…
JoshuaGross Mar 24, 2021
22107c6
Move out RotatingImages example
Mar 24, 2021
98f565c
Move out FadeInView
Mar 24, 2021
4cc3aa8
Move out rest of examples
Mar 24, 2021
3e7d51f
Migrate UIManager.getViewManagerConfig -> UIManager.hasViewManagerCon…
mdvacca Mar 24, 2021
a15a46c
Migrate UIManager.getViewManagerConfig -> UIManager.hasViewManagerCon…
mdvacca Mar 24, 2021
91b3f5d
Implement and integrate Mapbuffer
mdvacca Mar 24, 2021
3368765
Introducing Timeline: A time-travel debugging tool (cross-platform part)
shergin Mar 24, 2021
35b575f
Refactor mount logic into MountItemDispatcher
Mar 24, 2021
0599de5
change class variable syntax in MapBuffer class
mdvacca Mar 25, 2021
7704f65
change class variable syntax in MapBufferBuilder class
mdvacca Mar 25, 2021
0b5fbf3
Remove exceptions from MapBuffer class
mdvacca Mar 25, 2021
3bbb0a4
Remove exceptions from MapBufferBuilder class
mdvacca Mar 25, 2021
532f5f3
Clean up redundant experimental flowconfig options
samwgoldman Mar 25, 2021
24f9f75
fbjni version to 0.2.2 (#31191)
IvanKobzarev Mar 25, 2021
d754bde
Fix ScrollViewStickyHeader to push up header above it
kacieb Mar 25, 2021
07d527f
Use unstable_hasStaticViewConfig to detect if a component is register…
mdvacca Mar 25, 2021
5475f29
Reland stack for removing defaultProps from VL and remove breaking Fl…
Mar 25, 2021
fda1ace
Refactor renderItem logic and gate changes
Mar 25, 2021
bfe3cd0
Log info when TurboModule cannot be found
p-sun Mar 25, 2021
e1b6cd3
ProGuard: Do not strip anything from FabricUIManager
JoshuaGross Mar 26, 2021
386a724
Use DoNotStripAny in ComponentNameResolver classes
mdvacca Mar 26, 2021
e27ca7f
Create YogaProps Interface
adityasharat Mar 26, 2021
452240b
fix: Let's be more specific about "not implemented" (#31237)
Crash-- Mar 26, 2021
3c4363d
Clarify TurboModule cannot be found log
p-sun Mar 27, 2021
9ebdf74
Remove Unable to get TurboModule for DialogManagerAndroid warning for…
p-sun Mar 27, 2021
95f7c79
remove unused VR-only props (#31230)
Simek Mar 29, 2021
79090c4
Fabric: Decoupling Telemetry aggregation classes into a separate module
sammy-SC Mar 29, 2021
3b8fbc3
Use default value instead of abort when parsing color
sammy-SC Mar 29, 2021
eacabe1
Convert ScrollViewStickyHeader to functional component and gate the c…
kacieb Mar 29, 2021
7248291
Simplify logic
Mar 30, 2021
d1f09f7
Add Switch Test Component and more testIDs
Mar 30, 2021
2aee39c
StubViewTree: log more information before UPDATE assertion failure
JoshuaGross Mar 30, 2021
72d45de
Label LayoutAnimations enums with numbers for debugging
JoshuaGross Mar 30, 2021
24bfa46
Refactor YogaNode.Inputs freeze API
adityasharat Mar 30, 2021
b86e52a
Add method to retrieve authorization status
Mar 30, 2021
dfa8eb0
Rename "hasActiveCatalystInstance" to "hasActiveReactInstance" for cl…
luluwu2032 Mar 31, 2021
10830f4
Remove redundant isBridgeless() checking
luluwu2032 Mar 31, 2021
faec9cd
Prevent ShadowNodeFamily from being subclassed
sammy-SC Mar 31, 2021
1e690ac
Mark subclasses of ShadowNode final when appropriate
sammy-SC Mar 31, 2021
b50b7e3
Update React.podspec to require cocoapods >= 1.10.1 (#31134)
sunnylqm Mar 31, 2021
a038179
Add return value to JavaScript calls in UIManagerBinding
sammy-SC Mar 31, 2021
3f8d508
Avoid crashing in Fabric/Paper interop without bridge [1/n]
Mar 31, 2021
491ca1d
Create a bridgelessViewManager [2/n]
Mar 31, 2021
10acccc
Handle commands in RCTLegacyViewManagerInteropCoordinator [3/n]
Mar 31, 2021
4efdf26
Introducing RCTWeakViewHolder [4/n]
Mar 31, 2021
679f38f
Pass RCTEventDispatcher to RCTComponentData [6/n]
Mar 31, 2021
c4e40b8
feat: add displayName to touchables (#29531)
brunohkbx Apr 1, 2021
321de15
Delete unused FlowFixMes in xplat/js/react-native-github
Apr 1, 2021
bac2c2c
Update FlowFixMes to use error codes in react-native-github
Apr 1, 2021
706a223
Refactor LA: keyFrames have N "final items" to execute
JoshuaGross Apr 1, 2021
f915ca9
EZ refactor
JoshuaGross Apr 1, 2021
4ae1a9b
Do not check consistency of updated Virtual views
JoshuaGross Apr 1, 2021
63c0be5
EZ: Make StubViewTree "Delete" logs consistent with other logs
JoshuaGross Apr 1, 2021
22c9b7d
If a parent node is DELETEd or CREATEd, immediately end animation
JoshuaGross Apr 1, 2021
9ea0020
For certain types of conflicts we do *not* want to generate a final U…
JoshuaGross Apr 1, 2021
ae264b9
Update 'viewPrev' as well as 'viewStart' when transitioning from one …
JoshuaGross Apr 1, 2021
ec51737
Update StubViewTree logging for debugging on Android
JoshuaGross Apr 1, 2021
92b8075
Recursively clean up conflicting animations
JoshuaGross Apr 1, 2021
61d59ff
Add additional debug logging in LayoutAnimationDriver
JoshuaGross Apr 1, 2021
17c3846
Only run assert-only path in debug mode
JoshuaGross Apr 1, 2021
01f7d4f
Refactor duplicated code into queueFinalMutationsForCompletedKeyFrame
JoshuaGross Apr 1, 2021
f6168d2
Bail out of createInterpolatedShadowView if generated props are null
JoshuaGross Apr 1, 2021
64c9397
Log ShadowView hash with verbose StubViewTree logs; and when StubView…
JoshuaGross Apr 1, 2021
638e788
Improve StubViewTree logging when comparisons fail
JoshuaGross Apr 1, 2021
e9ff6d8
Print ShadowView hash when displaying instructions
JoshuaGross Apr 1, 2021
8f52fb2
Make mutation sorting more clear
JoshuaGross Apr 1, 2021
eb59cc2
Queue DELETE instructions for virtual nodes
JoshuaGross Apr 1, 2021
9ef995a
Enable C++ 17 in React Native
sammy-SC Apr 1, 2021
3a3b61c
Use nested namespaces in UIManager module
sammy-SC Apr 1, 2021
be39788
Make ConcreteComponentDescriptor::createFamily non-virtual
sammy-SC Apr 1, 2021
5a793ce
Remove previous fix in D26581756
luluwu2032 Apr 1, 2021
184b372
Comment out debug-only block causing build failures
JoshuaGross Apr 1, 2021
e42ffdd
Add support for text copy to Paragraph component
sammy-SC Apr 1, 2021
0901830
Fix default values of snapToEnd and snapToStart in ScrollViewProps
sammy-SC Apr 1, 2021
3d1afbb
destroy callbacks even if they aren't called, when java object is des…
JoshuaGross Apr 1, 2021
d04ec4d
Deploy v0.148.0 to xplat
pieterv Apr 1, 2021
b5e649f
Accessibility/button test (#31189)
Apr 2, 2021
1b50722
Add back hasActiveCatalystInstance() and mark it as Deprecated
luluwu2032 Apr 2, 2021
a782b6f
Remove unsafe lifecycles usage
Apr 2, 2021
322e8f7
Re-use Node path resolution script
hramos Apr 2, 2021
bb6cd56
RN: Fallback for Invalid Colors in `processColorArray`
yungsters Apr 2, 2021
cb37562
Remove `abort` in props parsing
JoshuaGross Apr 2, 2021
cb028ee
Add e2e tests for RNTester examples and relevant testIDs
Apr 2, 2021
88f2356
Added talkback support for TouchableNativeFeedback accessibility: dis…
kyamashiro Apr 3, 2021
7ee2a99
Avoid copy of shared_ptr in ConcreteComponentDescriptor::adopt
sammy-SC Apr 5, 2021
e9765a7
Remove last uses of UnsharedShadowNode
sammy-SC Apr 5, 2021
7ee2acc
Selected State does not annonce when TextInput Component selected (#3…
fabOnReact Apr 5, 2021
003d63d
RN: Refactor `AccessibilityInfo` Listeners
yungsters Apr 6, 2021
d831134
RN: Remove `AccessibilityInfo.fetch`
yungsters Apr 6, 2021
73bc96e
RN: Announce "unselected" Accessibility State (Android)
yungsters Apr 6, 2021
9a9e7f9
RN: Unify `AccessibilityInfo` Platform Forks
yungsters Apr 6, 2021
1739ab5
Use C++17 feature - structured bindings
sammy-SC Apr 6, 2021
950f241
Back out "RN: Unify `AccessibilityInfo` Platform Forks", Back out "RN…
jimmy623 Apr 6, 2021
75c4920
Use explicit values in SurfaceHandler enums
mdvacca Apr 6, 2021
2182efa
Change values of DisplayMode enum
mdvacca Apr 6, 2021
2c0a0a7
Allow starting surface without a view in Fabric
Apr 6, 2021
d97350d
Queue mount items executed before root view is attached
Apr 6, 2021
2785ce7
React Native sync for revisions 6d3ecb7...c9aab1c
kacieb Apr 6, 2021
d29a7e7
add getRecommendedTimeoutMillis to AccessibilityInfo (#31063)
Apr 6, 2021
28ed660
Use EXPECT_NEAR to improve test failure messages
Apr 7, 2021
3dda7ee
iOS: Removed unused helper methods for image instrumentation
fkgozali Apr 7, 2021
dffee0e
Initial CellRenderMask impl
NickGerleman Apr 7, 2021
c47e359
closer to flow clean
NickGerleman Apr 7, 2021
976a305
Remove clean up resources when the app is backgrounded experiment
sammy-SC Apr 7, 2021
683b825
Modern Switch
Apr 8, 2021
959dc5a
Remove defaultProps
Apr 8, 2021
4565fd8
Convert to ESM export
Apr 8, 2021
f525ec0
Remove assertions in ~Scheduler and ~SurfaceHandler
RSNara Apr 8, 2021
5f0bf8b
Refactor: Remove AsyncDevSupportManager.loadJSBundleFromServer
RSNara Apr 8, 2021
eb13baf
Introducing RuntimeScheduler module
sammy-SC Apr 8, 2021
46acfcb
Allow swapping the clock implementation for TransactionTelemetry
Apr 8, 2021
dde48fd
Use mock clock
Apr 8, 2021
3824c56
ShadowView hash: add surfaceId and LayoutMetrics
JoshuaGross Apr 8, 2021
49b6c60
EZ: fix up LayoutAnimation logs
JoshuaGross Apr 8, 2021
0b8731d
Add config flag for RuntimeScheduler
sammy-SC Apr 8, 2021
8207e97
Android: upgrading to OkHttp from v3 to v4 (#31084)
arazabishov Apr 8, 2021
e7275d5
RN: Reapply `AccessibilityInfo` Changes
yungsters Apr 9, 2021
ebdf36c
RN: Upgrade `AccessibilityInfo.removeEventListener` Call Sites
yungsters Apr 9, 2021
6a5e98a
Stop calling getTurboModule:initParams in RCTTurboModuleManager
RSNara Apr 9, 2021
3f38186
Codemod: Give legacy cxx and ObjC-only NativeModules a getTurboModule…
RSNara Apr 9, 2021
e0b8f50
Make RCTTurboModule getTurboModule: required
RSNara Apr 9, 2021
c4c34a1
Delete RCTTurboModuleManagerDelegate getTurboModule:initParams
RSNara Apr 9, 2021
c91e32b
Differ: introduce breadcrumb logging
JoshuaGross Apr 9, 2021
b5e2e1d
Expose setSurfaceProps API in JS
mdvacca Apr 12, 2021
680dd36
Introduce new Fabric API setSurfaceProps
mdvacca Apr 12, 2021
e7b52d7
Update initial props when DisplayMode changes in Fabric
mdvacca Apr 12, 2021
84c70b2
Introduce setDisplayMode method in SurfaceHandler
mdvacca Apr 12, 2021
2793bba
Move DisplayMode out of SurfaceHandler
mdvacca Apr 12, 2021
bdb9a1e
Add displayMode parameter into startSurface and setSurfaceProps methods
mdvacca Apr 12, 2021
b28dded
Transfer 'DisplayMode' value from Native -> JS
mdvacca Apr 12, 2021
87517ae
Codemod usages of NativeEventEmitter in react-native-github to only p…
rubennorte Apr 12, 2021
38cfa93
Migrate remaining modules using NativeEventEmitter to only pass the n…
rubennorte Apr 12, 2021
f5502fb
Use native module passed to NativeEventEmitter on Android
rubennorte Apr 12, 2021
ea1ff37
Assign batch number to only batched animated instructions
Apr 12, 2021
8f4aed6
Fix race inside ScrollView._inputMeasureAndScrollToKeyboard
sammy-SC Apr 12, 2021
9d263aa
Refactor React Native SectionList component to a functional component
madhavgharmalkar Apr 12, 2021
14f7a2b
EventEmitter: Deprecate Constructor Argument
yungsters Apr 12, 2021
62934e5
EventEmitter: Cleanup Redundant Internal Types
yungsters Apr 12, 2021
cb6cbd1
EventEmitter: Deprecate `removeSubscription`
yungsters Apr 12, 2021
d65b589
Rewrite Modal to a functional component and add gating for the change
Apr 12, 2021
5cba7c0
Add a way to prerender the surface
Apr 12, 2021
214aaf2
Move surface handler registration to Binding.cpp
Apr 12, 2021
a17e3cf
Avoid mounting tree on mode change if it wasn't commited
Apr 12, 2021
1b06835
Android: Fix switch ripple color (#30685)
rnike Apr 12, 2021
8d5c22e
Add runtime scheduler priorities
sammy-SC Apr 13, 2021
71b5178
Make glog exported depencency of debug module
sammy-SC Apr 13, 2021
2779129
Add minimal implementation of RuntimeScheduler::scheduleTask
sammy-SC Apr 13, 2021
3c14c19
Add return value to RuntimeScheduler unstable_scheduleCallback
sammy-SC Apr 13, 2021
08ef1df
Implement RuntimeScheduler::cancelTask
sammy-SC Apr 13, 2021
e57de5f
Fix CI "Build Tests: Android Instrumentation Tests" errors (#31352)
Kudo Apr 14, 2021
aee07e1
Integrate react_native_asserts into mapbuffer
mdvacca Apr 14, 2021
cc3e87c
Implement RuntimeScheduler::getShouldYield
sammy-SC Apr 14, 2021
52f1d54
Add implementation for requestPaint
sammy-SC Apr 14, 2021
240588b
Implement RuntimeScheduler::now
sammy-SC Apr 14, 2021
06753d4
Add expiration date to Task and use it to determine priority
sammy-SC Apr 14, 2021
73b9f78
Daily `arc lint --take BUCKFORMAT`
Apr 14, 2021
60a18c1
Don't disconnect DevTools WebSocket connection on Cmd+D
Apr 14, 2021
88c3090
Correct LayoutMetrics comparison and make debuggable
JoshuaGross Apr 14, 2021
ff47b0e
Mounting: log more information in iOS-only REMOVE assert
JoshuaGross Apr 14, 2021
9729d4d
Revert a small change to UIManagerBinding
Apr 14, 2021
50c3dd3
Update View to use import instead of require
kacieb Apr 14, 2021
d9a86aa
Convert SafeAreaView to ES Module (#31344)
franzon Apr 14, 2021
328f4ee
Clean up imports and update KeyboardAvoidingView to @flow strict-local
kacieb Apr 14, 2021
5a2693d
Update React DevTools deps from 4.6 -> 4.12
Apr 14, 2021
0cab446
iOS: Introduced RCT_NEW_ARCHITECTURE build flag to separate old vs ne…
fkgozali Apr 15, 2021
2d7560d
StubViewTree: enable stricter REMOVE asserts
JoshuaGross Apr 15, 2021
c83562e
StubViewTree: move assert to get better debug logging
JoshuaGross Apr 15, 2021
5eba5c1
Differ: improvements to logging
JoshuaGross Apr 15, 2021
39b8233
Copy Differ implementation to new file, feature-flag-gate new differ
JoshuaGross Apr 15, 2021
b9828a8
Differ: fix edge-case where we "REMOVE" an older version of a ShadowNode
JoshuaGross Apr 15, 2021
c22b874
Differ: ensure ownership of all ShadowView/ShadowNode pairs, ensure c…
JoshuaGross Apr 15, 2021
d1b1e8b
Differ: ensure all ShadowViews generated by differ have correct Layou…
JoshuaGross Apr 15, 2021
dc80b2d
Add mounting layer test that stress-tests differ on (un)flattening
JoshuaGross Apr 15, 2021
eb49f95
Bootstrap unit tests for RuntimeScheduler module
sammy-SC Apr 15, 2021
e3a4de8
Add unit tests for RuntimeScheduler::now
sammy-SC Apr 15, 2021
4c1fd97
Add tests for RuntimeScheduler::scheduletTask and RuntimeScheduler::g…
sammy-SC Apr 15, 2021
8f3ffcf
Add unit tests for RuntimeScheduler::cancelTask
sammy-SC Apr 15, 2021
e6dc371
Daily `arc lint --take CLANGFORMAT`
Apr 15, 2021
bd1d4e9
StubViewTree: reenable asserts in Delete mutation path
JoshuaGross Apr 15, 2021
1747536
Clean up the initialization of instance variables in ScrollView
kacieb Apr 15, 2021
e1eb938
Create rn_codegen BUCK macro (#31340)
RSNara Apr 15, 2021
ae07c53
Resolve "fatal: not a git repository" error outside of git repositories
hramos Apr 15, 2021
d46c87e
Back out "Update React DevTools deps from 4.6 -> 4.12"
yungsters Apr 16, 2021
318e9f2
Execute multiple tasks within single dispatch
sammy-SC Apr 16, 2021
9e21d54
Depend on fbjni directly instead of native/fb
Apr 16, 2021
6971640
Disable `accessibilityState` when `TouchableWithoutFeedback` is `disa…
carloscuesta Apr 16, 2021
bdfe2a5
Avoid encoding local path in Podfile.lock
hramos Apr 16, 2021
2824b68
Remove defaultProps from KeyboardAvoidingView
kacieb Apr 17, 2021
2052bb6
Allow inspector to compile in fbcode
Apr 17, 2021
17be3a0
Remove legacy context API usage
Apr 18, 2021
1fc1873
iOS: introduced 2 levels of architecture enforcement
fkgozali Apr 19, 2021
114be1d
Check existence of native methods before calling them in NativeEventE…
rubennorte Apr 19, 2021
7258afe
bump gradle wrapper to 6.8.3 (#31347)
dulmandakh Apr 19, 2021
e4d0da4
Paasing flow
NickGerleman Apr 19, 2021
98fe5f7
Get UTs running
NickGerleman Apr 19, 2021
b30b98d
Mostly passing UTs
NickGerleman Apr 19, 2021
b71f823
fix
NickGerleman Apr 19, 2021
f1d1e23
bump react-native-github's metro version to v0.66.0
GijsWeterings Apr 20, 2021
de318cd
React Native sync for revisions c9aab1c...f7cdc89
Apr 20, 2021
6fb5dc1
Merge branch 'master' of https://github.com/facebook/react-native int…
NickGerleman Apr 20, 2021
a603aec
Add unit tests for VirtualizedList render quirks
NickGerleman Apr 21, 2021
f705feb
Add "CellRenderMask" Region Tracking Structure
NickGerleman Apr 23, 2021
3787035
wip
NickGerleman Apr 23, 2021
365d76f
Fix a couple of tests
NickGerleman Apr 23, 2021
716e64c
fixes
NickGerleman Apr 23, 2021
2eb42cd
fix
NickGerleman Apr 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .buckconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[android]
target = android-29
target = android-30

[download]
max_number_of_retries = 3
Expand Down
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# and build a Android application that can be used to run the
# tests specified in the scripts/ directory.
#
FROM reactnativecommunity/react-native-android:2.1
FROM reactnativecommunity/react-native-android:3.2

LABEL Description="React Native Android Test Image"
LABEL maintainer="Héctor Ramos <hector@fb.com>"
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ executors:
reactnativeandroid:
<<: *defaults
docker:
- image: reactnativecommunity/react-native-android:2.1
- image: reactnativecommunity/react-native-android:3.2
resource_class: "large"
environment:
- TERM: "dumb"
Expand Down Expand Up @@ -617,7 +617,7 @@ jobs:
environment:
- ANDROID_HOME: "C:\\Android\\android-sdk"
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944"
- ANDROID_BUILD_VERSION: 28
- ANDROID_BUILD_VERSION: 30
- ANDROID_TOOLS_VERSION: 29.0.3
- GRADLE_OPTS: -Dorg.gradle.daemon=false
- NDK_VERSION: 20.1.5948944
Expand Down
4 changes: 1 addition & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

experimental.abstract_locations=true

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
Expand All @@ -70,4 +68,4 @@ untyped-import
untyped-type-import

[version]
^0.145.0
^0.148.0
4 changes: 1 addition & 3 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

experimental.abstract_locations=true

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
Expand All @@ -70,4 +68,4 @@ untyped-import
untyped-type-import

[version]
^0.145.0
^0.148.0
7 changes: 4 additions & 3 deletions IntegrationTests/AsyncStorageTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,10 @@ class AsyncStorageTest extends React.Component<{...}, $FlowFixMeState> {
return (
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
{/* $FlowFixMe[incompatible-type] (>=0.54.0 site=react_native_fb,react_
* native_oss) This comment suppresses an error found when Flow v0.54
* was deployed. To see the error delete this comment and run Flow.
*/
this.constructor.displayName + ': '}
{this.state.done ? 'Done' : 'Testing...'}
{'\n\n' + this.state.messages}
Expand Down
7 changes: 4 additions & 3 deletions IntegrationTests/IntegrationTestHarnessTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ class IntegrationTestHarnessTest extends React.Component<Props, State> {
return (
<View style={styles.container}>
<Text>
{/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
{/* $FlowFixMe[incompatible-type] (>=0.54.0 site=react_native_fb,react_
* native_oss) This comment suppresses an error found when Flow v0.54
* was deployed. To see the error delete this comment and run Flow.
*/
this.constructor.displayName + ': '}
{this.state.done ? 'Done' : 'Testing...'}
</Text>
Expand Down
20 changes: 11 additions & 9 deletions IntegrationTests/IntegrationTestsApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const TESTS = [
];

TESTS.forEach(
/* $FlowFixMe(>=0.54.0 site=react_native_fb,react_native_oss) This comment
* suppresses an error found when Flow v0.54 was deployed. To see the error
* delete this comment and run Flow. */
/* $FlowFixMe[incompatible-call] (>=0.54.0 site=react_native_fb,react_native_
* oss) This comment suppresses an error found when Flow v0.54 was deployed.
* To see the error delete this comment and run Flow. */
test => AppRegistry.registerComponent(test.displayName, () => test),
);

Expand All @@ -60,9 +60,10 @@ class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> {
if (this.state.test) {
return (
<ScrollView>
{/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
* comment suppresses an error when upgrading Flow's support for
* React. To see the error delete this comment and run Flow. */}
{/* $FlowFixMe[type-as-value] (>=0.53.0 site=react_native_fb,react_
* native_oss) This comment suppresses an error when upgrading
* Flow's support for React. To see the error delete this comment
* and run Flow. */}
<this.state.test />
</ScrollView>
);
Expand All @@ -79,9 +80,10 @@ class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> {
{TESTS.map(test => [
<TouchableOpacity
onPress={() => this.setState({test})}
/* $FlowFixMe(>=0.115.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.115 was deployed. To
* see the error, delete this comment and run Flow. */
/* $FlowFixMe[incompatible-type] (>=0.115.0 site=react_native_fb)
* This comment suppresses an error found when Flow v0.115 was
* deployed. To see the error, delete this comment and run Flow.
*/
style={styles.row}>
<Text style={styles.testName}>{test.displayName}</Text>
</TouchableOpacity>,
Expand Down
2 changes: 1 addition & 1 deletion Libraries/ActionSheetIOS/React-RCTActionSheet.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = package['version']
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
source[:commit] = `git rev-parse HEAD`.strip
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
else
source[:tag] = "v#{version}"
end
Expand Down
6 changes: 3 additions & 3 deletions Libraries/Alert/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
*/

import Platform from '../Utilities/Platform';
import NativeDialogManagerAndroid, {
type DialogOptions,
} from '../NativeModules/specs/NativeDialogManagerAndroid';
import type {DialogOptions} from '../NativeModules/specs/NativeDialogManagerAndroid';
import RCTAlertManager from './RCTAlertManager';

export type AlertType =
Expand Down Expand Up @@ -48,6 +46,8 @@ class Alert {
if (Platform.OS === 'ios') {
Alert.prompt(title, message, buttons, 'default');
} else if (Platform.OS === 'android') {
const NativeDialogManagerAndroid = require('../NativeModules/specs/NativeDialogManagerAndroid')
.default;
if (!NativeDialogManagerAndroid) {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions Libraries/Animated/AnimatedEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ class AnimatedEvent {
}
} else if (typeof recMapping === 'object') {
for (const mappingKey in recMapping) {
/* $FlowFixMe(>=0.120.0) This comment suppresses an error found
* when Flow v0.120 was deployed. To see the error, delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.120.0) This comment suppresses an
* error found when Flow v0.120 was deployed. To see the error,
* delete this comment and run Flow. */
traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);
}
}
Expand Down
9 changes: 6 additions & 3 deletions Libraries/Animated/AnimatedWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ const AnimatedImplementation = require('./AnimatedImplementation');

module.exports = {
...AnimatedImplementation,
// $FlowFixMe createAnimatedComponent expects to receive types. Plain intrinsic components can't be typed like this
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
* types. Plain intrinsic components can't be typed like this */
div: (AnimatedImplementation.createAnimatedComponent('div'): $FlowFixMe),
// $FlowFixMe createAnimatedComponent expects to receive types. Plain intrinsic components can't be typed like this
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
* types. Plain intrinsic components can't be typed like this */
span: (AnimatedImplementation.createAnimatedComponent('span'): $FlowFixMe),
// $FlowFixMe createAnimatedComponent expects to receive types. Plain intrinsic components can't be typed like this
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
* types. Plain intrinsic components can't be typed like this */
img: (AnimatedImplementation.createAnimatedComponent('img'): $FlowFixMe),
};
9 changes: 7 additions & 2 deletions Libraries/Animated/NativeAnimatedHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,15 @@ module.exports = {
assertNativeAnimatedModule,
shouldUseNativeDriver,
transformDataType,
// $FlowExpectedError - unsafe getter lint suppresion
// $FlowExpectedError[unsafe-getters-setters] - unsafe getter lint suppresion
// $FlowExpectedError[missing-type-arg] - unsafe getter lint suppresion
get nativeEventEmitter(): NativeEventEmitter {
if (!nativeEventEmitter) {
nativeEventEmitter = new NativeEventEmitter(NativeAnimatedModule);
nativeEventEmitter = new NativeEventEmitter(
// T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior
// If you want to use the native module on other platforms, please remove this condition and test its behavior
Platform.OS !== 'ios' ? null : NativeAnimatedModule,
);
}
return nativeEventEmitter;
},
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Animated/components/AnimatedSectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import * as React from 'react';

const SectionList = require('../../Lists/SectionList');
import SectionList from '../../Lists/SectionList';
const createAnimatedComponent = require('../createAnimatedComponent');

import type {AnimatedComponentType} from '../createAnimatedComponent';
Expand Down
43 changes: 21 additions & 22 deletions Libraries/Animated/nodes/AnimatedInterpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,23 +205,23 @@ function createInterpolationFromStringOutputRange(
// [200, 250],
// [0, 0.5],
// ]
/* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to
* guard against this possibility.
*/
/* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can
* return `null`. Need to guard against this possibility. */
const outputRanges = outputRange[0].match(stringShapeRegex).map(() => []);
outputRange.forEach(value => {
/* $FlowFixMe(>=0.18.0): `value.match()` can return `null`. Need to guard
* against this possibility.
*/
/* $FlowFixMe[incompatible-use] (>=0.18.0): `value.match()` can return
* `null`. Need to guard against this possibility. */
value.match(stringShapeRegex).forEach((number, i) => {
outputRanges[i].push(+number);
});
});

const interpolations = outputRange[0]
.match(stringShapeRegex)
/* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need
* to guard against this possibility. */
/* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can
* return `null`. Need to guard against this possibility. */
/* $FlowFixMe[incompatible-call] (>=0.18.0): `outputRange[0].match()` can
* return `null`. Need to guard against this possibility. */
.map((value, i) => {
return createInterpolation({
...config,
Expand Down Expand Up @@ -277,12 +277,11 @@ function checkValidInputRange(arr: $ReadOnlyArray<number>) {
for (let i = 1; i < arr.length; ++i) {
invariant(
arr[i] >= arr[i - 1],
/* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,
* one or both of the operands may be something that doesn't cleanly
* convert to a string, like undefined, null, and object, etc. If you really
* mean this implicit string conversion, you can do something like
* String(myThing)
*/
/* $FlowFixMe[incompatible-type] (>=0.13.0) - In the addition expression
* below this comment, one or both of the operands may be something that
* doesn't cleanly convert to a string, like undefined, null, and object,
* etc. If you really mean this implicit string conversion, you can do
* something like String(myThing) */
'inputRange must be monotonically non-decreasing ' + arr,
);
}
Expand All @@ -292,12 +291,11 @@ function checkInfiniteRange(name: string, arr: $ReadOnlyArray<number>) {
invariant(arr.length >= 2, name + ' must have at least 2 elements');
invariant(
arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity,
/* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,
* one or both of the operands may be something that doesn't cleanly convert
* to a string, like undefined, null, and object, etc. If you really mean
* this implicit string conversion, you can do something like
* String(myThing)
*/
/* $FlowFixMe[incompatible-type] (>=0.13.0) - In the addition expression
* below this comment, one or both of the operands may be something that
* doesn't cleanly convert to a string, like undefined, null, and object,
* etc. If you really mean this implicit string conversion, you can do
* something like String(myThing) */
name + 'cannot be ]-infinity;+infinity[ ' + arr,
);
}
Expand Down Expand Up @@ -358,8 +356,9 @@ class AnimatedInterpolation extends AnimatedWithChildren {
return {
inputRange: this._config.inputRange,
// Only the `outputRange` can contain strings so we don't need to transform `inputRange` here
/* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of
* v0.38.0. To see the error, remove this comment and run flow */
/* $FlowFixMe[incompatible-call] (>=0.38.0) - Flow error detected during
* the deployment of v0.38.0. To see the error, remove this comment and
* run flow */
outputRange: this.__transformDataType(this._config.outputRange),
extrapolateLeft:
this._config.extrapolateLeft || this._config.extrapolate || 'extend',
Expand Down
8 changes: 4 additions & 4 deletions Libraries/Animated/nodes/AnimatedValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ const NativeAnimatedAPI = NativeAnimatedHelper.API;
function _flush(rootNode: AnimatedValue): void {
const animatedStyles = new Set();
function findAnimatedStyles(node) {
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.68 was deployed. To see the error delete this
* comment and run Flow. */
/* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment
* suppresses an error found when Flow v0.68 was deployed. To see the error
* delete this comment and run Flow. */
if (typeof node.update === 'function') {
animatedStyles.add(node);
} else {
node.__getChildren().forEach(findAnimatedStyles);
}
}
findAnimatedStyles(rootNode);
/* $FlowFixMe */
// $FlowFixMe[prop-missing]
animatedStyles.forEach(animatedStyle => animatedStyle.update());
}

Expand Down
37 changes: 36 additions & 1 deletion Libraries/AppState/AppState.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
import NativeEventEmitter from '../EventEmitter/NativeEventEmitter';
import logError from '../Utilities/logError';
import NativeAppState from './NativeAppState';
import Platform from '../Utilities/Platform';

export type AppStateValues = 'inactive' | 'background' | 'active';

Expand Down Expand Up @@ -47,7 +48,9 @@ class AppState {
this.isAvailable = true;

const emitter: NativeEventEmitter<NativeAppStateEventDefinitions> = new NativeEventEmitter(
NativeAppState,
// T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior
// If you want to use the native module on other platforms, please remove this condition and test its behavior
Platform.OS !== 'ios' ? null : NativeAppState,
);
this._emitter = emitter;

Expand Down Expand Up @@ -123,6 +126,38 @@ class AppState {
}
throw new Error('Trying to subscribe to unknown event: ' + type);
}

/**
* @deprecated Use `remove` on the EventSubscription from `addEventListener`.
*/
removeEventListener<K: $Keys<AppStateEventDefinitions>>(
type: K,
listener: (...$ElementType<AppStateEventDefinitions, K>) => mixed,
): void {
const emitter = this._emitter;
if (emitter == null) {
throw new Error('Cannot use AppState when `isAvailable` is false.');
}
// NOTE: This will report a deprecation notice via `console.error`.
switch (type) {
case 'change':
// $FlowIssue[invalid-tuple-arity] Flow cannot refine handler based on the event type
// $FlowIssue[incompatible-call]
emitter.removeListener('appStateDidChange', listener);
return;
case 'memoryWarning':
// $FlowIssue[invalid-tuple-arity] Flow cannot refine handler based on the event type
emitter.removeListener('memoryWarning', listener);
return;
case 'blur':
case 'focus':
// $FlowIssue[invalid-tuple-arity] Flow cannot refine handler based on the event type
// $FlowIssue[incompatible-call]
emitter.addListener('appStateFocusChange', listener);
return;
}
throw new Error('Trying to unsubscribe from unknown event: ' + type);
}
}

module.exports = (new AppState(): AppState);
Loading