Summary:
## Changes in this pull request
`Examples/Examples-iOS/Pods/Pods.xcodeproj/project.pbxproj`
`Examples/Examples-tvOS/Pods/Pods.xcodeproj/project.pbxproj`
this change just Xcode 11.2 generated.
This pr aim to remove useless `IGSystemVersion` file.
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1396
Reviewed By: lorixx
Differential Revision: D18638299
Pulled By: iperry90
fbshipit-source-id: 0b6583f1210e5d1570dd672eed8c59901d6785f6
Summary:
## Changes in this pull request
Get this fix and make it ready for 4.0 release.
### Checklist
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1393
Reviewed By: iperry90
Differential Revision: D18618773
Pulled By: lorixx
fbshipit-source-id: 0360c36d85dc5db15d7e08bdf68ec9c8be992499
Summary:
As title, let's prepare the 4.0 release with the version bump.
1. Change the Source/Info.plist to have 4.0.0 for CFBundleShortVersionString.
2. Manually update any .md files that used the old release versions.
3. Run `./scripts/setup.sh` to re-update all the pods and the Example projects.
Reviewed By: natestedman
Differential Revision: D18616823
fbshipit-source-id: ca0f2a09cdd9ab592c2cb002fe923e195ce3ab12
Summary:
## Changes in this pull request
This updates the Podfile to use the specs CDN instead of the git checkout, which is more performant (and the default with CocoaPods 1.8 and higher).
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1386
Reviewed By: lorixx
Differential Revision: D18572204
Pulled By: iperry90
fbshipit-source-id: d3b721aaff92b18efeef31282cb9204055baec21
Summary:
## Changes in this pull request
Updated the link to RxIGListKit as the current one points to a dead end. Simple documentation update, no code changes.
Issue fixed: #
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1375
Reviewed By: bdotdub
Differential Revision: D18525301
Pulled By: iperry90
fbshipit-source-id: 650c6828b5a9ba256d2aa6b0c1abb27d3de43a8c
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1385
I attempted to work the two frameworks into a single podspec, but it didn't really work that well. Instead, let's just split them into two podspec files - this should work fine, and more closely follows the Carthage/Xcode behavior.
This should address #1382. Note that the attached project does need to be edited, because we also need to manually specify the `IGListDiffKit` pod location. This issue will go away with the release of 4.0.
Reviewed By: iperry90
Differential Revision: D18449843
fbshipit-source-id: 2750aee1ba39d21b9f1b3521ea8911929ae728b1
Summary: We need this for the `--include-podspecs` flag used in the next commit.
Reviewed By: iperry90
Differential Revision: D18450156
fbshipit-source-id: 88b12e5e8d22fbd3ec4fe0fb51aa6f4426216f25
Summary: This allows us to have a single declaration of the version in the `Info.plist`, and have it automatically synced to the podspec. I'm going to split the podspecs as I did it wrong (#1382) when splitting the libraries, so this avoids having three places where the version is declared.
Reviewed By: iperry90
Differential Revision: D18449842
fbshipit-source-id: 2991180ee14003b8ebe1f4ef601036404315dfd6
Summary:
## Changes in this pull request
Add Swift name annotation `ListAdapterDelegate` to `IGListAdapterDelegate`. The breaking change is written in the `CHANGELOG.md` for the `4.0.0` release
Issue fixed: https://github.com/Instagram/IGListKit/issues/1115
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1116
Reviewed By: bdotdub
Differential Revision: D18278551
Pulled By: iperry90
fbshipit-source-id: db9d1910fc4be7ffa723ee291a9c65db0fd217c0
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1377
This splits the diffing-only components from `IGListKit` out into a separate library, `IGListDiffKit`, allowing them to be used independently of the rest of `IGListKit`. We've found that the diffing components of the library are useful independently of the rest of the `UICollectionView` infrastructure, and separating the libraries allows apps to take advantage of those components without paying the full binary size cost of `IGListKit`. The diffing components are available as a subspec in Cocoapods, and as an independent framework in Carthage and direct Xcode project import (i.e. Git submodules).
This is a breaking change, necessitating a major version bump, although it should have only minor impact for projects using the umbrella header `IGListKit.h`, as that header continues to import the diffing utilities. In particular, for a project using Cocoapods and importing `IGListKit.h`, there should be no code changes required.
Reviewed By: calimarkus
Differential Revision: D18114249
fbshipit-source-id: 363b5a427e32800bbc6e82f897230963b4167245
Summary:
We don't use nokogiri directly in our library, but it found its was into our Gemfile.lock. I'm bumping the version in the Gemfile.lock because the version it's calling for has a security vuln: https://github.com/sparklemotion/nokogiri/issues/1915. When I tried setting up this library from a github clone, so I imagine others may be running into this and wasting time on it as well.
Another solution here would just be to remove nokogiri from our Gemfile.lock entirely. I don't think we use it directly anywhere, and was just included in the lock because it happened to be in someone's environment at the time of the lock file creation.
Reviewed By: joetam
Differential Revision: D18046184
fbshipit-source-id: de6263bb24783988545a77cb67ee66c9697820de
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1376
Our [builds](https://travis-ci.org/Instagram/IGListKit) have been failing since `IGListStackedSectionController` was removed in [D17200801](D17200801)/[1355](https://github.com/Instagram/IGListKit/pull/1355). The error message in our Travis logs points to something related to `IGListStackedSectionController` causing the error:
```
X error: /Users/travis/build/Instagram/IGListKit/Source/Internal/IGListStackedSectionControllerInternal.h: No such file or directory
** BUILD FAILED **
The following build commands failed:
CpHeader /Users/travis/build/Instagram/IGListKit/Source/Internal/IGListStackedSectionControllerInternal.h /Users/travis/Library/Developer/Xcode/DerivedData/IGListKitExamples-cfbxdbnpimeeplcoaiqrlyrrqjxn/Build/Products/Debug-iphonesimulator/IGListKit/IGListKit.framework/PrivateHeaders/IGListStackedSectionControllerInternal.h
(1 failure)
```
Pretty sure the issue here is that the `xcodeproj` files were not rebuilt after deleting these files, which meant they were pointing to files that no longer existed, which caused the build to fail. I was able to fix this issue by running our `setup.sh` script, which regenerated the `xcodeproj` files.
Reviewed By: bdotdub
Differential Revision: D18064465
fbshipit-source-id: d07586a99d4bbb9346bdda0752dbd613eb1b6d03
Summary:
Issue: The `NSIndexPath` level updates are really tricky because they don't go through the diffing process. It's up to the caller to make sure that the inserts/deletes/moves all add up to the final number of items. And it's not uncommon that 2 different updates will try to change the same `NSIndexPath` at the same time, which can cause headaches and crashes. For example, if we insert/delete the same `NSIndexPath` twice in the same update pass, we end up with 2 inserts and 1 delete, because we remove duplicated deletes. This causes an `NSInternalInconsistencyException` since things don't add up at the end.
Fix: Lets also remove duplicate `NSIndexPath` inserts to balance things out. In the future, it would be nice to get rid of this API entirely and have everything go through the diffing.
Reviewed By: lorixx
Differential Revision: D17423776
fbshipit-source-id: 62fdf5bd521a915e984e8de180c74858f7ae7ef4
Summary:
## Changes in this pull request
Issue fixed: #
### Checklist
- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1366
Differential Revision: D17401484
Pulled By: lorixx
fbshipit-source-id: 2fda3a2b36d88a712f2853774eed5987793db26c
Summary:
* Issue: `[IGListAdapter scrollToObject ...]` currently calls `[collectionView layoutIfNeeded]` before scrolling which creates the current visible cells that will no longer be visible after the scroll. This causes perf issues when we scroll immediately after creating the view controller.
* Fix: Instead of asking the layout object for the attributes, lets go throught the `UICollectionView`. So if the attributes are not ready, the `UICollectionView` will call `-prepareLayout`, return the attributes, but doesn't generate the cells just yet.
Differential Revision: D17326459
fbshipit-source-id: 745942225e0311fea7c3efb07ac1e8b8e0a82996
Summary:
* Issue: Calling `[UICollectionView layoutAttributesForSupplementaryElementOfKind...]` with an indexPath that doesn't have a supplimentary view.
* Cause: `IGListCollectionViewLayout` always returns a non-nil `UICollectionViewLayoutAttributes` when calling `layoutAttributesForSupplementaryViewOfKind` which tells the `UICollectionView` that it's fair game to ask the dataSource for a supplementary view at the indexPath. But when it does, the section controller could return nil, which throws an expection.
In the Apple docs about `[UICollectionViewDataSource collectionView:viewForSupplementaryElementOfKind:atIndexPath:]`
> This method must always return a valid view object. If you do not want a supplementary view in a particular case, your layout object should not create the attributes for that view.
https://developer.apple.com/documentation/uikit/uicollectionviewdatasource/1618037-collectionview?language=objc
* Fix: Just like `UICollectionViewFlowLayout`, if the supplementary view size is empty, lets return a nil attribute.
Reviewed By: Ziewvater
Differential Revision: D17326461
fbshipit-source-id: 507e98f43e951216cf2eafe2449f87df25439e11
Summary:
* Fix `prefetchingEnabled` which is only available in iOS 10. Not entirely sure why this hasn't been an issue before.
* Re-enable the scrollToObject tests by avoiding the safeAreaInsets
Reviewed By: lorixx
Differential Revision: D17326458
fbshipit-source-id: c99ee6f8bcf91aca427d3122fdefe67d6c99055b
Summary:
## Changes in this pull request
Remove the redundant __IPHONE_11_0, because the minimum requirement is Xcode 9.0+ now.
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1351
Differential Revision: D17200815
Pulled By: lorixx
fbshipit-source-id: 25705856cf26d5c215ed956802ab1022c98cbca0
Summary:
### Changes in this pull request
* Improve compilation time by reducing unnecessary compilation dependencies
* More clean code
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1358
Differential Revision: D17200761
Pulled By: lorixx
fbshipit-source-id: 9c6bca4d3d5e2e4b35125c7a12e483d58993c4e8
Summary:
## Changes in this pull request
Update to use `QoS` and take higher priority for responsiveness and energy efficiency.
Following the guideline in the doc [Energy Efficiency Guide for iOS Apps](https://developer.apple.com/library/archive/documentation/Performance/Conceptual/EnergyGuide-iOS/PrioritizeWorkWithQoS.html).
It's better to use `User-initiated` QoS in `Background Diffing` because it focuses on "Work that the user has initiated and requires immediate results".
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1363
Differential Revision: D17200745
Pulled By: lorixx
fbshipit-source-id: 4b9b2159f06edeed92e79bac771fe7b89f6d5708
Summary:
## Changes in this pull request
Update `README` installation version to the latest stable version `3.4.0`
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1354
Differential Revision: D17200807
Pulled By: lorixx
fbshipit-source-id: 733f8c65e4eff7b0498c0425354f5951fd5d8569
Summary:
In order to foster healthy open source communities, we're adopting the
[Contributor Covenant](https://www.contributor-covenant.org/). It has been
built by open source community members and represents a shared understanding of
what is expected from a healthy community.
Reviewed By: josephsavona, danobi, rdzhabarov
Differential Revision: D17104640
fbshipit-source-id: d210000de686c5f0d97d602b50472d5869bc6a49
Summary:
Remodel changed quite a bit, this updates the plugin to work correctly with the latest state.
It also includes other recent Remodel changes like e.g. autoformatting of the codebase.
Resolves#1353
Reviewed By: natestedman
Differential Revision: D16794236
fbshipit-source-id: f543d0e3e5656f540accd5e359bbaf0acc8071fc
Summary:
## Changes in this pull request
Delete duplicate headers in `IGListKit.h`
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1347
Reviewed By: joetam
Differential Revision: D16542316
Pulled By: joetam
fbshipit-source-id: feaaaaca0f9eddc4be58996c8a3a2521a7817185
Summary:
## Changes in this pull request
Fix broken image links in `Modeling and Binding.md`
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1348
Reviewed By: joetam
Differential Revision: D16542309
Pulled By: joetam
fbshipit-source-id: 4b761d568b0b4d60d8caefd89c7f130cfb96123e
Summary: The warning that is triggered (see: https://travis-ci.org/Instagram/IGListKit/builds/564842923) warns about not having a proper team ID. Since this is a library, I think it is ok to ignore this error.
Reviewed By: Ziewvater
Differential Revision: D16543506
fbshipit-source-id: 1057384514ca5d605daa786a991fb643c2d718e5
Summary:
## Changes in this pull request
Should map be a map of `IndexPath`s instead of arrays of `IndexPath`s? Also, we might need some unit tests on this part. I don't think it's covered.
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1205
Reviewed By: Ziewvater
Differential Revision: D15962803
Pulled By: lorixx
fbshipit-source-id: f207b69ef0ebad08cd72b14ba53101e56d1604fd
Summary:
- See #1262 (cell reordering using a binding section controller caused problems)
## Changes in this pull request
- Added method override in `IGListBindingSectionController` to update the internal `viewModels` array after a cell has been moved
- Subclasses of IGListBindingSectionController require to call super
Issue fixed: #1262
I've added a test for this change. Is this enough? Or should I add more corner cases or something?
### Checklist
Some tests fail, but they do seem unrelated. I don't know if this is normal. I haven't changed anything regarding those failing tests.
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1274
Reviewed By: candance
Differential Revision: D15592822
Pulled By: lorixx
fbshipit-source-id: d81c18bec0ad0a6a6613089245352bb182a92f26
Summary:
The collection view layout here should not be accessing the data source directly but instead asking the collection view for the number of sections and number of items. This is because the collection view holds an internal cache and if there is a discrepancy between when the collection view cache and the data source, preparing the layout will crash the app because we will send a layout down to the collection view with a items that might not exist in the collection view's cache but exist in the data source.
This diff adds an experiment to see the impact of fixing this check so that when we prepare layouts we don't ask the data source directly but ask the collection view instead. The collection view will then update it's cache and check the data source so it does not crash when we prepare a layout.
```
NSInternalInconsistencyException at __45-[UICollectionViewData validateLayoutInRect:]_block_invoke:
UICollectionView received layout attributes for a cell with an index path that does not exist:
<NSIndexPath: 0xc198a8c3ea391fbb> {length = 2, path = 4 - 0}
```
Reviewed By: lorixx
Differential Revision: D15830610
fbshipit-source-id: f3dae3e87c55b86c3b686309c1144ccfff1375bf
Summary: The test was actually deallocated last year, and this test is never cleaned up. Now let's clean it up.
Reviewed By: chritto
Differential Revision: D15777898
fbshipit-source-id: c3a704ee1bfdd085c4ceb89af424a10ed07a65b6
Summary:
## Changes in this pull request
Issue fixed: https://github.com/Instagram/IGListKit/issues/1275
This PR is straintforward solution as mentioned in https://github.com/Instagram/IGListKit/issues/1275. When I finished it, I realized that it is not a problem in `IGListCollectionViewLayout Partial Optimization` and `IGListBindingSectionController` deserved it. Maybe `IGListCollectionViewLayout` is rarely used because of great builtin UICollectionViewFlowLayout or cells in section rarely need changing their sizes in practices.
Despite it is not `IGListCollectionViewLayout`'s fault, I think it can be more optimized against `invalidateLayoutWithContext`. I would like to make an another PR to optimize it.
Due to this PR just giving a proposed solution, it lacks of adding tests and changing log. When this solution is accepted, I would like to complete these todos.
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1285
Reviewed By: candance
Differential Revision: D15592807
Pulled By: lorixx
fbshipit-source-id: ae06abce896341509de4f3dfb73b3a7bc0a68c51
Summary:
Just realized #1284 had an extraneous `else` block. This just cleans that up
## Changes in this pull request
See above
### Checklist
- [X] All tests pass. Demo project builds and runs.
- [X] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1325
Reviewed By: timonus
Differential Revision: D15511564
Pulled By: timonus
fbshipit-source-id: c21213ee6ccc06ffb0b646381cba3faff0347144
Summary:
The implementation of
```Objective-C
-[IGListAdapter scrollToObject:supplementaryKinds:scrollDirection:scrollPosition:animated:]
```
has little inconsistencies where the `UICollectionViewScrollPositionLeft` and `UICollectionViewScrollPositionTop` considering the content inset left/top of the collection view was being applied to the final offset. However, the `UICollectionViewScrollPositionRight` and `UICollectionViewScrollPositionBottom` ignoring the content inset right/bottom of the collection view was being applied to the final offset. The different result is that scrolling to the most `Left/Top`, the first section content always be visible by considering its content inset while scrolling to the most `Right/Bottom`, the last section content always be fully displayed but not be fully visible by considering its content inset.
## Changes in this pull request
Issue fixed: #
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1284
Reviewed By: lorixx
Differential Revision: D13590416
Pulled By: lorixx
fbshipit-source-id: ae52be9e5ba25b50c7a0ad768a4af728347523e2
Summary:
## Changes in this pull request
Add Package.swift file to support Swift Package manager.
Issue fixed: #925
### Checklist
- [x] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1323
Differential Revision: D15437799
Pulled By: lorixx
fbshipit-source-id: bb1b008c4f39d35fc1194e91be617b0950f05b2f
Summary:
This is a bigger PR than I'd like but there is a bunch of stuff in here that feels like we should land all at once to fix the Travis setup.
Currently, there is a few things wrong. Briefly:
1. Travis is failing to even build the library (see: [build 2298](https://travis-ci.org/Instagram/IGListKit/jobs/506564900))
2. There are legitimately failing tests
3. Travis seems to be flakey running UI tests
This PR deals with the first two.
The Xcode projects were not building because some recently added files weren't added to the xcodeproj (ie. 46a124ddfe and 4662454c4a).
Also added `Foundation.h` import for `bool` definition for `IGSystemVersion` (also a new file)
The main `Podfile.lock` was already being generated via `1.5.3` (0c0b31ad7c) but the `Gemfile` had the wrong version and none of the example project `Podfile.lock`s were re-generated with it.
Once I got the projects correctly building and tests running, I discovered there were a bunch of tests that were legitimately failing. It's unclear when these started failing and what caused it.
I thought it made sense to disable these tests for now and then create Github issues to fix them as starter tasks instead of making this diff even larger.. I can create those if that sounds good.
Somewhat related, it seems like the UI tests on Travis may be a bit flakey. They pass locally, but breaks on Travis [[example](https://travis-ci.com/bdotdub/IGListKit/jobs/195758250)] with error messages like `Failure requesting automation session for com.instagram.IGListKitExamples:85190`
----
- [X] All tests pass. Demo project builds and runs.
- [X] I added tests, an experiment, or detailed why my change isn't tested.
- [X] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [X] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1317
Reviewed By: rnystrom
Differential Revision: D15157375
Pulled By: rnystrom
fbshipit-source-id: b29131f59b74398b6d2b3a73453248cb3325a955
Summary:
* Currently, there's no easy way to measure how long we spend dequeueing cells or handling scroll events across the app. This makes it a bit difficult to catch scroll-perf issues early on.
* Fix: Lets create `IGListAdapterPerformanceDelegate` which gives us that information.
Reviewed By: rnystrom
Differential Revision: D14430449
fbshipit-source-id: 7bc170bdaa37807c8719976e8818f3a578ee17dd
Summary:
We have observed that keeping the coalescing time here would actually decrease the stability here, it makes the app crash more often.
It's probably caused by some race condition during that time and UICV updates become out of sync.
Reviewed By: rnystrom
Differential Revision: D14379265
fbshipit-source-id: 502c1c14fb8bdfc35969f721687e82888b160110
Summary:
This assert was hoping to find if there are any duplicates from the `fromObjects`. However, from the finding, we did not see any assertion or trace that this is the case.
The `objectsWithDuplicateIdentifiersRemoved` is actually doing extra work during updates.
We should remove this for the sake of better scroll perf and faster UI update.
Reviewed By: calimarkus
Differential Revision: D14339124
fbshipit-source-id: ff40fd23a05640058673d46f63a9e4bf516dd3f6
Summary:
Added working range handler tests. This will allow changes/experiments to be made to the working range handler with improved confidence.
Two of the added tests are currently disabled; working range updates don't currently take inserts and deletes into account and so these tests fail.
Reviewed By: rnystrom
Differential Revision: D13717357
fbshipit-source-id: dd4523d3162cfe13ee03e9d10ffa22b58514ca5f