@shopify/flash-list 1.6.3 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/RNFlashList.podspec +13 -2
  2. package/android/build.gradle +18 -0
  3. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutShadow.kt +1 -1
  4. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutView.kt +16 -8
  5. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/AutoLayoutViewManager.kt +19 -18
  6. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/BlankAreaEvent.kt +29 -0
  7. package/android/src/main/kotlin/com/shopify/reactnative/flash_list/CellContainerManager.kt +12 -5
  8. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerDelegate.java +46 -0
  9. package/android/src/paper/java/com/facebook/react/viewmanagers/AutoLayoutViewManagerInterface.java +21 -0
  10. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerDelegate.java +31 -0
  11. package/android/src/paper/java/com/facebook/react/viewmanagers/CellContainerManagerInterface.java +16 -0
  12. package/android/src/test/java/com/shopify/reactnative/flash_list/AutoLayoutShadowTest.kt +3 -3
  13. package/dist/FlashList.d.ts +4 -2
  14. package/dist/FlashList.d.ts.map +1 -1
  15. package/dist/FlashList.js +16 -5
  16. package/dist/FlashList.js.map +1 -1
  17. package/dist/MasonryFlashList.d.ts.map +1 -1
  18. package/dist/MasonryFlashList.js +6 -4
  19. package/dist/MasonryFlashList.js.map +1 -1
  20. package/dist/__tests__/FlashList.test.js +22 -0
  21. package/dist/__tests__/FlashList.test.js.map +1 -1
  22. package/dist/__tests__/helpers/mountFlashList.d.ts +1 -1
  23. package/dist/__tests__/helpers/mountFlashList.d.ts.map +1 -1
  24. package/dist/__tests__/helpers/mountFlashList.js +1 -1
  25. package/dist/__tests__/helpers/mountFlashList.js.map +1 -1
  26. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts +1 -1
  27. package/dist/__tests__/helpers/mountMasonryFlashList.d.ts.map +1 -1
  28. package/dist/__tests__/helpers/mountMasonryFlashList.js +1 -1
  29. package/dist/__tests__/helpers/mountMasonryFlashList.js.map +1 -1
  30. package/dist/__tests__/useBlankAreaTracker.test.js +1 -1
  31. package/dist/__tests__/useBlankAreaTracker.test.js.map +1 -1
  32. package/dist/native/auto-layout/AutoLayoutView.d.ts +1 -1
  33. package/dist/native/cell-container/CellContainer.web.d.ts +1 -1
  34. package/dist/native/cell-container/CellContainer.web.d.ts.map +1 -1
  35. package/dist/specs/AutoLayoutNativeComponent.d.ts +19 -0
  36. package/dist/specs/AutoLayoutNativeComponent.d.ts.map +1 -0
  37. package/dist/specs/AutoLayoutNativeComponent.js +6 -0
  38. package/dist/specs/AutoLayoutNativeComponent.js.map +1 -0
  39. package/dist/specs/CellContainerNativeComponent.d.ts +9 -0
  40. package/dist/specs/CellContainerNativeComponent.d.ts.map +1 -0
  41. package/dist/specs/CellContainerNativeComponent.js +6 -0
  42. package/dist/specs/CellContainerNativeComponent.js.map +1 -0
  43. package/dist/tsconfig.tsbuildinfo +1 -1
  44. package/ios/Sources/AutoLayoutView.swift +47 -29
  45. package/ios/Sources/AutoLayoutViewComponentView.h +16 -0
  46. package/ios/Sources/AutoLayoutViewComponentView.mm +90 -0
  47. package/ios/Sources/CellContainerComponentView.h +18 -0
  48. package/ios/Sources/CellContainerComponentView.mm +62 -0
  49. package/ios/Sources/CellContainerManager.swift +1 -1
  50. package/ios/Sources/FlatListPro-Bridging-Header.h +3 -0
  51. package/package.json +28 -23
  52. package/src/FlashList.tsx +19 -6
  53. package/src/MasonryFlashList.tsx +5 -2
  54. package/src/__tests__/FlashList.test.tsx +27 -0
  55. package/src/__tests__/helpers/mountFlashList.tsx +2 -2
  56. package/src/__tests__/helpers/mountMasonryFlashList.tsx +2 -2
  57. package/src/__tests__/useBlankAreaTracker.test.tsx +2 -2
  58. package/src/specs/AutoLayoutNativeComponent.ts +24 -0
  59. package/src/specs/CellContainerNativeComponent.ts +9 -0
  60. package/CHANGELOG.md +0 -279
  61. package/ios/Sources/CellContainer.swift +0 -9
  62. /package/ios/Sources/{AutoLayoutViewManager.m → AutoLayoutViewManager.mm} +0 -0
  63. /package/ios/Sources/{CellContainerManager.m → CellContainerManager.mm} +0 -0
