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:
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:
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:
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:
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:
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: #
- [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/605
Differential Revision: D4817720
Pulled By: rnystrom
fbshipit-source-id: a6d2cda39ede7bf4b44c2fefe6675339f467f2ae
Summary:
Take 2. Remove `IGListCollectionView` per #409. Use plain old `UICollectionView`.
(This re-applies D4640425 and updates as needed.)
Also:
- run `pod update` everywhere
- update changelog
Reviewed By: paulvanderspek
Differential Revision: D4812207
fbshipit-source-id: 1ddbae06cdeddb43d8af175d3e8a045a36ff150e
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:
If a negative height/width comes down, cap it to `0.0`.
Issue fixed: #566
Also fixes t16455632 internally.
- [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/583
Differential Revision: D4797520
Pulled By: jessesquires
fbshipit-source-id: 3eeec5244a445bb451460286b4f006ca0d9c67d1
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:
[IGListCollectionViewLayout]: handle float number fraction part for layout.
When width of item is a float number with non-zero fraction part.
After integer scaled, it might add up smaller or bigger than maxWidth.
Ex with 6 items with 13 padding on each side
1. iPhone 7, maxWidth = 349, scaledItemWidth = 58 -> 58 * 6 = 348, which is smaller than 349
-> this can cause issue where is extra one line at end
2. iPone 7 plus, maxWidth = 388, scaledItemWidth = 64.6667 -> 64.6667 * 6 = 388.0002, which is bigger than 388
-> this can cause issue where last item is mistakenly shifted to next row
To fix it, add epsilon = 1 to allow some error range
Also add stretchToEdge BOOL flag to handle case 1 to decide whether to strech the width of last item.
Reviewed By: ryanolsonk, jessesquires
Differential Revision: D4720156
fbshipit-source-id: 765f6b13b7d601394d65788c30ae69ac1b37c3f2
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:
Started work on the plane to get this moving since #418 is up and ready to land. We'll likely need to spend some time fleshing out the API of this, and I think I'll split it up into a couple different PRs once ready for review. Putting this up now to get early feedback.
This adds an auto-diffing section controller as outlined in #38. There are several key parts:
- Subclass a new section controller `IGListAutoSectionController` (naming wip)
- Connect a data source
- Implement the data source methods that do 3 things:
- Given a top-level object, transform it into an array of **diffable** view models
- Given a view model, return a cell
- Given a view model, return a size for a cell
- A new protocol for the cell `IGListBindable` so that we can control when the cell is updated w/ the view model.
- The most important part of this is that it unlocks moving and reloading a cell, which you can't do w/ `UICollectionView`
- [ ] Unit test `reloadObjects:`
- [x] Add
Closes https://github.com/Instagram/IGListKit/pull/494
Reviewed By: amonshiz
Differential Revision: D4696966
Pulled By: rnystrom
fbshipit-source-id: f21b8341b3ed4389f2a4a106d0d316f481ba6943
Summary: [IGListCollectionViewLayout]: fix a bug which caused double inset being applied when having non-zero left contentInset.
Reviewed By: jessesquires
Differential Revision: D4692870
fbshipit-source-id: 1a1a3ccf944a83fea3a706b83f54293346b35c5a
Summary:
Batch updates are complicated b/c its unknown when the update block will actually execute. When executing the block, we want to collect inserts/deletes/reloads/moves (item and section). Allow mutations to happen synchronously outside of the update block.
Tracking state will also help with the auto-diff where we need to allow re-entrant updates.
Peeling off a chunk from #494
Issue fixed: #288
- [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/525
Reviewed By: jessesquires
Differential Revision: D4656463
Pulled By: rnystrom
fbshipit-source-id: 8f4d3dc21b03d595e02ee9ee9664277e8ead0531
Summary:
Fixes internally reported issue where the layout was new lining a section that had proper width math. Also, when inset sections were all on the same line, the max height added inset for each section, causing the newline to be too low.
- [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/522
Reviewed By: jessesquires
Differential Revision: D4655554
Pulled By: rnystrom
fbshipit-source-id: 5e759451e285ccd636ed59dcee0777ce590797ad
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:
This becomes an issue pretty easily in embedded `IGListAdapter` environments (lists in lists). IGListKit creates a single `IGListSectionController` instance per object, but cells are reused within `IGListCollectionView`. If you assign `adapter.collectionView = cell.collectionView` (like we recommend in our [example](https://github.com/Instagram/IGListKit/blob/master/Examples/Examples-iOS/IGListKitExamples/SectionControllers/HorizontalSectionController.swift#L40)), then you can have many adapters with a weak ref to the **same collection view**.
Obviously when updates happen across all embedded lists, adapters could potentially update the same collection view and apply a corrupted batch update.
I proposed using `<objc/runtime.h>` and using associated objects, but since `OBJC_ASSOCIATION_ASSIGN` is not zerod-on-release reference (its just `unsafe_unretained`) I'd have to make a weak wrapped object, which is overkill.
Instead I think a global weak:weak map is fine. We d
Closes https://github.com/Instagram/IGListKit/pull/517
Differential Revision: D4623300
Pulled By: rnystrom
fbshipit-source-id: 53d2dd158923c431e793b0c8e28997e9bbf55b8b
Summary:
Adding a new layout-invalidation API, telling the layout object to query and rebuild the layout for all items in the section controller. This works with `UICollectionViewFlowLayout` and should work with other custom layouts (including our own).
Issue fixed: #360, #459
- [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/499
Reviewed By: jessesquires
Differential Revision: D4590274
Pulled By: rnystrom
fbshipit-source-id: f87235be4e6c024bf979b831a8938be68895e011
Summary:
- Rename "withCollectionView:" param to "collectionView:" param to be consistent with the rest
of the protocol.
- Update tests.
Related issue: #466
- [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/491
Differential Revision: D4589976
Pulled By: rnystrom
fbshipit-source-id: 5e5aa7328a6bbac6baa705d5228f0eb4321d8c31
Summary:
Removing the assert and handling `nil` section controllers. This wont effect Swift code which demands a non-optional section controller, but Objective-C is more nuanced. There is evidence that some callers do not have a default state and are returning `nil`.
Unfortunately this will [OOB here](https://github.com/Instagram/IGListKit/blob/master/Source/Internal/IGListSectionMap.m#L63) if using the original `objects` array provided by the data source. Instead we prune the array, only allowing in objects that have a matching section controller.
Fixes t15773862 internally.
- [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/488
Reviewed By: dshahidehpour
Differential Revision: D4553886
Pulled By: rnystrom
fbshipit-source-id: a473a99b5eb513e4b610019dba0394a014193fc4
Summary:
Follow from #450, this layout has been replaced. You served us well!
- [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/482
Differential Revision: D4553897
Pulled By: rnystrom
fbshipit-source-id: caccb386ba8914fbbf5e81d997524efb78c6e4ea
Summary:
This was a little bit of an invasive change with the display handler, but I think that this is the right call. When sending display events for objects, we should account for the supplementary view as part of the section controller. This is especially useful for headers and footers.
Note that this wont effect the working range API at all.
Fixes#300
Closes https://github.com/Instagram/IGListKit/pull/470
Differential Revision: D4551338
Pulled By: rnystrom
fbshipit-source-id: dda6fbf18bcfc2c941d80ee2314a543d1ab83843
Summary: This diff isn't correct, and the Instagram cut happens today. Pulling back so I have time to test the correct change more throughly.
Reviewed By: rnystrom
Differential Revision: D4550149
fbshipit-source-id: 2e882caeb9ef999b7fd57562740b352ea8edfa5f
Summary:
Working on porting our collection view layout to IGListKit. I'm doing this because its a solid layout, and we just finished preparing it to work with inline sections. It is designed to work in tandem with IGListKit, so we're adding it.
This is still a WIP as I add more tests, but I'd love as much feedback as possible.
Aside from the glob of header documentation, this has the following features:
- Infinite sections that each have infinite items. Sections and items can fall inline. When they break the width of their container they will fall on the next row.
- Sections can have their own insets, line spacing, and interitem spacing.
- Sticky header support! When you use headers, it will always newline the section.
- Maximum width with a border decoration view
- Use this to pinch in your content on larger devices
Followup to #423
- [ ] ~~Move decoration view support to delegate~~ removed
- [x] Unit test changing [top y sticky inset](https://coveralls.io/builds/9977284/source?filen
Closes https://github.com/Instagram/IGListKit/pull/484
Differential Revision: D4547760
Pulled By: rnystrom
fbshipit-source-id: 879e2da16eb78bb6a90967e77d9ad0bbf7c69594
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:
Working on porting our collection view layout to IGListKit. I'm doing this because its a solid layout, and we just finished preparing it to work with inline sections. It is designed to work in tandem with IGListKit, so we're adding it.
This is still a WIP as I add more tests, but I'd love as much feedback as possible.
Aside from the glob of header documentation, this has the following features:
- Infinite sections that each have infinite items. Sections and items can fall inline. When they break the width of their container they will fall on the next row.
- Sections can have their own insets, line spacing, and interitem spacing.
- Sticky header support! When you use headers, it will always newline the section.
- Maximum width with a border decoration view
- Use this to pinch in your content on larger devices
Followup to #423
- [ ] ~~Move decoration view support to delegate~~ removed
- [x] Unit test changing [top y sticky inset](https://coveralls.io/builds/9977284/source?filen
Closes https://github.com/Instagram/IGListKit/pull/450
Reviewed By: jessesquires
Differential Revision: D4521797
Pulled By: rnystrom
fbshipit-source-id: 20b36ae573d38ca3125a6f3d5faec181c290ab94
Summary:
Before the diff, you can lookup the object for a given section, and then lookup the section controller for that object, but this seems like a pretty valuable/common operation.
Closes https://github.com/Instagram/IGListKit/pull/477
Differential Revision: D4537479
Pulled By: rnystrom
fbshipit-source-id: ad47a243f0bb0fc72a362863dff2f00b0b640fab
Summary:
1. The "Empty View" and CV background view are different things. People can now differentiate.
2. The Empty View isn't created until it is needed.
3. The Empty View moves with Refresh Controls.

- [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/462
Reviewed By: rnystrom
Differential Revision: D4502591
Pulled By: dshahidehpour
fbshipit-source-id: b72b444c1197c90c385c7414f0662299070a86d1
Summary:
- Added `-[IGListAdapter visibleCellsForObject:]` API
1. Get all visible cells
2. Get the section for the object
3. Filter cells where indexPath.section of cell is equal to the object
4. Return
- [x] All tests pass. Demo project builds and runs.
- [x] I added test(s), 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)
-------------
Purely additive, can go in 2.2.0 release? Hold off on changelog until agreed.
Wanting to learn some more ObjC so gave this a shot, would appreciate some nit picking/feedback
Closes#437
Closes https://github.com/Instagram/IGListKit/pull/442
Differential Revision: D4450259
Pulled By: jessesquires
fbshipit-source-id: 521583c669fc1160212a7c46a50d62d951cafa2e
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:
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:
- Updated selectionDelegate to pass through the model object
- Changelog entry under 3.0.0 as is breaking change
Try saying single section selection 10 times quick
Dabbing my left toe into some ObjC, so apologies if I violate years of rules
- [ ] Update documentation internally
Closes#396
- [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/397
Differential Revision: D4406213
Pulled By: rnystrom
fbshipit-source-id: ba468fa49e75823796a47da6ed7f0e8957db3d75
Summary:
Modified `IGListAdapter` to update the `hidden` status of the `emptyView` after any item-level changes (`insertInSectionController:atIndexes:` and related methods) based on whether the item count is zero.
Closes#378
- [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/395
Differential Revision: D4400155
Pulled By: jessesquires
fbshipit-source-id: 6c3422297d86947e7e2878ba1b9227ff2a2a18b4