Summary:
The content inset of a collection view can change at any time (as it does with our refresh control) and isn't a good measure of the container size. I don't want to totally remove that API though, so I changed the default behavior, added an insets API, and also added the functionality of the original in a new API.
This makes sizes much more deterministic.
Reviewed By: jessesquires
Differential Revision: D4800758
fbshipit-source-id: 85ce843b5b1c297cea2e2ea705fa255617cbe356
Summary:
We constantly have random bugs pop up when mutations are made outside of a batch update. This change restricts the mutation API to a batch context object (which is just an `IGListAdapter`) so they can only be done **inside an update block**.
- Fixed open source project
- Confirmed open source examples build
- Updated all of Instagram.app to use this API
- Changelog breaking changes entry
Fixes#392
Reviewed By: jessesquires
Differential Revision: D4754129
fbshipit-source-id: 11d32a0fac3e50c9edbb01e92a8a0c7b8a43cf2d
Summary:
Add API for #315. Not sure if this is what you want rnystrom though 🤔. Will add tests after you confirm.
- [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)
Closes https://github.com/Instagram/IGListKit/pull/456
Reviewed By: jessesquires
Differential Revision: D4697190
Pulled By: rnystrom
fbshipit-source-id: f8513cf2fa33441eb40f486954136553d19dda0c
Summary:
Add IGListCollectionContext API to get visible indexes:
`- (NSArray<NSIndexPath *> *)visiblePathsForSectionController:(IGListSectionController<IGListSectionType> *) sectionController`
Issue fixed: #465
- [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)
Closes https://github.com/Instagram/IGListKit/pull/507
Differential Revision: D4621418
Pulled By: jessesquires
fbshipit-source-id: 4b55500c83ca1b911c418e5857756bb076fc80e4
Summary:
Adding an API to do item-level (cell) moves on the collection view. This complicates things a little bit because of all the issues that moving sections have while in batch updates (e.g. simultaneous animation UICV bugs). Thankfully we use pretty strict types so the compiler does most of the work for us.
Closes#145
- [x] Tests build and pass
- [x] Add `IGListBatchUpdateData` tests to check moves during
- [x] ~~Moving within a reloaded section (no op)~~ can't reload sections
- [x] Moving within a deleted section (no op)
- [x] Moving within a moved section (convert section ops to delete+insert)
- [x] Moving an index path that is also reloaded (convert to delete+insert path)
- [x] Add move unit tests to `IGListAdapterUpdater`
- [x] Add move unit tests to `IGListReloadDataUpdater` (mostly for code coverage...)
- [x] Add move unit tests to `IGListStackedSectionController`
- [x] Add `CHANGELOG.md` entry for 3.0.0
- [x] Test moving without batch
Closes https://github.com/Instagram/IGListKit/pull/418
Reviewed By: jessesquires
Differential Revision: D4521732
Pulled By: rnystrom
fbshipit-source-id: 99a46d1cbb0cc1f857a62ff6ca257aff6e8b7f25
Summary:
The reloadData method in IGListStackedSectionController was being called too soon. It was moved from the constructor to the `didUpdateToObject` method. Tests were updated to reflect the change.
- [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)
Closes https://github.com/Instagram/IGListKit/pull/390
Differential Revision: D4419751
Pulled By: rnystrom
fbshipit-source-id: 7c812d306b23dd251c160425873930eb8022b1a5
Summary:
Fixes bug reported internally. When items are removed dynamically the stack internal store will attempt to access data that has already been removed. Instead use assoc objects.
We did change `IGListAdapter` to [use a map](https://github.com/Instagram/IGListKit/blob/master/Source/IGListAdapter.m#L681) instead of assoc objects. That could be a good cleanup.
cc cdoncarroll
- [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/358
Differential Revision: D4363840
Pulled By: jessesquires
fbshipit-source-id: ef73b4302f88a15cbf70378421d702f7e2bddbd5
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:
Rename *ItemController unit tests to *SectionController, addressing issue #126
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/129
Differential Revision: D4095496
Pulled By: rnystrom
fbshipit-source-id: 277be38ed2789f14199cee9d711a838552921f10
2016-10-28 07:44:16 -07:00
Renamed from Tests/IGListStackItemControllerTests.m (Browse further)