@@ -0,0 +1,62 @@
1
+ #import "CellContainerComponentView.h"
2
+
3
+ #ifdef RCT_NEW_ARCH_ENABLED
4
+ #import <React/RCTConversions.h>
5
+
6
+ #import <react/renderer/components/rnflashlist/ComponentDescriptors.h>
7
+ #import <react/renderer/components/rnflashlist/EventEmitters.h>
8
+ #import <react/renderer/components/rnflashlist/Props.h>
9
+ #import <react/renderer/components/rnflashlist/RCTComponentViewHelpers.h>
10
+
11
+ #import "RCTFabricComponentsPlugins.h"
12
+
13
+ #if __has_include(<RNFlashList/RNFlashList-Swift.h>)
14
+ #import <RNFlashList/RNFlashList-Swift.h>
15
+ #else
16
+ #import "RNFlashList-Swift.h"
17
+ #endif
18
+
19
+ using namespace facebook::react;
20
+
21
+ @interface CellContainerComponentView () <RCTCellContainerViewProtocol>
22
+ @end
23
+
24
+ @implementation CellContainerComponentView
25
+
26
+ - (instancetype)initWithFrame:(CGRect)frame
27
+ {
28
+ if (self = [super initWithFrame:frame]) {
29
+ static const auto defaultProps = std::make_shared<const CellContainerProps>();
30
+ _props = defaultProps;
31
+
32
+ self.userInteractionEnabled = true;
33
+ }
34
+
35
+ return self;
36
+ }
37
+
38
+ #pragma mark - RCTComponentViewProtocol
39
+
40
+ + (ComponentDescriptorProvider)componentDescriptorProvider
41
+ {
42
+ return concreteComponentDescriptorProvider<CellContainerComponentDescriptor>();
43
+ }
44
+
45
+ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &)oldProps
46
+ {
47
+ const auto &newProps = *std::static_pointer_cast<const CellContainerProps>(props);
48
+
49
+ self.index = newProps.index;
50
+
51
+ [super updateProps:props oldProps:oldProps];
52
+ }
53
+ @end
54
+
55
+ Class<RCTComponentViewProtocol> CellContainerCls(void)
56
+ {
57
+ return CellContainerComponentView.class;
58
+ }
59
+ #else
60
+ @implementation CellContainerComponentView
61
+ @end
62
+ #endif /* RCT_NEW_ARCH_ENABLED */
@@ -3,7 +3,7 @@ import Foundation
3
3
  @objc(CellContainerManager)
