Summary:
Issue fixed: #430
- [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.
Closes https://github.com/Instagram/IGListKit/pull/577
Differential Revision: D4768612
Pulled By: rnystrom
fbshipit-source-id: 6a2024101411302446cc2b7843fa175cd43a1562
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:
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:
Closed#402
- [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.
Closes https://github.com/Instagram/IGListKit/pull/453
Differential Revision: D4479611
Pulled By: rnystrom
fbshipit-source-id: 4c93ce30613e45c19478f9f5d0e59eeeb0142766
Summary:
- [x] All tests pass. Demo project builds and runs.
No breaking changes that I am aware of.
Closes https://github.com/Instagram/IGListKit/pull/440
Differential Revision: D4448496
Pulled By: rnystrom
fbshipit-source-id: 9ad9bc3734b605ceab25bf6cdf993568aa6561c1
Summary:
Updated documentation to fix#408
- [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/413
Differential Revision: D4415035
Pulled By: rnystrom
fbshipit-source-id: 2c477c515c6f1346ce6db48d4ba865099cf197cd
Summary:
So the main Podspec file now has two Subspecs, `Diffing` and for lack of better name `Default`. `Diffing` is purely the files within the common directories (used for Diffing, if in the future we support MacOS NSCollectionView then this may need changing). `Default` depends on `Diffing` but also adds all the non-common files.
To use it via CocoaPods, nothing changes. You `import IGListKit` and you will only have access to the files in the pod you use. (So if you use `IGListKit/Diffing` in your Podfile, then you will only get access to the diffing files). If you do a manual installation, or I assume via Carthage, then you will need to import the correct header file (either `IGListDiffKit.h` or `IGListKit.h` depending on what you want).
Turns out CocoaPods creates it's own umbrella header (unless you tell it otherwise) meaning our ones are unused by it.
Just to confirm `IGListKit` in your Podfile will give you everything, only if you add `/Diffing` will you "opt-out" o
Closes https://github.com/Instagram/IGListKit/pull/368
Differential Revision: D4367438
Pulled By: jessesquires
fbshipit-source-id: 272318ca551e7e8c4177ca3ca501fde23bd9705a
Summary:
- Added IGListCompatibility.h file, and imported it in the files where we need the target check.
- Ordered the project by type
In "IGListKit.h" we still have the conditional check for `#if TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR` - Did we want to make a macro or something for this check?
This is the most Obj-C I've ever done... just felt that was a worthy comment.
Closes#364
- [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/369
Differential Revision: D4366344
Pulled By: jessesquires
fbshipit-source-id: f0a6168b8965ded22a641814797fbdec92ca1c36
Summary:
- Add missing common files
- Fix podspec for common files
- Pod install all examples
Reviewed By: rnystrom
Differential Revision: D4350871
fbshipit-source-id: 708ebe6ce66caed75af5b2ac18920dcf45567d16
Summary:
Moving files to `Common` dir so changes are more automated with Buck and easier to manage in the long run. Ran `pod install` on test and example targets. Updated buck file to include `Common` so diffing lib still works.
Part of #270
Reviewed By: jessesquires
Differential Revision: D4346722
fbshipit-source-id: 366d89f6dd571b158b5fccd542080c51517ed341