Summary:
Rename *ItemController unit tests to *SectionController, addressing issue #126
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/129
Differential Revision: D4095496
Pulled By: rnystrom
fbshipit-source-id: 277be38ed2789f14199cee9d711a838552921f10
Summary:
This commit changes some assertion texts. No behavior is changed; no assertions are added (just reworded). Some of them were short or contained no real meaningful informations, where the error probably is.
Ref: #113
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/122
Differential Revision: D4090470
Pulled By: rnystrom
fbshipit-source-id: 96f492a1efd258ec3424ce334802229fdbdee191
Summary: Not sure why the build badge is green. Also need to get this to block landing internally.
Reviewed By: jessesquires
Differential Revision: D4084875
fbshipit-source-id: 67603f7db379f7311dc9c99d77c2e7ce08aff9b1
Summary: Adding an example of how to use diffing by itself w/ `UITableView` batch updates.
Reviewed By: jessesquires
Differential Revision: D4077768
fbshipit-source-id: 313193cdcadd337e08f74e90713fa127a5365112
Summary:
Replacing the move+update API with a batch-updates-safe API on the diff results object. This makes using the diff results w/out the rest of IGListKit infra much easier when working with `UITableView` or `UICollectionView`.
- Added unit tests
- Removed outdated unit tests
Reviewed By: dshahidehpour
Differential Revision: D4065798
fbshipit-source-id: 30da8a7b483d56d5acc497da9320dc07a6d0b7ad
Summary: Following up w/ a logo and renaming the bundle for the sample app.
Reviewed By: jessesquires
Differential Revision: D4077812
fbshipit-source-id: 186b7831f457b4cd990c0a1fff9eb5c554f8f3e5
Summary:
A few minor tweaks to clarify things
Closes https://github.com/Instagram/IGListKit/pull/120
Differential Revision: D4074874
Pulled By: rnystrom
fbshipit-source-id: 6f3318044dc3efeb5676d913fe916b26f567ae7c
Summary:
- Fixes#105
- ~~Added a 'SpinnerSectionController' allowing us to trigger the activity spinner each time~~
- Changed the words array to be numbers instead (I found it personally difficult to realise if more cells were actually added as the text didn't seem to change, by using numbers you can quite clearly see it increment by 5 each time you load more)
- No changes/new tests as it is a fix to an example
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/109
Differential Revision: D4066700
Pulled By: rnystrom
fbshipit-source-id: 7779a8ba39361cfa2e782db9460e693e90f1a478
Summary:
In this PR, we updated example code to make it more Swifty by removing `CGRect` for using `.zero` only.
- [x] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/111
Differential Revision: D4065463
Pulled By: rnystrom
fbshipit-source-id: 089258466e320c58afc9d547f78a481ce9458e49
Summary:
- This runs the static analyzer as part of CI.
- Fixes#52
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/107
Differential Revision: D4065443
Pulled By: rnystrom
fbshipit-source-id: b9b79831ab3ac756706d002c29e9cd4e3365ab80
Summary:
Uses Set instead of Array for uniqueness.
- [x] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/101
Differential Revision: D4057235
Pulled By: rnystrom
fbshipit-source-id: e284d2244d32e83ff0df56473dfa3d8b602ef95b
Summary:
Using more suitable type cast.
Using guard statement.
- [x] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/98
Differential Revision: D4056145
Pulled By: rnystrom
fbshipit-source-id: 537fccc781747f835155bfe8ccac45a1e8cdb037
Summary:
Temporary fix for the doc generation bug. Works now by simply running `$ ./build_docs.sh`.
cc jessesquires that this fix is good for now
Fixes#55
Jazzy bug at realm/jazzy#667
Closes https://github.com/Instagram/IGListKit/pull/93
Differential Revision: D4051337
Pulled By: jessesquires
fbshipit-source-id: 2ad1c45df55ca61ef9a243d0ad33af20b8349f96
Summary:
Adding a working range example to the example app. This example:
- Displays a list of images downloaded from unsplash.it
- Create 20 uniquely-random sized objects
- When section controllers enter the range, create a data task to download the image
- When finished, store image in `downloadedImage`
- Set in cell if cell is visible
- Don't create task if already downloaded or task created
- Cancel task when section controller is destroyed
- Show a spinner cell while downloading the image
Fixes#84
- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/89
Differential Revision: D4050210
Pulled By: rnystrom
fbshipit-source-id: 628a777fa819dccd9d9f4f58646cdf72fb4bc65c
Summary:
The scroll delegate got lost in migrating scroll events to their own delegates and broke the sample app. It looks like there's an actual UIKit bug in iOS 10 though. Fixes#87
- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/88
Differential Revision: D4050213
Pulled By: rnystrom
fbshipit-source-id: 61b29489f28002ad61193df237889b0bb8d34a29
Summary:
Docs were out of sync. Working range used to be an attempt to use a range outside the visible bounds, but that's not the case anymore. Instead it is just a number of section controllers beyond the visible range (much simpler). Updated the docs and graphic to reflect this.
Fixes#84
Reviewed By: dshahidehpour
Differential Revision: D4043045
fbshipit-source-id: bc4ae7a5a822626ffda30ff5ac7a3782a3816027
Summary:
We're still having travis issues. In other projects, I have issues with iOS 8 timeouts, but nothing else that we've seen here (`pod lint` problems, iOS 9 and 10 timeouts).
Theory: the *simulator* is the problem?
Using `iPhone 6/s` seems to be passing consistently. (like [here](https://travis-ci.org/Instagram/IGListKit/builds/167933436)). So let's try always using this sim.
Closes https://github.com/Instagram/IGListKit/pull/72
Differential Revision: D4044243
Pulled By: jessesquires
fbshipit-source-id: 74921a97a056b713f1872b455609ef6df27a0690
Summary:
Using array initialisation instead of for loop.
- [X] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/81
Differential Revision: D4030872
Pulled By: jessesquires
fbshipit-source-id: f61114d60bacfcb7a3722a6727aa0060a68ae35d
Summary:
Changes 'if let _ = object as?' for 'if object is'
- [x] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/83
Differential Revision: D4034281
Pulled By: jessesquires
fbshipit-source-id: f63e853b080ee63595ae5a808f4a2177c4615798
Summary:
Makes objects function more swifty.
- [x ] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/74
Reviewed By: dshahidehpour
Differential Revision: D4030906
Pulled By: jessesquires
fbshipit-source-id: 9a986fd4b470da0a33fadfd71f41f86b324df5be
Summary:
Using switch with is cases instead of if with multiple as?.
- [x] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/82
Reviewed By: dshahidehpour
Differential Revision: D4030890
Pulled By: jessesquires
fbshipit-source-id: fc17795620509572ed1d9fa6ef405357acab9a9b
Summary:
IGTestNibCell.xib was in the wrong bundle after imported internally (moved it to `Assets` dir)
- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/78
Reviewed By: ryanolsonk
Differential Revision: D4028444
Pulled By: rnystrom
fbshipit-source-id: cb7ed0f8024ca9fd116827f3935f075c1d9193be
Summary:
Fixes compilation errors in example app.
- [x] All tests pass. Demo project builds and runs.
- [ ] 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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/71
Differential Revision: D4027054
Pulled By: rnystrom
fbshipit-source-id: 50020d309e8cf69dabaa1958d9f1eed37dc6ee63
Summary:
I started working on adding support for dequeuing cells created from nibs (issue #1). Additionally I extended `IGListSingleSectionController` so that it can be used with nibs too. I don't know if you had this also in mind.
- [x] I'm currently thinking about the best way to test these changes.
- [x] I was not able to update the documentation (issue #55).
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/56
Reviewed By: dshahidehpour
Differential Revision: D4023746
Pulled By: rnystrom
fbshipit-source-id: 6a8b4cfb4dba38ea6e9870a9a4506288ee155cfe
Summary:
Simplifies block ridding of one if-else branch met only once.
Solves issue #68.
- [*] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [*] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/69
Reviewed By: jessesquires
Differential Revision: D4021608
Pulled By: rnystrom
fbshipit-source-id: 21cfca8578398c819a68aa3a118d27d58bb580b3
Summary:
Only README.md was changed. Fixed the typo in example code for connecting data source (replace opening parenthesis with whitespace).
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/64
Reviewed By: jessesquires
Differential Revision: D4012595
Pulled By: rnystrom
fbshipit-source-id: f27774e20c7a2ec3154cacbf919fd295625bace4
Summary:
- Travis appears to be using CocoaPods 1.1.0.beta.2, which is missing some fixes for Xcode 8 (see [sample failing build](https://travis-ci.org/Instagram/IGListKit/jobs/166935850) from #51).
- This change will ensure that a consistent CocoaPods version is used by Travis
- In the added Gemfile, I picked the latest CocoaPods 1.1.0 RC (matches version in Podfile.lock) and the latest xcpretty.
- Changed `pod spec lint` to `pod lib lint` to verify local files instead of files from the version specified in the spec.
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/57
Differential Revision: D4019655
Pulled By: rnystrom
fbshipit-source-id: 422e55c44dfdf276b587ea6e12ae30218a237ff5
Summary: Product needs show that section controllers need some sort of awarenes when they are the first/last section in a list (e.g. for cell borders). Adding this simple API, non-breaking.
Reviewed By: jessesquires
Differential Revision: D4016023
fbshipit-source-id: c75f9298fc73875a1cabad191fe2db6cb9ee4376
Summary:
Fixed#63. I used the style we use in CocoaPods, but I'm happy to adjust!
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/67
Reviewed By: jessesquires
Differential Revision: D4015999
Pulled By: rnystrom
fbshipit-source-id: bbe8055f22e84c5bdc628b4c1d95dab111774e12
Summary:
- I ran the static analyzer, and it found a case in `performUpdatesAnimated:completion:` where it looks like we meant to bail out early if the `collectionView` or `dataSource` is nil, but it only does so if `completion` is provided.
- Fixed a spelling error in nearby documentation
- [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/CONTRIBUTING.md)
- There is one other analyzer warning, but it seems to be making an incorrect assumption. In any case, it's not something I can fix quickly (requires more time spent staring at IGListDiff.mm).
- A ticket should be opened to add static analysis to .travis.yml. I'lll do this soonish, unless someone beats me to it!
- I could add a test for this, but this project is annotated well enough with null
Closes https://github.com/Instagram/IGListKit/pull/51
Reviewed By: ocrickard
Differential Revision: D4008605
Pulled By: rnystrom
fbshipit-source-id: c2b7516cb8c1fc619aa63d1e9b0c26f2918cd8a1
Summary:
I was exploring the example project when I noticed that two Twitter handles were wrong.
This will probably be the most useless PR ever in `IGListKit`, but it's good that you guys get the correct acknowledgment for your hard work! 🤓
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/54
Reviewed By: ryanolsonk
Differential Revision: D4008615
Pulled By: rnystrom
fbshipit-source-id: 904892d40fed73045e724cc87dddf641af02e27d
Summary:
Updated README example for naming consistency
- [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/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/58
Reviewed By: ryanolsonk, ocrickard
Differential Revision: D4008590
Pulled By: rnystrom
fbshipit-source-id: 74412ca77054cd6a15c0783b95f5d7a87eaf4c96
Summary:
Replaced the two methods for generating a reusable identifier with an inline C function (as per #40) which has 3 parameters: `viewClass` (unchanged), `nibName` (for when #1 is added), and `kind`. The string is generated following the same pattern as before.
A few things:
- The current test only tests one of the options. May want to add more tests for each.
- Not sure if you guys prefer `NS_INLINE` vs `static inline`.
- Not sure if we want to add assertions for empty strings for nibName/kind parameters.
- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/49
Differential Revision: D4005549
Pulled By: jessesquires
fbshipit-source-id: e1683ebe8882d1a8de934c8166f67d3508cffba9