Summary:
Always invalidate the `collectionViewLayout` when calling `reloadData`. Turns out there are inconsistencies when layout attributes are queries/stored using `UICollectionViewFlowLayout` and `estimatedItemSize`.
Reproduced in unit test, fixed the test.
Closes#305
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/319
Differential Revision: D4329318
Pulled By: rnystrom
fbshipit-source-id: 91851f6ab170a416810712308727225404ad59ba
Summary:
Added support for macOS. The macOS target includes only the core diffing functionality so `IGListDiff` can be used on macOS apps.
I have not added the tests because I don't know how you're setting them up, maybe the same tests can be used by adding some `#if os(...)`s to the test files.
I have tested integration on iOS, tvOS and macOS using both Carthage and Cocoapods.
Closes https://github.com/Instagram/IGListKit/pull/235
Differential Revision: D4325423
Pulled By: jessesquires
fbshipit-source-id: 871bf08410061306004872f5feb7a09d362b6bc1
Summary:
Nits in the readme, not a full sentence.
Closes https://github.com/Instagram/IGListKit/pull/327
Differential Revision: D4325422
Pulled By: jessesquires
fbshipit-source-id: 6873aef68276107b793934b6b3e06d10fa10a8a4
Summary:
Adds a new test and fixes an item animation collision that `UICollectionView` throws on. Basically we cannot collide reloads with insert+delete.
The example in the test is trivial, but real-world situations do appear b/c of the coalescence of `IGListAdapterUpdater`. It can queue reloads and deletes/inserts at the same index paths while waiting.
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/325
Differential Revision: D4322005
Pulled By: rnystrom
fbshipit-source-id: 2247163c13c0873a74ac485efff2d882ca6568f9
Summary:
Working on that coverage %. Hustle to ?
Seriously tho, nearly maxed the coverage that is realistic. I think we need to spend some time on the grid layout tho, there are parts untested that also are unnecessary. I should file a 3.0.0 issue to track work on that.
Waiting for CI ?
Closes https://github.com/Instagram/IGListKit/pull/324
Differential Revision: D4319806
Pulled By: rnystrom
fbshipit-source-id: b626abd65ad73709c231671c0c669414eef1660b
Summary:
rnystrom - I know you removed this before, but I think we should add it back now that we support > 1 platform. 😄
(and macOS is coming up in #235 )
Closes https://github.com/Instagram/IGListKit/pull/322
Differential Revision: D4314033
Pulled By: rnystrom
fbshipit-source-id: d768d0ce19df0154609ab639f0acb8d95fe2b7da
Summary:
Just a few tweaks, less verbose.
Also -- removed the "manual" installation. I don't think hardly anyone uses this. Plus, I don't think a simple drag + drop would work because of `OCMock`.
Closes https://github.com/Instagram/IGListKit/pull/313
Differential Revision: D4313111
Pulled By: rnystrom
fbshipit-source-id: 4796d94e9f4c853220780074807e902a7390c037
Summary:
- Install `markdown-link-check` as a dependency
- Check each markdown file for links, and check them using aforementioned library
Closes#312
A few points of note, I'm not sure if we can use the built-in caching capabilities to cache the library (at the moment it's installed for each build, even though it's only used for 1 -- seems a big waste!). Also a downside of the library is it doesn't really like relative links, we only had one -- so I changed it to be absolute.
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/314
Differential Revision: D4313106
Pulled By: rnystrom
fbshipit-source-id: a73fef73d7d7b54ddff3d5760756630cedb6a6d6
Summary:
This needs to land and be part of #307 before that gets merged, right?
Part of #306
Closes https://github.com/Instagram/IGListKit/pull/308
Differential Revision: D4306594
Pulled By: rnystrom
fbshipit-source-id: 59314d669f2d42f7dc7856249cf53b81ca001466
Summary:
Add 2 new unit test files for IGListCollectionView. One is for storyboards and the other for when creating the IGListCollectionView in code.
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/303
Differential Revision: D4304615
Pulled By: rnystrom
fbshipit-source-id: c6edbcd493fe4ee087ce3d0aee80db484207859d
Summary:
Updated IGListCollectionView:initWithFrame:collectionViewLayout constructor to support UIAppearance for the backgroundColor property.
Fixes#294
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/298
Differential Revision: D4292394
Pulled By: rnystrom
fbshipit-source-id: a7c4f0e516728b684993f2651eadcc25001de783
Summary:
✨ magic ✨
We forgot the lamb's blood last time.
- run UI tests on ~~iOS 9, not iOS 10~~ iOS 10.1
- only pod lint once
- only build examples for major releases, not point releases. (new APIs are rarely introduced in point releases)
Closes https://github.com/Instagram/IGListKit/pull/296
Differential Revision: D4291789
Pulled By: rnystrom
fbshipit-source-id: fcfd84be4e914fbc9d0a723315ae6d3ff7582e70
Summary:
Adding a few more missing unit tests.
Closes#185
Closes https://github.com/Instagram/IGListKit/pull/289
Differential Revision: D4284610
Pulled By: rnystrom
fbshipit-source-id: a592fb9c12a3995a62b608f44cdcc693a0f79bec
Summary:
Beefing up our test coverage. Made an improvement to supplementary view behavior along the way. Will update `CHANGELOG.md` once travis finishes w/ link to PR #.
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/286
Differential Revision: D4281961
Pulled By: jessesquires
fbshipit-source-id: 32b5877bd72250b9a99e600ceffc64d686fa5651
Summary:
Couple more unit tests missing from `IGListAdapter`.
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/287
Differential Revision: D4281952
Pulled By: jessesquires
fbshipit-source-id: da01d22b291071e5b2a7623b263574738456b8b8
Summary: Rare, but very real crash that occurs when a reload is manually queued and then the section gets deleted in a diff.
Reviewed By: jeremycohen
Differential Revision: D4267678
fbshipit-source-id: a5bedf77934ff85f76830e3f0123a993fc5d885c
Summary:
Fixes from PR #273 rebase.
jessesquires rnystrom this should look a little better and be able to merge.
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/275
Differential Revision: D4271440
Pulled By: rnystrom
fbshipit-source-id: a85b8c80b5504640d7f82b183ed5b5d0d0ea5c1b
Summary:
- Add scrolling method on IGListCollectionContext so that section controllers can scroll to themselves.
- Update CHANGELOG.
- Other misc fixes.
- Closes#267 on GitHub.
Reviewed By: rnystrom
Differential Revision: D4261144
fbshipit-source-id: 9eed833cfff06107607bba01a0beee1d871497b6
Summary:
Add basic UI Testing to Examples-iOS app.
It doesn't cover all the examples yet, but Xcode is reporting ~82% of coverage.
Updated travis.yml to run the UI Tests for only one of the matrix jobs - "OS=10.0,name=iPhone 6s", to try to keep the build times acceptable. Last job took ~3 min for the UI Testing section (being the whole build usually around 40 min).
Was feeling like playing a bit with UI Testing and took the chance to use it here, since rnystrom [showed interest in having it](https://github.com/Instagram/IGListKit/pull/251#issuecomment-262375087).
- [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 have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/268
Differential Revision: D4259177
Pulled By: jessesquires
fbshipit-source-id: 77fdaf8588e090e4b13836a127d9f6d838248163
Summary:
- Add script for example setup
- Run pod install and check-in changes
Reviewed By: dshahidehpour
Differential Revision: D4250015
fbshipit-source-id: 51e7342d698bc9874bbbcfb8e784fe62e82d1ac6
Summary:
Some minor tweaks and improvements to this guide. 😄
Closes https://github.com/Instagram/IGListKit/pull/265
Differential Revision: D4235752
Pulled By: jessesquires
fbshipit-source-id: 03adec7750ac8ded23542db97b9506ff7dc00adf
Summary:
Even with the assert, we will add `NSNotFound` to the set which will crash. Instead, skip adding the value in case a consumer is using a reference to an object that doesn't exist anymore.
Also, should be using `continue` if a section controller isn't returned by the data source.
Reviewed By: jessesquires
Differential Revision: D4226771
fbshipit-source-id: ed6df0992fdef611dd8fae64f4716e296df11f9a