Skip to content

Commit 11d4671

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # yarn.lock
2 parents c21085c + 1297687 commit 11d4671

File tree

15 files changed

+377
-52
lines changed

15 files changed

+377
-52
lines changed

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,66 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.0.1](https://github.com/@nativescript-community/ui-collectionview/compare/v5.0.0...v5.0.1) (2023-03-31)
7+
8+
9+
### Bug Fixes
10+
11+
* **ios:** much faster cells layout + improved `autoReloadItemOnLayout` ([bd71225](https://github.com/@nativescript-community/ui-collectionview/commit/bd712259df448c87b7bc455179bba33be89cd0bd))
12+
13+
14+
15+
16+
17+
# [5.0.0](https://github.com/@nativescript-community/ui-collectionview/compare/v4.0.73...v5.0.0) (2023-03-30)
18+
19+
20+
### Features
21+
22+
* **ios:** improved cell size computation ([00d2350](https://github.com/@nativescript-community/ui-collectionview/commit/00d23502fa9f9ecf0bd50395eae38a92531d2193))
23+
24+
25+
### BREAKING CHANGES
26+
27+
* **ios:** this needs testing to ensure it does not break anything for fixed size and dynamic size templates
28+
29+
30+
31+
32+
33+
## [4.0.73](https://github.com/@nativescript-community/ui-collectionview/compare/v4.0.72...v4.0.73) (2023-03-28)
34+
35+
36+
### Bug Fixes
37+
38+
* **ios:** regression fix for items size ([9df1290](https://github.com/@nativescript-community/ui-collectionview/commit/9df129032da958e7e23685d90944ca18bb8641fa))
39+
40+
41+
42+
43+
44+
## [4.0.72](https://github.com/@nativescript-community/ui-collectionview/compare/v4.0.71...v4.0.72) (2023-03-27)
45+
46+
47+
### Bug Fixes
48+
49+
* **ios:** dont reset all cell sizes on ObservableArray updates. Only the ones needed ([b06ede3](https://github.com/@nativescript-community/ui-collectionview/commit/b06ede3880bf8d60fbd06564ab85faa27bc6f463))
50+
51+
52+
53+
54+
55+
## [4.0.71](https://github.com/@nativescript-community/ui-collectionview/compare/v4.0.70...v4.0.71) (2023-03-19)
56+
57+
58+
### Bug Fixes
59+
60+
* **ios:** prevent crash if ObservableArray triggers a change before a first refresh has been triggered ([4a216ad](https://github.com/@nativescript-community/ui-collectionview/commit/4a216ad5b7e5e87ddd9d9a75424b02475f658148))
61+
62+
63+
64+
65+
666
## [4.0.70](https://github.com/@nativescript-community/ui-collectionview/compare/v4.0.69...v4.0.70) (2023-02-05)
767

868

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "4.0.70",
2+
"version": "5.0.1",
33
"packages": [
44
"packages/*"
55
],

packages/collectionview/CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,54 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.0.1](https://github.com/nativescript-community/ui-collectionview/compare/v5.0.0...v5.0.1) (2023-03-31)
7+
8+
**Note:** Version bump only for package @nativescript-community/ui-collectionview
9+
10+
11+
12+
13+
14+
# [5.0.0](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.73...v5.0.0) (2023-03-30)
15+
16+
17+
### Features
18+
19+
* **ios:** improved cell size computation ([00d2350](https://github.com/nativescript-community/ui-collectionview/commit/00d23502fa9f9ecf0bd50395eae38a92531d2193))
20+
21+
22+
### BREAKING CHANGES
23+
24+
* **ios:** this needs testing to ensure it does not break anything for fixed size and dynamic size templates
25+
26+
27+
28+
29+
30+
## [4.0.73](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.72...v4.0.73) (2023-03-28)
31+
32+
**Note:** Version bump only for package @nativescript-community/ui-collectionview
33+
34+
35+
36+
37+
38+
## [4.0.72](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.71...v4.0.72) (2023-03-27)
39+
40+
**Note:** Version bump only for package @nativescript-community/ui-collectionview
41+
42+
43+
44+
45+
46+
## [4.0.71](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.70...v4.0.71) (2023-03-19)
47+
48+
**Note:** Version bump only for package @nativescript-community/ui-collectionview
49+
50+
51+
52+
53+
654
## [4.0.70](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.69...v4.0.70) (2023-02-05)
755

856

packages/collectionview/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript-community/ui-collectionview",
3-
"version": "4.0.70",
3+
"version": "5.0.1",
44
"description": "Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.",
55
"main": "./index",
66
"sideEffects": false,
228 Bytes
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#import <UIKit/UIKit.h>
2+
#import "UICollectionViewCacheDelegateFlowLayout.h"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@interface UICollectionViewCacheDelegateFlowLayout: NSObject <UICollectionViewDelegateFlowLayout>
2+
3+
@property (nonatomic, retain) NSMutableArray* cachedSizes;
4+
5+
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout computedSizeForItemAtIndexPath:(NSIndexPath *)indexPath;
6+
@end
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#import "UICollectionViewCacheDelegateFlowLayout.h"
2+
3+
@implementation UICollectionViewCacheDelegateFlowLayout
4+
@synthesize cachedSizes;
5+
- (instancetype)init
6+
{
7+
self = [super init];
8+
if (self) {
9+
self.cachedSizes = [NSMutableArray new];
10+
}
11+
return self;
12+
}
13+
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout computedSizeForItemAtIndexPath:(NSIndexPath *)indexPath
14+
{
15+
return CGSizeZero;
16+
}
17+
18+
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
19+
{
20+
NSInteger index = indexPath.row;
21+
if (index < [self.cachedSizes count]) {
22+
NSValue* value = [self.cachedSizes objectAtIndex:indexPath.row];
23+
if (value != nil && !CGSizeEqualToSize([value CGSizeValue], CGSizeZero)) {
24+
return [value CGSizeValue];
25+
}
26+
CGSize size = [self collectionView:collectionView layout:collectionViewLayout computedSizeForItemAtIndexPath:indexPath];
27+
[self.cachedSizes replaceObjectAtIndex:indexPath.row withObject:[NSValue valueWithCGSize:size]];
28+
return size;
29+
} else {
30+
CGSize size = [self collectionView:collectionView layout:collectionViewLayout computedSizeForItemAtIndexPath:indexPath];
31+
[self.cachedSizes addObject:[NSValue valueWithCGSize:size]];
32+
return size;
33+
}
34+
}
35+
36+
@end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module NSCollectionView {
2+
umbrella header "NSCollectionView.h"
3+
export *
4+
module * { export * }
5+
}

packages/waterfall/CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,46 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [5.0.1](https://github.com/nativescript-community/ui-collectionview/compare/v5.0.0...v5.0.1) (2023-03-31)
7+
8+
**Note:** Version bump only for package @nativescript-community/ui-collectionview-waterfall
9+
10+
11+
12+
13+
14+
# [5.0.0](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.73...v5.0.0) (2023-03-30)
15+
16+
**Note:** Version bump only for package @nativescript-community/ui-collectionview-waterfall
17+
18+
19+
20+
21+
22+
## [4.0.73](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.72...v4.0.73) (2023-03-28)
23+
24+
**Note:** Version bump only for package @nativescript-community/ui-collectionview-waterfall
25+
26+
27+
28+
29+
30+
## [4.0.72](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.71...v4.0.72) (2023-03-27)
31+
32+
**Note:** Version bump only for package @nativescript-community/ui-collectionview-waterfall
33+
34+
35+
36+
37+
38+
## [4.0.71](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.70...v4.0.71) (2023-03-19)
39+
40+
**Note:** Version bump only for package @nativescript-community/ui-collectionview-waterfall
41+
42+
43+
44+
45+
646
## [4.0.70](https://github.com/nativescript-community/ui-collectionview/compare/v4.0.69...v4.0.70) (2023-02-05)
747

848
**Note:** Version bump only for package @nativescript-community/ui-collectionview-waterfall

0 commit comments

Comments
 (0)