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
Summary:
This reduces the quantity of the code within IGListAdapter.m and is a bit more in line with Swift style of putting protocol conformance into extensions.
This does not change functionality just rearranges where code lives.
- [X] All tests pass. Demo project builds and runs.
- [X] I added tests, an experiment, or detailed why my change isn't tested.
- [N/A] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [N/A] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/599
Reviewed By: jessesquires
Differential Revision: D4861777
Pulled By: amonshiz
fbshipit-source-id: eaa31aa9438f3892193aeb8b4ae580ba2960ee8b
Summary:
Issue fixed: #655
- [x] 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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
I've also addressed a few cases where there was no empty line between the `param`s and `return`.
Closes https://github.com/Instagram/IGListKit/pull/665
Differential Revision: D4906215
Pulled By: jessesquires
fbshipit-source-id: 5693c85eb548644b0b0e2571eea8ff4d9f706b12
Summary:
Issue fixed: --
- [x] 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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/666
Differential Revision: D4906205
Pulled By: jessesquires
fbshipit-source-id: b24e187dcc16fda2305804add4129da60197e86c
Summary:
Not sure what was expected for a "designated initialiser" feel free to school me and I'll do it!
(Also just had to google difference between + and - in ObjC)
Issue fixed: #654, #652
Closes https://github.com/Instagram/IGListKit/pull/662
Differential Revision: D4900092
Pulled By: jessesquires
fbshipit-source-id: 7858065ecc88a9ad7cb064811f0180d0f84f174d
Summary:
Been compiling a list of more questions, adding them to the FAQ. Note that this includes some 3.0-only stuff.
Closes https://github.com/Instagram/IGListKit/pull/660
Differential Revision: D4899942
Pulled By: jessesquires
fbshipit-source-id: c19b2f226285ab9e2734a677ccacd98d33755cbc
Summary:
Collection view layout has "user defined runtime attributes" which were left over from the old IG grid layout. I've removed them as we don't use them any more.
Also I couldn't build the project because of the map function in the dependency injection example, so changed that slightly to make it run (tested that and still works)
Issue fixed: #656
Closes https://github.com/Instagram/IGListKit/pull/658
Differential Revision: D4899250
Pulled By: jessesquires
fbshipit-source-id: 04f15399732ce07c6026d07801e228de5d5e47ab
Summary:
Travis is complaining about dead links, so this fixes the one in changelog but there's still a broken link in guides to the core data guide which isn't published yet (via Jazzy).
Should we regen docs but reset everything which isn't the guides? Or are we happy to just leave that one until we release 3.0?
Closes https://github.com/Instagram/IGListKit/pull/649
Differential Revision: D4898644
Pulled By: jessesquires
fbshipit-source-id: d1524ef521931471409021ceb23bea7853628294
Summary:
I updated IGListKit with RxSwift section in the guide. related to #619
Closes https://github.com/Instagram/IGListKit/pull/648
Differential Revision: D4898650
Pulled By: jessesquires
fbshipit-source-id: 7c3a6913003efe5595155da5c8ca9ba640d1c5cc
Summary:
Issue fixed: #567
- [ ] 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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/639
Differential Revision: D4878842
Pulled By: jessesquires
fbshipit-source-id: 664648cf4f5e28d0a6af308e30151cb66863962c
Summary:
Original comment:
If you insert or delete into the same index twice **and** update your data source to reflect those changes, we will squash the insert/delete into a single update because we're using `NSSet` internally.
This becomes very apparent when multiple updates are coalesced.
Issue fixed: #483
- [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/634
Differential Revision: D4860479
Pulled By: jessesquires
fbshipit-source-id: 3aa271d90fca21b11201f62cefa8d7fbcef6930f
Summary:
Issue fixed: #618
- [ ] 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.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/637
Differential Revision: D4869624
Pulled By: jessesquires
fbshipit-source-id: a9d5623dbb7a032691f3af5a2abf61adc3a42cd0
Summary:
I saw some `!` in the Swift example that we can remove 🙂
Same as I mentioned in my last PR, the iOS examples project can't be opened on my machine, but I believe I updated the examples to be compatible.
Closes https://github.com/Instagram/IGListKit/pull/626
Differential Revision: D4860165
Pulled By: jessesquires
fbshipit-source-id: 74bcac8fc759da8105e658901c3df9e71afc609f
Summary:
A section added called Examples in the README file
Closes https://github.com/Instagram/IGListKit/pull/628
Differential Revision: D4860149
Pulled By: jessesquires
fbshipit-source-id: c3bad98a827f020b98bf81ada8d678ae8c697329