4
4
  class CellContainerManager: RCTViewManager {
5
5
  override func view() -> UIView! {
6
- return CellContainer()
6
+ return CellContainerComponentView()
7
7
  }
8
8
 
9
9
  override static func requiresMainQueueSetup() -> Bool {
@@ -4,5 +4,8 @@
4
4
  #import <React/RCTBridgeModule.h>
5
5
  #import <React/RCTEventEmitter.h>
6
6
  #import <React/RCTViewManager.h>
7
+ #import <React/RCTComponent.h>
8
+
9
+ #import "CellContainerComponentView.h"
7
10
 
8
11
  #endif /* FlatListPro_Bridging_Header_h */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopify/flash-list",
3
- "version": "1.6.3",
3
+ "version": "1.7.0",
4
4
  "keywords": [
5
5
  "react-native",
6
6
  "recyclerview",
@@ -28,27 +28,26 @@
28
28
  "main": "dist/index.js",
29
29
  "types": "dist/index.d.ts",
30
30
  "scripts": {
31
- "up": "bundle install && yarn fixture-up && yarn e2e-up && yarn build",
32
- "fixture-web-up": "cd fixture/web-app && yarn && cd ../../",
33
- "fixture-up": "cd fixture && yarn && cd ios && bundle exec pod install && cd ../../",
34
- "e2e-up": "cd fixture/ios && brew tap wix/brew && brew install applesimutils && cd ../../",
35
- "start": "cd fixture && react-native start",
31
+ "up": "bundle install && yarn fixture:rn:up && yarn e2e:up && yarn build",
32
+ "start": "cd fixture/react-native && react-native start",
36
33
  "test": "jest",
37
34
  "lint": "yarn eslint . --ext .ts,.tsx",
38
35
  "lint:fix": "yarn eslint . --ext .ts,.tsx --fix",
39
36
  "type-check": "yarn tsc --pretty --noEmit",
40
37
  "build": "tsc -b",
41
- "e2e:build:android": "detox build -c android.emu.release",
42
- "run-ios": "cd fixture && yarn react-native run-ios && yarn build --watch",
43
- "ri": "yarn run-ios",
44
- "run-android": "cd fixture && yarn react-native run-android && yarn build --watch",
45
- "ra": "yarn run-android",
46
- "run-e2e-ios": "cd fixture && yarn e2e:build:ios && yarn e2e:test:ios",
38
+ "fixture:rn:up": "cd fixture/react-native && yarn && cd ios && bundle exec pod install && cd ../../../",
39
+ "fixture:expo:up": "cd fixture/expo && yarn && cd ../../",
40
+ "fixture:rn:android": "cd fixture/react-native && yarn react-native run-android && yarn build --watch",
41
+ "fixture:rn:ios": "cd fixture/react-native && yarn react-native run-ios && yarn build --watch",
42
+ "ra": "yarn fixture:rn:android",
43
+ "ri": "yarn fixture:rn:ios",
44
+ "fixture:expo:start": "cd fixture/expo && yarn start",
45
+ "rw": "yarn fixture:expo:start",
46
+ "e2e:up": "cd fixture/react-native/ios && brew tap wix/brew && brew install applesimutils && cd ../../../",
47
+ "e2e:ios": "cd fixture/react-native && yarn e2e:build:ios && yarn e2e:test:ios",
47
48
  "rei": "yarn run-e2e-ios",
48
- "run-e2e-android": "cd fixture && yarn e2e:build:android && yarn e2e:test:android",
49
+ "e2e:android": "cd fixture/react-native && yarn e2e:build:android && yarn e2e:test:android",
49
50
  "rea": "yarn run-e2e-android",
50
- "run-web": "cd fixture/web-app && yarn web",
51
- "rw": "yarn run-web",
52
51
  "predeploy:website": "sh ./build_website.sh",
53
52
  "deploy:website": "gh-pages -d website/_site"
54
53
  },
@@ -60,20 +59,21 @@
60
59
  "devDependencies": {
61
60
  "@babel/core": "^7.18.5",
62
61
  "@babel/runtime": "^7.18.3",
63
- "@quilted/react-testing": "^0.5.14",
62
+ "@quilted/react-testing": "0.5.27",
64
63
  "@react-native-community/eslint-config": "^3.0.3",
65
64
  "@shopify/eslint-plugin": "^41.3.1",
66
- "@types/jest": "^28.1.3",
67
- "@types/react-native": "0.72.2",
65
+ "@types/jest": "^29.5.10",
66
+ "@types/react": "^18.0.24",
68
67
  "babel-jest": "^28.1.1",
69
68
  "enhanced-resolve": "^5.9.3",
70
69
  "eslint": "8.18.0",
71
70
  "gh-pages": "^4.0.0",
72
- "jest": "^28.1.1",
71
+ "jest": "^29.7.0",
73
72
  "metro-react-native-babel-preset": "^0.71.1",
74
73
  "prettier": "^2.7.1",
75
- "react": "17.0.2",
76
- "react-native": "0.68.5",
74
+ "react": "18.2.0",
75
+ "react-native": "0.72.10",
76
+ "react-test-renderer": "18.2.0",
77
77
  "typescript": "^4.7.4"
78
78
  },
79
79
  "files": [
@@ -85,7 +85,12 @@
85
85
  "jestSetup.js"
86
86
  ],
87
87
  "dependencies": {
88
- "recyclerlistview": "4.2.0",
89
- "tslib": "2.4.0"
88
+ "recyclerlistview": "4.2.1",
89
+ "tslib": "2.6.3"
90
+ },
91
+ "codegenConfig": {
92
+ "name": "rnflashlist",
93
+ "type": "components",
94
+ "jsSrcsDir": "./src/specs"
90
95
  }
91
96
  }
package/src/FlashList.tsx CHANGED
@@ -94,7 +94,8 @@ class FlashList<T> extends React.PureComponent<
94
94
  };
95
95
 
96
96
  private postLoadTimeoutId?: ReturnType<typeof setTimeout>;
97
- private sizeWarningTimeoutId?: ReturnType<typeof setTimeout>;
97
+ private itemSizeWarningTimeoutId?: ReturnType<typeof setTimeout>;
98
+ private renderedSizeWarningTimeoutId?: ReturnType<typeof setTimeout>;
98
99
 
99
100
  private isEmptyList = false;
100
101
  private viewabilityManager: ViewabilityManager<T>;
@@ -291,8 +292,9 @@ class FlashList<T> extends React.PureComponent<
291
292
  componentWillUnmount() {
292
293
  this.viewabilityManager.dispose();
293
294
  this.clearPostLoadTimeout();
294
- if (this.sizeWarningTimeoutId !== undefined) {
295
- clearTimeout(this.sizeWarningTimeoutId);
295
+ this.clearRenderSizeWarningTimeout();
296
+ if (this.itemSizeWarningTimeoutId !== undefined) {
297
+ clearTimeout(this.itemSizeWarningTimeoutId);
296
298
  }
297
299
  }
298
300
 
@@ -430,8 +432,11 @@ class FlashList<T> extends React.PureComponent<
430
432
 
431
433
  private validateListSize(event: LayoutChangeEvent) {
432
434
  const { height, width } = event.nativeEvent.layout;
435
+ this.clearRenderSizeWarningTimeout();
433
436
  if (Math.floor(height) <= 1 || Math.floor(width) <= 1) {
434
- console.warn(WarningList.unusableRenderedSize);
437
+ this.renderedSizeWarningTimeoutId = setTimeout(() => {
438
+ console.warn(WarningList.unusableRenderedSize);
439
+ }, 1000);
435
440
  }
436
441
  }
437
442
 
@@ -662,6 +667,7 @@ class FlashList<T> extends React.PureComponent<
662
667
  private getCellContainerChild = (index: number) => {
663
668
  return (
664
669
  <>
670
+ {this.props.inverted ? this.separator(index) : null}
665
671
  <View
666
672
  style={{
667
673
  flexDirection:
@@ -672,7 +678,7 @@ class FlashList<T> extends React.PureComponent<
672
678
  >
673
679
  {this.rowRendererWithIndex(index, RenderTargetOptions.Cell)}
674
680
  </View>
675
- {this.separator(index)}
681
+ {this.props.inverted ? null : this.separator(index)}
676
682
  </>
677
683
  );
678
684
  };
@@ -724,7 +730,7 @@ class FlashList<T> extends React.PureComponent<
724
730
 
725
731
  private runAfterOnLoad = () => {
726
732
  if (this.props.estimatedItemSize === undefined) {
727
- this.sizeWarningTimeoutId = setTimeout(() => {
733
+ this.itemSizeWarningTimeoutId = setTimeout(() => {
728
734
  const averageItemSize = Math.floor(
729
735
  this.state.layoutProvider.averageItemSize
730
736
  );
@@ -752,6 +758,13 @@ class FlashList<T> extends React.PureComponent<
752
758
  }
753
759
  };
754
760
 
761
+ private clearRenderSizeWarningTimeout = () => {
762
+ if (this.renderedSizeWarningTimeoutId !== undefined) {
763
+ clearTimeout(this.renderedSizeWarningTimeoutId);
764
+ this.renderedSizeWarningTimeoutId = undefined;
765
+ }
766
+ };
767
+
755
768
  /**
756
769
  * Disables recycling for the next frame so that layout animations run well.
757
770
  * Warning: Avoid this when making large changes to the data as the list might draw too much to run animations. Single item insertions/deletions
@@ -114,6 +114,9 @@ const MasonryFlashListComponent = React.forwardRef(
114
114
 
115
115
  const totalColumnFlex = useTotalColumnFlex(dataSet, props);
116
116
 
117
+ const propsRef = useRef(props);
118
+ propsRef.current = props;
119
+
117
120
  const onScrollRef = useRef<OnScrollCallback[]>([]);
118
121
  const emptyScrollEvent = useRef(getEmptyScrollEvent())
119
122
  .current as NativeSyntheticEvent<MasonryFlashListScrollEvent>;
@@ -135,7 +138,7 @@ const MasonryFlashListComponent = React.forwardRef(
135
138
  onScrollCallback?.(emptyScrollEvent);
136
139
  });
137
140
  if (!scrollEvent.nativeEvent.doNotPropagate) {
138
- props.onScroll?.(scrollEvent);
141
+ propsRef.current.onScroll?.(scrollEvent);
139
142
  }
140
143
  }
141
144
  ).current;
@@ -151,7 +154,7 @@ const MasonryFlashListComponent = React.forwardRef(
151
154
  onScrollProxy?.(emptyScrollEvent);
152
155
  emptyScrollEvent.nativeEvent.doNotPropagate = false;
153
156
  }, 32);
154
- props.onLoad?.(args);
157
+ propsRef.current.onLoad?.(args);
155
158
  }).current;
156
159
 
157
160
  const [parentFlashList, getFlashList] =
@@ -856,4 +856,31 @@ describe("FlashList", () => {
856
856
  expect(hasLayoutItems).toBe(true);
857
857
  flashList.unmount();
858
858
  });
859
+ it("warns if rendered size is too small but only when it remain small for a duration", () => {
860
+ const flashList = mountFlashList({
861
+ data: new Array(1).fill("1"),
862
+ });
863
+ const warn = jest.spyOn(console, "warn").mockReturnValue();
864
+
865
+ const triggerLayout = (height: number, time: number) => {
866
+ flashList.find(ScrollView)?.trigger("onLayout", {
867
+ nativeEvent: { layout: { height, width: 900 } },
868
+ });
869
+ jest.advanceTimersByTime(time);
870
+ };
871
+
872
+ triggerLayout(0, 500);
873
+ triggerLayout(100, 1000);
874
+ triggerLayout(0, 1200);
875
+
876
+ expect(warn).toHaveBeenCalledTimes(1);
877
+
878
+ triggerLayout(100, 500);
879
+ triggerLayout(0, 500);
880
+
881
+ flashList.unmount();
882
+ jest.advanceTimersByTime(1200);
883
+
884
+ expect(warn).toHaveBeenCalledTimes(1);
885
+ });
859
886
  });
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Text } from "react-native";
3
3
  import "@quilted/react-testing/matchers";
4
- import { mount, Root } from "@quilted/react-testing";
4
+ import { render, Root } from "@quilted/react-testing";
5
5
 
6
6
  import FlashList from "../../FlashList";
7
7
  import { FlashListProps, ListRenderItem } from "../../FlashListProps";
@@ -34,7 +34,7 @@ export const mountFlashList = (
34
34
  props?: MockFlashListProps,
35
35
  ref?: React.RefObject<FlashList<string>>
36
36
  ) => {
37
- const flashList = mount(renderFlashList(props, ref)) as Omit<
37
+ const flashList = render(renderFlashList(props, ref)) as Omit<
38
38
  Root<FlashListProps<string>>,
39
39
  "instance"
40
40
  > & {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Text } from "react-native";
3
3
  import "@quilted/react-testing/matchers";
4
- import { mount, Root } from "@quilted/react-testing";
4
+ import { render, Root } from "@quilted/react-testing";
5
5
 
6
6
  import { ListRenderItem } from "../../FlashListProps";
7
7
  import {
@@ -44,7 +44,7 @@ export const mountMasonryFlashList = (
44
44
  props?: MockMasonryFlashListProps,
45
45
  ref?: React.RefObject<MasonryFlashListRef<string>>
46
46
  ) => {
47
- const flashList = mount(renderMasonryFlashList(props, ref)) as Omit<
47
+ const flashList = render(renderMasonryFlashList(props, ref)) as Omit<
48
48
  Root<MasonryFlashListProps<string>>,
49
49
  "instance"
50
50
  > & {
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect } from "react";
2
- import { mount } from "@quilted/react-testing";
2
+ import { render } from "@quilted/react-testing";
3
3
 
4
4
  import {
5
5
  BlankAreaTrackerConfig,
@@ -44,7 +44,7 @@ const mountBlankTrackingFlashList = (props?: BlankTrackingFlashListProps) => {
44
44
  const flashListRef: React.RefObject<FlashList<any>> = {
45
45
  current: null,
46
46
  };
47
- const blankTrackingFlashList = mount(
47
+ const blankTrackingFlashList = render(
48
48
  <BlankTrackingFlashList {...props} instance={flashListRef} />
49
49
  );
50
50
  return {
@@ -0,0 +1,24 @@
1
+ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
2
+ import type { ViewProps } from "react-native";
3
+ import type {
4
+ Int32,
5
+ Double,
6
+ DirectEventHandler,
7
+ } from "react-native/Libraries/Types/CodegenTypes";
8
+
9
+ type BlankAreaEvent = Readonly<{
10
+ offsetStart: Int32;
11
+ offsetEnd: Int32;
12
+ }>;
13
+
14
+ interface NativeProps extends ViewProps {
15
+ horizontal?: boolean;
16
+ scrollOffset?: Double;
17
+ windowSize?: Double;
18
+ renderAheadOffset?: Double;
19
+ enableInstrumentation?: boolean;
20
+ disableAutoLayout?: boolean;
21
+ onBlankAreaEvent?: DirectEventHandler<BlankAreaEvent>;
22
+ }
23
+
24
+ export default codegenNativeComponent<NativeProps>("AutoLayoutView");
@@ -0,0 +1,9 @@
1
+ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
2
+ import type { Int32 } from "react-native/Libraries/Types/CodegenTypes";
3
+ import type { ViewProps } from "react-native";
4
+
5
+ interface NativeProps extends ViewProps {
6
+ index?: Int32;
7
+ }
8
+
9
+ export default codegenNativeComponent<NativeProps>("CellContainer");
package/CHANGELOG.md DELETED
@@ -1,279 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
- and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ## [1.6.3] - 2023-11-09
11
-
12
- - Changes for RN 0.73 support
13
- - https://github.com/Shopify/flash-list/pull/930
14
-
15
- ## [1.6.2] - 2023-10-19
16
-
17
- - Move shouldRefreshWithAnchoring configuration so it is possible to disable it from outside FlashList by invalidating layout
18
- - https://github.com/Shopify/flash-list/pull/935
19
-
20
- ## [1.6.1] - 2023-09-14
21
-
22
- - Prevent an expired layout provider from being used again
23
- - https://github.com/Shopify/flash-list/pull/915
24
-
25
- ## [1.6.0] - 2023-09-13
26
-
27
- - Update types to match `react-native@0.72` view types.
28
- - https://github.com/Shopify/flash-list/pull/890
29
- - Add option to clear cached layouts on update
30
- - https://github.com/Shopify/flash-list/pull/910
31
-
32
- ## [1.5.0] - 2023-07-12
33
-
34
- - Update kotlin version to 1.8.10 for RN 0.72 compatibility
35
- - https://github.com/Shopify/flash-list/pull/865
36
-
37
- ## [1.4.3] - 2023-04-24
38
-
39
- - Fix definition conflicts with previous value
40
- - https://github.com/Shopify/flash-list/pull/795
41
- - Fix Android unit test
42
- - https://github.com/Shopify/flash-list/pull/815
43
- - Fix performance issues with inverted lists on Android
44
- - https://github.com/Shopify/flash-list/pull/819
45
-
46
- ## [1.4.2] - 2023-03-20
47
-
48
- - Apply layout correction only to consecutive cells
49
- - https://github.com/Shopify/flash-list/pull/788
50
-
51
- ## [1.4.1] - 2023-01-24
52
-
53
- - Prevent overflow of sticky headers
54
- - https://github.com/Shopify/flash-list/pull/714
55
- - Skip footer correction when layout correction is skipped
56
- - https://github.com/Shopify/flash-list/pull/743
57
-
58
- ## [1.4.0] - 2022-11-07
59
-
60
- - Add content padding support to FlashList
61
- - https://github.com/Shopify/flash-list/pull/626
62
- - Upgrade recyclerlistview to v4.2.0
63
- - https://github.com/Shopify/flash-list/pull/660
64
-
65
- ## [1.3.1] - 2022-10-11
66
-
67
- - Expose `columnIndex` and `columnSpan` to `MasonryFlashList.renderItem`
68
- - https://github.com/Shopify/flash-list/pull/625
69
-
70
- ## [1.3.0] - 2022-09-26
71
-
72
- - Added `MasonryFlashList` which adds support for rendering masonry layouts
73
- - https://github.com/Shopify/flash-list/pull/587
74
-
75
- ## [1.2.2] - 2022-09-06
76
-
77
- - Fixes type checking error in `AutoLayoutView` due to `children` not being an explicit type
78
- - https://github.com/Shopify/flash-list/pull/567
79
-
80
- ## [1.2.1] - 2022-08-03
81
-
82
- - Fixed crash when `estimatedListSize` is used in an empty list
83
- - https://github.com/Shopify/flash-list/pull/546
84
-
85
- ## [1.2.0] - 2022-07-18
86
-
87
- - Fixed out of bound read from data
88
- - https://github.com/Shopify/flash-list/pull/523
89
- - Added JS only fallbacks for unsupported platforms
90
- - https://github.com/Shopify/flash-list/pull/518
91
- - Added footer correction in AutoLayoutView
92
- - https://github.com/Shopify/flash-list/pull/519
93
- - Added `viewPosition` and `viewOffset` support scrollTo methods
94
- - https://github.com/Shopify/flash-list/pull/521
95
- - Fix inverted mode while being horizontal
96
- - https://github.com/Shopify/flash-list/pull/520
97
- - Upgrade recyclerlistview to v4.1.1
98
- - https://github.com/Shopify/flash-list/pull/526
99
-
100
- ## [1.1.0] - 2022-07-06
101
-
102
- - Added render target info to `renderItem` callback
103
- - https://github.com/Shopify/flash-list/pull/454
104
- - Add Apple TV support
105
- - https://github.com/Shopify/flash-list/pull/511
106
- - Clarify installation instructions in Expo projects
107
- - https://github.com/Shopify/flash-list/pull/497
108
- - Upgrade recyclerlistview to v4.0.1
109
- - https://github.com/Shopify/flash-list/pull/507
110
- - Add tslib as a dependency
111
- - https://github.com/Shopify/flash-list/pull/514
112
-
113
- ## [1.0.4] - 2022-07-02
114
-
115
- - Build fix for Android projects having `kotlinVersion` defined in `build.gradle`.
116
- - Allow providing an external scrollview.
117
- - https://github.com/Shopify/flash-list/pull/502
118
-
119
- ## [1.0.3] - 2022-07-01
120
-
121
- - Add kotlin-gradle-plugin to buildscript in project build.gradle
122
- - https://github.com/Shopify/flash-list/pull/481
123
-
124
- ## [1.0.2] - 2022-06-30
125
-
126
- - Minor changes
127
-
128
- ## [1.0.1] - 2022-06-30
129
-
130
- - `data` prop change will force update items only if `renderItem` is also updated
131
- - https://github.com/Shopify/flash-list/pull/453
132
-
133
- ## [1.0.0] - 2022-06-17
134
-
135
- - Upgrade recyclerlistview to v3.3.0-beta.2
136
- - https://github.com/Shopify/flash-list/pull/445
137
- - Added web support
138
- - https://github.com/Shopify/flash-list/pull/444
139
- - Added `disableAutoLayout` prop to prevent conflicts with custom `CellRendererComponent`
140
- - https://github.com/Shopify/flash-list/pull/452
141
-
142
- ## [0.6.1] - 2022-05-26
143
-
144
- - Fix amending layout on iOS
145
- - https://github.com/Shopify/flash-list/pull/412
146
- - Define `FlashList` props previously inherited from `VirtualizedList` and `FlatList` explicitly
147
- - https://github.com/Shopify/flash-list/pull/386
148
- - Make `estimatedItemSize` optional
149
- - https://github.com/Shopify/flash-list/pull/378
150
- - Change `overrideItemType` prop name to `getItemType`
151
- - https://github.com/Shopify/flash-list/pull/369
152
- - Added `useBlankAreaTracker` hook for tracking blank area in production
153
- - https://github.com/Shopify/flash-list/pull/411
154
- - Added `CellRendererComponent` prop
155
- - https://github.com/Shopify/flash-list/pull/362
156
- - Added automatic height measurement for horizontal lists even when parent isn't deterministic
157
- - https://github.com/Shopify/flash-list/pull/409
158
-
159
- ## [0.5.0] - 2022-04-29
160
-
161
- - Fix finding props with testId
162
- - https://github.com/Shopify/flash-list/pull/357
163
- - Reuse cached layouts on orientation change
164
- - https://github.com/Shopify/flash-list/pull/319
165
-
166
- ## [0.4.6] - 2022-04-13
167
-
168
- - Match FlashList's empty list behavior with FlatList
169
- - https://github.com/Shopify/flash-list/pull/312
170
-
171
- ## [0.4.5] - 2022-04-13
172
-
173
- - Upgrade recyclerlistview to v3.2.0-beta.4
174
-
175
- - https://github.com/Shopify/flash-list/pull/315
176
-
177
- - Add viewability callbacks
178
-
179
- - https://github.com/Shopify/flash-list/pull/301
180
-
181
- - Calculate average item sizes automatically
182
- - https://github.com/Shopify/flash-list/pull/296
183
-
184
- ## [0.4.4] - 2022-04-06
185
-
186
- - Fix `FlashList` mock when no data is provided
187
- - https://github.com/Shopify/flash-list/pull/295
188
-
189
- ## [0.4.3] - 2022-04-04
190
-
191
- - Reduce number of render item calls
192
-
193
- - https://github.com/Shopify/flash-list/pull/253
194
-
195
- - Upgrade recyclerlistview to v3.2.0-beta.2
196
- - https://github.com/Shopify/flash-list/pull/284
197
-
198
- ## [0.4.2] - 2022-04-04
199
-
200
- - Minor changes
201
-
202
- ## [0.4.1] - 2022-03-29
203
-
204
- - Crash fix for android activity switching (#256)
205
-
206
- - https://github.com/Shopify/flash-list/pull/257
207
-
208
- - initialScrollIndex, scrollTo methods will now account for size of header
209
-
210
- - https://github.com/Shopify/flash-list/pull/194
211
-
212
- - Added a new mock for easier testing of components with `FlashList`
213
- - https://github.com/Shopify/flash-list/pull/236
214
-
215
- ## [0.4.0] - 2022-03-23
216
-
217
- - Add support for layout animations
218
-
219
- - https://github.com/Shopify/flash-list/pull/183
220
-
221
- - Suppress recyclerlistview's bounded size exception for some missing cases.
222
-
223
- - https://github.com/Shopify/flash-list/pull/192
224
-
225
- - Expose reference to recyclerlistview and firstItemOffset
226
-
227
- - https://github.com/Shopify/flash-list/pull/217
228
-
229
- - recyclerlistview upgraded to v3.1.0-alpha.9
230
- - https://github.com/Shopify/flash-list/pull/227
231
-
232
- ## [0.3.3] - 2022-03-16
233
-
234
- - Prevent implicit scroll to top on device orientation change
235
- - Change recyclerlistview's bounded size exception to a warning
236
- - https://github.com/Shopify/flash-list/pull/187
237
-
238
- ## [0.3.2] - 2022-03-15
239
-
240
- - Minor changes
241
-
242
- ## [0.3.1] - 2022-03-15
243
-
244
- - Revert react-native-safe-area upgrade and minSdkVersion bump
245
- - https://github.com/Shopify/flash-list/pull/184
246
-
247
- ## [0.3.0] - 2022-03-15
248
-
249
- - Fixed untranspiled library code by enforcing stricter TS rules.
250
- - https://github.com/Shopify/flash-list/pull/181
251
-
252
- ## [0.2.4] - 2022-03-14
253
-
254
- - Added `onLoad` event that is called once the list has rendered items. This is required because FlashList doesn't render items in the first cycle.
255
- - https://github.com/Shopify/flash-list/pull/180
256
-
257
- ## [0.2.3] - 2022-03-10
258
-
259
- - Fixing publish steps for transpiled code
260
- - https://github.com/Shopify/flash-list/pull/150
261
-
262
- ## [0.2.2] - 2022-03-10
263
-
264
- - Fixing publish steps for transpiled code
265
- - https://github.com/Shopify/flash-list/pull/149
266
-
267
- ## [0.2.1] - 2022-03-09
268
-
269
- - Bug fix for style and last separator
270
- - https://github.com/Shopify/flash-list/pull/141
271
-
272
- ## [0.2.0] - 2022-03-08
273
-
274
- - Rename the component from `RecyclerFlatList` to `FlashList`
275
- - https://github.com/Shopify/flash-list/pull/140
276
-
277
- ## [0.1.0] - 2022-03-02
278
-
279
- - Initial release