Summary:
Saw our [retain cycle detector](https://github.com/facebook/FBRetainCycleDetector) fire for the `_objectTransitionBlock` in the adapter (t15355965) so I added a test. The test passes, so I don't think that is what's going on, but figured I'd submit the test anyways.
- [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/401
Differential Revision: D4398534
Pulled By: rnystrom
fbshipit-source-id: d5f07a1222c28553dbac66971a90731b2f1c397f
Summary:
I have fixed the typo in the code `previuossectionMap` -> `previousSectionMap`. I don't think this change requires to be tested as it appears to be an internal class. Because of this it's not a breaking change so I don't think it needs to be reflected in CHANGELOG.md either.
Closes#385
- [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/386
Differential Revision: D4390915
Pulled By: rnystrom
fbshipit-source-id: 1b745daaa913361ad211318ea1e216a03fe6f741
Summary:
Hey IGListKit folks! Would you be willing to expose this, so that other objects that are given a list adapter can inspect its updater configuration?
- [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/379
Reviewed By: jessesquires
Differential Revision: D4379016
Pulled By: rnystrom
fbshipit-source-id: 4056457181fea31f71b1e928b60aec46160cc585
Summary:
Such a powerful framework y'all have made! Game status: changed.
- Add a flag to `ListAdapterUpdater` to require it to perform diffing, even when collection view is not in a window.
- Ensures delegate can rely on diffing callbacks.
- Ensures layout can rely on `prepareForCollectionViewUpdates:`.
- Helps with support for AsyncDisplayKit that I'm working on ?
- [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/375
Differential Revision: D4377586
Pulled By: jessesquires
fbshipit-source-id: c48467ca5a02ab104d1e83b30430b14b186dbdd2
Summary:
Changed the criteria for starting search in the OS X Example. Closes https://github.com/Instagram/IGListKit/issues/371
Doesn't look like there are tests for the example app. Please ping me if you'd like me to add some. Also, please ping me if you'd like me to add this change to the changelog -- I'm assuming bug fixes to sample apps don't get included there.
- [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/377
Differential Revision: D4374006
Pulled By: jessesquires
fbshipit-source-id: 6e20f61aece769240aa63c8949d3c06a0ecd26c8
Summary:
Worth noting that while we support 10.8 and newer, Swift support is only 10.9 and newer. There were only a few more errors for 10.9 deployment target, but I'm not familiar with how it all works.
Using an `available` to disable row actions for users on 10.10 (only available for 10.11 and newer).
Closes https://github.com/Instagram/IGListKit/pull/374
Differential Revision: D4372977
Pulled By: jessesquires
fbshipit-source-id: 19f4b50c8eb4aa92f80241d69c44a367e854f5e8
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:
Probably a good idea to document this. 😄
Easy for new contributors to forget steps.
Putting in `.github/` so it doesn't clutter top-level dir.
Closes https://github.com/Instagram/IGListKit/pull/366
Differential Revision: D4365951
Pulled By: jessesquires
fbshipit-source-id: 63a135be0875d7cbd415586ed15c28353da25b9e
Summary:
If anything will help me remember.
Closes https://github.com/Instagram/IGListKit/pull/359
Differential Revision: D4365179
Pulled By: jessesquires
fbshipit-source-id: e002bc6bc31f8d2af59a5d5303a2c5cb09d780b6
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:
Adding a pretty basic stacked demo. 3 different sections, each with 3 child section controllers that handle an `Int` data.
Requires #354 to be fully functional (working range).
Closes#134
- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/355
Differential Revision: D4363859
Pulled By: jessesquires
fbshipit-source-id: 5dbc8e18388fed4930f189e3477ff57f0edf2d13
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: Saw some crashes come in from out-of-sync objects and section controllers. After some digging I found that the nil-datasource assert was firing (not very frequently). Mostly happening on other VCs, probably from hitting the back button and an update arriving.
Reviewed By: jessesquires
Differential Revision: D4347862
fbshipit-source-id: 38c1a4816f5c109de41297309745ac2d5e348e93
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
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