Summary:
- Move docs script to `scripts/`
- Add small note on README about regenerating docs
- Re-gen docs (doing this because of all the recent spelling, etc. fixes -- note, no breaking changes have landed, so we're good to re-gen.)
Closes https://github.com/Instagram/IGListKit/pull/797
Differential Revision: D5162705
Pulled By: rnystrom
fbshipit-source-id: 83cb0f171c10526a8a4b5d8a746fc2226987f256
Summary:
Issue fixed: #770
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/783
Differential Revision: D5137558
Pulled By: rnystrom
fbshipit-source-id: e8c94d5d6d0ffde4f283915a21cd015604938c88
Summary:
Issue fixed: #762
- [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/780
Differential Revision: D5129315
Pulled By: rnystrom
fbshipit-source-id: d63e37c75ba633899ea8759c7c9c1baf023b1e2b
Summary:

Noticed an issue when trying to build the examples project that I couldn't because of the Swiftlint build phase (see the image above)
As it turns out in between the version I have installed (0.16.1) and the latest (0.19.0) they've made it so you can drop `lint` from the command (which is the default task).
I see two options really:
1. We add `lint` to the command which at least lets older versions of Swiftlint compile the project without making changes to run phases. It's worth noting that this means that certain (newer) rules won't be detected.
2. We add a way of detecting if they have an older version (likely by comparing the output of `$(swiftlint version)` to the version we know it works on. And display a more appropriate message and not fail the build.
Happy to discuss this
heshamsalman jessesquires rnystrom
Closes https://github.com/Instagram/IGListKit/pull/796
Differential Revision: D5137557
Pulled By: rnystrom
fbshipit-source-id: b6c85197d7a66e37976d66b646c9c9241827ce42
Summary:
Issue fixed: #792
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/795
Differential Revision: D5132076
Pulled By: rnystrom
fbshipit-source-id: 7d68f842e0244d6c6184982ee434dc4da22cc7c6
Summary:
Issue fixed: #773
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/776
Differential Revision: D5129343
Pulled By: rnystrom
fbshipit-source-id: 127126545f246e5431636642f203c8150b6a547b
Summary:
Issue fixed: #763
- [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.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/794
Differential Revision: D5129406
Pulled By: rnystrom
fbshipit-source-id: dcca533130e99d5960781c5c3336a6fdbd399505
Summary:
Issue fixed: #774
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/787
Differential Revision: D5129345
Pulled By: rnystrom
fbshipit-source-id: 2673191f566a189a1374bfcff8a6639e1cb1fa29
Summary:
This reverts commit cc039179502b8992da38bfdd984389ace5ebd294.
Issue fixed: #772
- [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/788
Differential Revision: D5129335
Pulled By: rnystrom
fbshipit-source-id: 87efbd13b4ba7132f50d6a4de0430190172fd30c
Summary:
Issue fixed: #744
Pretty much same as Swiftlint's check just inverted and made for jazzy!
Closes https://github.com/Instagram/IGListKit/pull/790
Differential Revision: D5129341
Pulled By: rnystrom
fbshipit-source-id: 4cc0f037aeefb216e5e1f82bcfc5da1c9a15caab
Summary:
When you want it to be possessive, it's just i-t-s, but when you want it to be a contraction, it's i-t-'-s.
Issue fixed: #764
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/781
Differential Revision: D5129333
Pulled By: rnystrom
fbshipit-source-id: c12e15c7403f888384119c78ef632044a054c5e6
Summary:
Issue fixed: #775
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/786
Differential Revision: D5129310
Pulled By: rnystrom
fbshipit-source-id: 5ba4f13b0546c2be1231964489e93d1c32e1c89d
Summary:
Issue fixed: #761
- [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/778
Differential Revision: D5129314
Pulled By: rnystrom
fbshipit-source-id: 3e0f3f9df908966d1e24f3827451a68ef72862f0
Summary:
Issue fixed: #754
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/756
Differential Revision: D5103956
Pulled By: rnystrom
fbshipit-source-id: 212f7b3b7d7a8616d774f787fcb2e7cecf72d0db
Summary:
Replaces #642, #681
Issue ref: #394
Changes from last PR:
- Deleted the shared SwiftLint folder, incl. all files (On the plus side, did this in the quest to get this PR in https://github.com/realm/SwiftLint/pull/1513)
- Changed the build script such that it runs the user's `HomeBrew` installation of SwiftLint instead of the local copy
Integrates SwiftLint into DangerBot.
You may want to append a ?w=1 to the end of the files-changed url to exclude whitespace-only changes.
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/741
Differential Revision: D5068134
Pulled By: jessesquires
fbshipit-source-id: 68d6a57e0072672e38eeb94908d00f26bbd68fbc
Summary:
~~Land after #661, #730 and D5031184~~
Rebuild the docs from script. Couple notes:
- Went from 100% to 99%, does that matter? Script output says
- > 99% documentation coverage with 2 undocumented symbols
- Looks like `NS_SWIFT_NAME` throws documentation for a loop on `IGListDiffOption` and `IGListExperiment`
- Swift names are different, will that be a problem?
Part of #707
Closes https://github.com/Instagram/IGListKit/pull/728
Differential Revision: D5050951
Pulled By: jessesquires
fbshipit-source-id: 19249c1d34e6f253b911965114fd4ae7458d2684
Summary:
Quick rename before releasing 3.0 to get this API in parity w/ `isFirstSection` and `isLastSection`. My b I should have caught this in review.
Closes#720
Reviewed By: jessesquires, amonshiz
Differential Revision: D5031184
fbshipit-source-id: 1cd7b00c8b32084fecd861e78808eea0d0056337
Summary:
Regen example projects w/ pod script file.
Part of #707
Reviewed By: jessesquires
Differential Revision: D5039135
fbshipit-source-id: d29bcf635aea59aa589bd90644fb1ece6279cc10
Summary:
This change will ensure that section controllers have the following properties reset to sensible default values when their owning list adapter is deallocated.
```
isFirstSection = NO
isLastSection = NO
sectionIndex = NSNotFound
```
Issue fixed: #709
- [X] All tests pass. Demo project builds and runs.
- [X] I added tests, an experiment, or detailed why my change isn't tested. (Existing test is updated to ensure this doesn't regress)
- [ ] 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/723
Reviewed By: rnystrom
Differential Revision: D5032445
Pulled By: jessesquires
fbshipit-source-id: 446a30f4206ce02d3ad89fcd9b4586587f396f58
Summary:
Issue fixed: #725
- [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)
Closes https://github.com/Instagram/IGListKit/pull/726
Differential Revision: D5032405
Pulled By: jessesquires
fbshipit-source-id: aeda891f09c6aec751daa672258c0b071ea75ae2
Summary:
Issue fixed: -
Seem to have referenced the issue instead of the fixing PR during #686.
Closes https://github.com/Instagram/IGListKit/pull/727
Differential Revision: D5032377
Pulled By: jessesquires
fbshipit-source-id: 76ae9b13e6912d8771f413c2f0f3c81e1df42304
Summary:
This adds `NS_SWIFT_NAME` annotations to all public API's to provide cleaner integration into Swift:
- Removes the need to prefix classes in Swift code, instead rely on Swift module name spacing
- Adds more argument labels to C function API's like `IGListDiff([], [], .equality)` => `ListDiff(oldArray: [], newArray: [], option: .equality)`
While this is a large API change it should be as easy as:
- Find and replace `(IGList)([^K])` to `List$2` in Xcode with a scope set to Swift
- Build and follow compiler's auto fix corrections for C API's or any missed renames
I have not updated the documentation to reflect this yet, I am totally willing to do so but before I sink that amount of time into it I wanted to see if the Instagram team is even open to this change!
- [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)
- [ ] I have updated the documentation
Closes https://github.com/Instagram/IGListKit/pull/593
Reviewed By: jessesquires
Differential Revision: D5028039
Pulled By: rnystrom
fbshipit-source-id: b473d874a1f9574e56b2ebaabd5b73d1b57d4bab
Summary:
When multiple `UICollectionView`s are reused among multiple `IGListAdapter`s (horizontal lists embedded in a bigger, vertical list), the mapping between the old view and adapter is not broken. When a new collection view is attached to the old adapter, an unrelated adapter->collection view reference will be erroneously broken.
The unit test in this diff fails on the second `XCTAssertEqual(adapter2.collectionView, collectionView1);` without this patch.
Issue fixed: #699
t15661237 internally
cc amonshiz since we were talking about this
- [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/721
Reviewed By: amonshiz
Differential Revision: D5026330
Pulled By: rnystrom
fbshipit-source-id: b2164a4ab39802f7fba870ceab6692b7b501b5c2
Summary:
Issue fixed: #
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/716
Reviewed By: rnystrom
Differential Revision: D5003529
Pulled By: jessesquires
fbshipit-source-id: e7a0bdcff962f94c33f24f27e1fc9c0a3ed8dbfb
Summary:
This pull request removes the `sectionForSectionController:` method from the `IGListCollectionContext` protocol so that the protocol is exclusively for presentation methods.
This should not add new functionality, but rather makes the index directly accessible on the section controllers themselves. This change makes sense because at no time will there be an update to the list that the list adapter is unaware of and so it will always be able to set and update any indexes for a section controller that has changed.
Issue fixed: #609
- [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/671
Reviewed By: jessesquires
Differential Revision: D4942159
Pulled By: amonshiz
fbshipit-source-id: d648cfdd381cbf1d9ee7ff549ae27d2972a84622
Summary:
These tests are timing out all the time. ☠️
Issue fixed: #683
Closes https://github.com/Instagram/IGListKit/pull/688
Differential Revision: D4965525
Pulled By: rnystrom
fbshipit-source-id: ea122e66379646c557d1b8f1c7325894620b88fb
Summary:
In 073fc073e0 we deduped delete calls, but since we convert reloads into delete+insert when only deduping deletes, we end up with unbalanced delete+insert calls.
Unit test added reproduced a crash we see internally. Fix passes the test.
Not adding a changelog entry since this is a new regression fixed between releases. #trivial
Issue fixed: t17539856
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
Closes https://github.com/Instagram/IGListKit/pull/687
Differential Revision: D4933545
Pulled By: rnystrom
fbshipit-source-id: d38a900a99b1aa796dd654ddedb42e3cb4ef4378
Summary:
Got a little time on the plane to mess around with this idea. Very much want comments on this! Some questions:
- We should probably compile out parts of this using `#if DEBUG`.
- Should I compile out all of the description methods?
- Maybe I wrap the entire debug files w/ `#if DEBUG ... #endif` so none of it is loaded?
- ryanolsonk I used [FLEX](https://github.com/Flipboard/FLEX/blob/master/Classes/Utility/FLEXHeapEnumerator.m) for searching the heap, lmk if you see any problems w/ this
- Its lifted w/ only a few changes for my specific needs (including comments 😂)
- Chalk us up for using [another bit](https://github.com/Instagram/IGListKit/blob/master/Source/Internal/IGListAdapterProxy.m#L77-L82) of your code
- Added a basic test so that the basics of this work and coverage doesn't tank
- Anything else I should test?
- Is there more data we should be dumping?
- I have to track batch update state on the updater in order to dump it. If this seems dan
Closes https://github.com/Instagram/IGListKit/pull/617
Reviewed By: jessesquires
Differential Revision: D4929426
Pulled By: rnystrom
fbshipit-source-id: fcba0d6f0b7766485440f208cf70ad39dfc7a42e
Summary:
Issue fixed: #414
- [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)
What should we do with testing? I changed all the occurrences of the old initializer with the new one, so I think this is good to go?
Closes https://github.com/Instagram/IGListKit/pull/686
Differential Revision: D4931986
Pulled By: jessesquires
fbshipit-source-id: d6f0ac6578c11f8ef37ec0e385bc110e3abd7c91
Summary:
Fixed situation when cells with small height don't intersect with the _Rect_ and stop the enumeration that cause empty spaces in _collectionView_.
Issue fixed: # [680](https://github.com/Instagram/IGListKit/issues/680)
- [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/684
Differential Revision: D4929315
Pulled By: rnystrom
fbshipit-source-id: 4437df21772697a9a6421d213f4fed7b8470371b
Summary:
Making it simpler to setup tests w/ default config and objects. Less LoC in tests, lower setup cost when creating new test suites.
Should I changelog?
Issue fixed: #183
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
Closes https://github.com/Instagram/IGListKit/pull/678
Differential Revision: D4921633
Pulled By: rnystrom
fbshipit-source-id: fb4d08acb6ed0ba885cf56ce147f70b304301ff1
Summary:
a415ef5552 exposed a bug in `UICollectionView` where its state gets corrupted when deleting the same index path more than once in a single batch update block. This resulted crashes like
```
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x4)
Closes https://github.com/Instagram/IGListKit/pull/657
Reviewed By: jessesquires
Differential Revision: D4913790
Pulled By: rnystrom
fbshipit-source-id: 8f6fcdd2e2438da309fc64ca0ac111b9a0980149
Summary:
Simple find and replace for `waitForExpectationsWithTimeout:15` and `waitForExpectationsWithTimeout:16`
Issue fixed: #669
- [ ] 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)
Closes https://github.com/Instagram/IGListKit/pull/670
Differential Revision: D4915711
Pulled By: rnystrom
fbshipit-source-id: 7afd990cd5d18844ec1da08c5335f7138feb0b87
Summary: Adding and implementing an example of a new section controller that can be configured with a type. This section controller automatically stores its object in `didUpdateToObject:`, and implementations can trust the type-safety of the object!
Reviewed By: jessesquires
Differential Revision: D4914179
fbshipit-source-id: 39e2dce8ca29a1c0c92dc78eb8c25a7ab0a21978
Summary: There's a small crash showing up when requesting an index path that doesn't exist. It's totally valid that this could be requested from a product and not the infra. Should fail gracefully.
Differential Revision: D4911349
fbshipit-source-id: eee8891cf9400b3c3cd5539e839296f393f82354