Commit graph

488 commits

Author SHA1 Message Date
Jordan Morgan
c04fa2fcaa Add correct comment syntax for Remodel
Summary:
Using "//" causing a parsing issue with Remodel, whereas "#" appears to be the correct syntax. This pull simply updates the code sample using the correct syntax.

- [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/1169

Differential Revision: D8204551

Pulled By: rnystrom

fbshipit-source-id: 3c77bb943cf2b99e1c48f74f72560c56601c026d
2018-05-30 11:58:22 -07:00
Brandon Darin
290d592983 Clean listAdapterUpdater state if collectionView becomes nil during update
Summary:
If an `IGListAdapterUpdater` was unable to retrieve a collection view in `[IGListAdapterUpdater performBatchUpdatesWithCollectionViewBlock:]`, it would return early without cleaning state. This would sometimes cause future updates to crash, as this `IGListAdapterUpdater`'s state would now be out-of-sync.

This change also ensures that the `IGListAdapterUpdater`'s completion blocks run when `[IGListAdapterUpdater performBatchUpdatesWithCollectionViewBlock:]` and `[IGListAdapterUpdater performReloadDataWithCollectionViewBlock:]` return early due to having a nil `UICollectionView`.

Reviewed By: rnystrom

Differential Revision: D8056539

fbshipit-source-id: 1af7b675ec6805c2d8031f32d8a4c8e8929564e6
2018-05-23 15:06:17 -07:00
Adam Stern
b4c8ea180f give section controllers access to collection view scrolling traits
Summary:
I'd like to be able to access the current collection view scrolling traits inside section controllers. These are expressed as three properties from `UIScrollView`:

`isTracking`, `isDragging`, and `isDecelerating`.

My approach is to add a new struct `IGListCollectionScrollingTraits` with these three values, and expose this to section controllers through `IGListCollectionContext`.

Reviewed By: rnystrom

Differential Revision: D7986814

fbshipit-source-id: 19e9bd3b89545b10238dd060a5af8c5a0f39eb82
2018-05-14 14:56:54 -07:00
Ryan Nystrom
583efb936b Add experimental collectionView getter fix
Summary:
Adding a fix to the `IGListAdapterUpdater` that requests the `UICollectionView` to perform updates on until just-before we update. This way if the `UICollectionView` is changed between update-queue and execution (b/c updates are async), we guarantee the update is performed on the correct view.

See the accompanying unit test that fails w/out the fix enabled.

Differential Revision: D7889908

fbshipit-source-id: 7178677f34951a1e42986b0289fc4abc708d6946
2018-05-11 08:08:44 -07:00
Ryan Nystrom
cce5a462bb Update examples for 3.4
Summary:
See title
Closes https://github.com/Instagram/IGListKit/pull/1166

Differential Revision: D7860384

Pulled By: rnystrom

fbshipit-source-id: 3536f8434cb28591be23cb9456b5613f7a1a1a07
2018-05-03 10:29:18 -07:00
Ryan Nystrom
bccef16555 Regenerate docs for 3.4
Summary:
See title
Closes https://github.com/Instagram/IGListKit/pull/1164

Differential Revision: D7838218

Pulled By: rnystrom

fbshipit-source-id: f9e1aa63b5d3a846fc155bd010f6d17e27a1b1ab
2018-05-01 17:04:28 -07:00
Ryan Nystrom
5c33c88024 Update README and podspec with new license, bump version to 3.4
Summary:
See title
Closes https://github.com/Instagram/IGListKit/pull/1162

Differential Revision: D7836821

Pulled By: rnystrom

fbshipit-source-id: ebab8ec40a62ea467ae82546587bf49ae3a7d577
2018-05-01 16:10:19 -07:00
Ryan Nystrom
11d48a2a16 Upate CHANGELOG for 3.4 release
Summary:
See title
Closes https://github.com/Instagram/IGListKit/pull/1163

Differential Revision: D7836996

Pulled By: rnystrom

fbshipit-source-id: 1bdb91c6a319fef554f264e35b88372755b49ab8
2018-05-01 16:10:19 -07:00
Ryan Nystrom
000bc36919 Relicense to MIT
Summary: Relicensing IGListKit under MIT

Reviewed By: calimarkus

Differential Revision: D7764125

fbshipit-source-id: 6c773195ef3184202725fe7f08de754f979cb83f
2018-05-01 14:50:56 -07:00
Ryan Nystrom
3059c5e6f5 Add experiment to defer requesting objects from data source until just before diffing
Summary:
Inspired by recent performance investigations in Instagram, adding an experimental feature to defer requesting objects from the `IGListAdapterDataSource` until //just before// diffing is executed. If //n// updates are coalesced into one, this results in just a single request for objects from the data source.

This is a **breaking change** to the public API, but since writing custom `IGListUpdatingDelegate`s is discouraged, I'm less worried about saving this for a major version launch.

Reviewed By: manicakes

Differential Revision: D7744518

fbshipit-source-id: f0001263cddda383e3dedd1d350a83d2cfb8362a
2018-04-26 08:27:49 -07:00
Ryan Nystrom
c1894629d7 Generate docs for 3.3.0
Summary:
Ran `build_docs.sh` script for 3.3.0 release
Closes https://github.com/Instagram/IGListKit/pull/1154

Differential Revision: D7728775

Pulled By: rnystrom

fbshipit-source-id: 40a77e95387050a8d7c6bc4a629fdb06b7b0a7fa
2018-04-23 10:01:35 -07:00
Ryan Nystrom
6771b4146f Update examples for 3.3.0
Summary:
Ran examples pod scripts to update example projects.
Closes https://github.com/Instagram/IGListKit/pull/1152

Differential Revision: D7709652

Pulled By: rnystrom

fbshipit-source-id: 7a267fabbf6535d15e53d19d7211f6159e66a8f0
2018-04-20 11:18:50 -07:00
Ryan Nystrom
825b9924bd Update changelog tbds for 3.3.0
Summary:
Filling in some tbd's and capping 3.3.0 changes.
Closes https://github.com/Instagram/IGListKit/pull/1151

Differential Revision: D7691109

Pulled By: rnystrom

fbshipit-source-id: a38cfbe47504711bc494092d9d6b91a2333c093f
2018-04-19 14:06:20 -07:00
Ryan Nystrom
e0984202e7 Bump version to 3.3.0
Summary:
Updating the pod and project version to 3.3.0 in preparation for a new release.
Closes https://github.com/Instagram/IGListKit/pull/1150

Differential Revision: D7691115

Pulled By: rnystrom

fbshipit-source-id: 145bc0930eb4a04809f0f4a0e7fc2a326fbd366c
2018-04-19 14:06:20 -07:00
Chrisna Aing
f469c3440b Fix binding SC cell updates when the SC's section changes.
Summary:
Issue fixed: #1111

As discussed in the issue's comments, this seems to be the most expedient fix if we accept that `cellForItemAtIndex:` should be allowed within update blocks. I am not familiar enough with `IGListAdapter` to know whether this is the best solution but am willing to make any changes requested!

- [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/1144

Differential Revision: D7585125

Pulled By: rnystrom

fbshipit-source-id: 29a0e68da33bb4b94c2eb5e68844e537a7b05868
2018-04-11 08:00:40 -07:00
Ryan Nystrom
784f1beb9f Add experimental update coalescance feature and test
Summary:
Testing out new coalescence ideas after talking with @[100001606943892:tweilu]. Theory is that we can reduce stalls and improve scroll performance by batching more updates into one.

Need to test this out first.

Differential Revision: D7565003

fbshipit-source-id: b2e9fa39d52cc0b7aa59c2bfad709804ba0a0b63
2018-04-10 13:44:01 -07:00
Marcus Wu
e49c94b25d Show header when section item is empty
Summary:
Issue fixed: #1117

I adding a new constructor for making a `IGListCollectionViewLayout` instance that can always show sticky header although section data is empty.

It's working well and [this is demo project](https://github.com/marcuswu0814/IGListKit_ShowStickyHeaderWhenDataEmpty).

Bug I'm not sure is any good way to let this much more readability. Is there any good advice?

```objc
const CGRect headerBounds = (self.scrollDirection == UICollectionViewScrollDirectionVertical) ?
                CGRectMake(insets.left,
                        (itemCount == 0) ? CGRectGetMaxY(rollingSectionBounds) : CGRectGetMinY(rollingSectionBounds) - headerSize.height,
                        paddedLengthInFixedDirection,
                        headerSize.height) :
                CGRectMake((itemCount == 0) ? CGRectGetMaxX(rollingSectionBounds) : CGRectGetMinX(rollingSectionBounds) - headerSize.width,
                        insets.top,
                        headerSize.width,
                        paddedLengthInFixedDirection);
```

- [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/1129

Differential Revision: D7551628

Pulled By: rnystrom

fbshipit-source-id: a60b65a92efcea5175c86aaed1de02686ea6d20a
2018-04-09 08:37:18 -07:00
Sho Ikeda
9315299fbc Minimum fixes for Xcode 9.3 build errors
Summary:
Issue fixed: #1141

This is a set of minimum fixes for Xcode 9.3 rather than #1142. Much smaller diffs 😃

The changes here were done by Xcode's FixIt. See also https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW5.

> Platform Dependencies
>
> OS X uses several data types—NSInteger, NSUInteger,CGFloat, and CFIndex—to provide a consistent means of representing values in 32- and 64-bit environments. In a 32-bit environment, NSInteger and NSUInteger are defined as int and unsigned int, respectively. In 64-bit environments, NSInteger and NSUInteger are defined as long and unsigned long, respectively. To avoid the need to use different printf-style type specifiers depending on the platform, you can use the specifiers shown in Table 3. Note that in some cases you may have to cast the value.

- [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/1143

Differential Revision: D7551617

Pulled By: rnystrom

fbshipit-source-id: b27ebe2b1a1c93ebfd1218dc38b7621fefee2e6b
2018-04-09 08:37:18 -07:00
Cole Potrocky
9a45e166cb Updated IGListCollectionViewLayout to rely on layoutAttributesClass
Summary:
…instead of just allocating a vanilla UICollectionViewLayoutAttributes.    I'm happy to add tests here, but don't really have much of an opinion either way on whether this should have an explicit test case or not.

Issue fixed: #1134

- [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/1135

Differential Revision: D7551624

Pulled By: rnystrom

fbshipit-source-id: 930218c40b0082912454bb98bd02e7daa8257a3e
2018-04-09 07:45:56 -07:00
Zhisheng Huang
5c7a0318b5 Remove XCTAssertThrow in IGListAdapterTests
Summary:
= OSS: =

It's not a good testing strategy to check against the assert, it should be checking the real expected output for a function. It limits our usage that we have to use XCTAssertThrow if there is an assertion throws.

The problem is that `IGAssert` uses the `NSCAssert` which would throw an `NSInternalInconsistentException` which affects all the code path. Another follow up is to investigate how to make IGAssert not crashable.

 ---

Reviewed By: rnystrom

Differential Revision: D7481905

fbshipit-source-id: 24af37a6e1aa389317474614cdd214c9df537291
2018-04-03 17:19:14 -07:00
Brandon Kieft
01770eb303 Prefix all private methods with an underscore
Summary: Prefix all private methods with an underscore. A private method is defined as any method not exposed via an interface or protocol. This will improve the readability of the code and hopefully reduce bugs.

Reviewed By: rnystrom

Differential Revision: D7421346

fbshipit-source-id: 536472d57ea7fd8990fe50f3e950907ca57b8e6d
2018-04-02 15:08:21 -07:00
Jeremy Lawrence
f47753e361 Add dequeue method with reuse identifier
Summary: Added the ability to register/dequeue a cell with a customized reuse identifier. This will allow for registering the same cell class for multiple reuse identifiers, as will be needed for `IGListItemView` cells.

Reviewed By: rnystrom

Differential Revision: D7436575

fbshipit-source-id: d557836b5454c50611c5a5f9367f2f2e496c3878
2018-04-02 09:17:40 -07:00
Ryan Nystrom
df18195d18 Add deselect selector to proxy
Summary:
Issue fixed: #1105

- [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.

Unable to add tests w/out hacking `UITouch` events on a collection view. Open to suggestions.
Closes https://github.com/Instagram/IGListKit/pull/1108

Differential Revision: D7362200

Pulled By: rnystrom

fbshipit-source-id: fed640c2c017f0ade0cefff0b0d2118564dda3b0
2018-03-21 19:41:25 -07:00
Ryan Wang
afbfcbdf04 fixed Footer is sticky to the top
Summary:
if `stickyHeader` is true, the footer could be sticky to the top

Issue fixed: #1093

- [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/1094

Differential Revision: D7246636

Pulled By: rnystrom

fbshipit-source-id: 9b7da52ab46229606b530a378c01d799767e27f2
2018-03-12 15:51:50 -07:00
Kashish Goel
0f75e851a6 Fix mutating array datasource bug
Summary:
Copy objects when retrieving from datasource to account for the edge case where the returned data is a mutable array.

Issue fixed: #999

- [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/1109

Differential Revision: D7246645

Pulled By: rnystrom

fbshipit-source-id: d9b0c2ba07983bf46327d4ee1ba0eba2e194ba19
2018-03-12 15:51:50 -07:00
Markus Emrich
6fa9be5d9f Update remodel plugin to latest openSource changes
Summary: This ensures we stay compatible with the current open source state of remodel.

Reviewed By: ColinCampbell

Differential Revision: D7082447

fbshipit-source-id: 3fa23b903760d36029141b5adc441ae57ea5caab
2018-02-26 23:09:03 -08:00
Ryan Nystrom
c4789356d7 Remove copy from result objects
Summary: Found a ~15% perf improvement on just insert/delete by removing copy. Saw traces from retaining the `NSMapTable` in profile.

Reviewed By: manicakes

Differential Revision: D6982523

fbshipit-source-id: 28c1539e06ecf3fe580bcccfecfc4915d4309714
2018-02-13 17:08:55 -08:00
Ryan Nystrom
afd2d29eec Add diffing optimization when result is all deletes or inserts
Summary:
In an attempt to best other diffing libraries, I noticed that pure insert/delete diffing results would be almost 5x slower than changes between existing arrays. This is pretty much a benchmarking enhancement, but improves diffing performance by ~5x when the from-array or to-array is empty.

```
// OLD only inserts
avg: 0.007469, min: 0.006998, max: 0.016550, p50: 0.007254, p75: 0.007712, p90: 0.007899, p95: 0.008345, p99: 0.016550
// NEW
avg: 0.001392, min: 0.001256, max: 0.006772, p50: 0.001289, p75: 0.001348, p90: 0.001533, p95: 0.001614, p99: 0.006772
```

```
// OLD only deletes
avg: 0.005821, min: 0.005669, max: 0.006511, p50: 0.005766, p75: 0.005852, p90: 0.006030, p95: 0.006204, p99: 0.006511
// NEW
avg: 0.001184, min: 0.001096, max: 0.001673, p50: 0.001123, p75: 0.001212, p90: 0.001378, p95: 0.001467, p99: 0.001673
```

Note the average time improvements (seconds).

Benchmarking done on a 4s w/ this project:
https://pxl.cl/bLBB

Reviewed By: manicakes

Differential Revision: D6968683

fbshipit-source-id: 0d8e058f0aaa9ce756ca69326527d04504ac6429
2018-02-13 10:13:44 -08:00
Ryan Nystrom
43fe81dd9f Tell compiler not to retain in helper functions
Summary: Tiny, measurable perf gain by removing any retains on these params.

Reviewed By: manicakes

Differential Revision: D6968685

fbshipit-source-id: f0ef1ecac6367661d125ea85dc1c9989bf2e9659
2018-02-13 10:13:44 -08:00
Ryan Nystrom
383660a100 Move index collection to static C function
Summary: Should also just be a c function instead of a block. Much simpler design.

Reviewed By: manicakes

Differential Revision: D6968682

fbshipit-source-id: f3bac6c5e0f93deec46449eb7abcb42f5e4e6071
2018-02-13 10:13:44 -08:00
Ryan Nystrom
d3e49fd789 Move map builder to static C function
Summary: This is much simpler as a static function instead of a block. Also taking an object vs plucking from the array will lend itself to better performance and reusability later.

Reviewed By: manicakes

Differential Revision: D6968684

fbshipit-source-id: 6166473feb20937ce6a1337b4b99a5a240778f56
2018-02-13 10:13:41 -08:00
Jared Verdi
f15b167e85 Interactive Reordering
Summary:
I had a desire for interactive reordering in a personal project, so here's a first attempt at adding support in IGListKit.

I figured I might as well get a WIP PR up for comments before I continue further as there are a few aspects to interactive reordering that don't interplay perfectly with IGListKit.

As discussed in #291, I went after two prime use cases:
1. Moving items amongst a section
2. Rearranging whole sections

I also "disabled" moving items between sections by having those moves revert, to mimic interactive reordering cancellation as closely as possible.

You can see both in the Mixed Data example. Grid items can be moved within a section, while users can be moved to reorder whole sections. But trying to move a grid item out of a grid or a user item into a grid will auto-revert. The revert animation isn't as tight as it should be. It may be more desirable to disable the animation - though you lose the visual cue.

There is a also a new example, `ReorderableViewController`, that demonstrates 2 in its pure form (likely the most desired use case), where all sections are reorderable single rows.

Happy to take feedback -- this is my first experience working on IGListKit, so I would expect there to be gaps. (Ex. I haven't used `IGListStackedSectionController`, and its tests failed as I hadn't implemented reordering delegates for it. Those are simply stubbed out for now.)

Issue fixed: #291

- [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)

- [x] Proper support in `IGListStackedSectionController`
Closes https://github.com/Instagram/IGListKit/pull/976

Differential Revision: D6674493

Pulled By: rnystrom

fbshipit-source-id: cd53c5fdc6fb59636edc4747c4bbd0f81a4610e5
2018-02-12 09:27:08 -08:00
Markus Emrich
e02dd0e7ed Add IGListDiffable remodel plugin source + documentation (a new guide)
Summary:
Adds the source for a remodel plugin to autogenerate models conforming to `IGListDIffable`.

- [x] All tests pass. Demo project builds and runs. (source untouched, purely additive)
- [x] I added remodel plugin tests + and a new guide explaining the installation + usage
- [ ] 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/1083

Reviewed By: rnystrom

Differential Revision: D6937925

Pulled By: calimarkus

fbshipit-source-id: 54228cddf387cf20ceceec1732e439ab6fd4b984
2018-02-09 10:18:18 -08:00
Ryan Nystrom
7414685358 Prep changelog for 3.3.0
Summary: Closes https://github.com/Instagram/IGListKit/pull/1091

Differential Revision: D6927178

Pulled By: rnystrom

fbshipit-source-id: 7007f7dcc1ca9cb042d25c829588f27f3d94b49d
2018-02-07 12:33:22 -08:00
Ryan Nystrom
663b606c58 Readme reflects min macOS requirement of 10.11
Summary: Closes https://github.com/Instagram/IGListKit/pull/1089

Differential Revision: D6918813

Pulled By: rnystrom

fbshipit-source-id: 13586a4ce3515538f6ef8f8ccebd58900d1fc306
2018-02-06 16:45:21 -08:00
Ryan Nystrom
f536e2136d Generate 3.2 docs
Summary:
Does this need to wait for #1086?
Closes https://github.com/Instagram/IGListKit/pull/1085

Differential Revision: D6917735

Pulled By: rnystrom

fbshipit-source-id: 08165c8d9f1215abac1d4bc7c65c1d23e31f758a
2018-02-06 15:47:20 -08:00
Ryan Nystrom
33807fb1c6 Remove change for feature that isnt shipping
Summary:
Will be removing this experiment, don't include it in the 3.2 release notes.
Closes https://github.com/Instagram/IGListKit/pull/1086

Differential Revision: D6917740

Pulled By: rnystrom

fbshipit-source-id: 5ce4eb8a5bfc5f1450462123a1aa4689f8f00e41
2018-02-06 15:47:20 -08:00
Ryan Nystrom
96445ef2a0 Update podspec, project, and examples to 3.2
Summary: Closes https://github.com/Instagram/IGListKit/pull/1087

Differential Revision: D6917772

Pulled By: rnystrom

fbshipit-source-id: a1e965c58d6da6ef5b32a3bc3c2f23f37fc64794
2018-02-06 15:47:20 -08:00
Zhisheng Huang
c617b18eb6 Move the DEBUG uniqueness check outside of for-loop inside IGListAdapter
Summary:
The original DEBUG was put inside a for loop, which caused a quadratic looping while creating bigger and bigger NSSet.

This is very inefficient and I verified that by profiling with 10000 objects in the array and it caused significant amount of CPU. The main thread is pretty much unresponsive.
Closes https://github.com/Instagram/IGListKit/pull/1084

Reviewed By: rnystrom

Differential Revision: D6903043

Pulled By: lorixx

fbshipit-source-id: 311e8a402eb8d5574fce0eabd626a674b6a5e8c5
2018-02-05 12:38:27 -08:00
Ryan Nystrom
37c798ac78 Bump min macOS version to 10.11 #trivial
Summary:
Followup from #1068

The `NSIndexPath` methods we use **are not** available <10.11. In theory this has always been "broken" b/c older macOS versions would crash at runtime when trying to use these methods.

Normally this would be breaking change, but I can't imagine anyone is using IGListKit on the mac targeting 10.10 and shipping a working app.

cc jessesquires for thoughts

This should be the last remaining item before we get a green badge.

(note that 10.11 was released 9/30/15 which is about 2 weeks before the public IGListKit release)
Closes https://github.com/Instagram/IGListKit/pull/1080

Differential Revision: D6894369

Pulled By: rnystrom

fbshipit-source-id: e5992c7bba68b21704af6bc8fb889b5427266954
2018-02-03 08:31:28 -08:00
Jesse Squires
95b779a584 Update .travis.yml and lint.sh, try to fix #1060 and lint errors #trivial
Summary:
project:
- fix file target membership issues in framework targets and test targets
- fix private/internal header imports, which shouldn't be `<IGListKit/` apparently
- fix static analyzer errors

travis:
- always install latest swiftlint
- ~~don't cache bundler, attempts to fix #1060~~
- remove markdown link check

swiftlint:
- make script non-failing if *any* version of swiftlint is installed
- warning if incorrect version is installed
- fail if not installed
- remove `scripts/generate_ci_yaml.rb`, we can just set the config file path directly
Closes https://github.com/Instagram/IGListKit/pull/1068

Differential Revision: D6885575

Pulled By: rnystrom

fbshipit-source-id: 51b7baa73feefcea71d870c1220d0382df484199
2018-02-02 13:16:46 -08:00
Michelle Deng
29a82d744d Revert D6871289: [IGListKit][PR] Removed unnecessary nil check on transitionDelegate
Summary:
This reverts commit 7ccf5a286ab4ee63bf72273142857496ce62b6f4

bypass-lint

An infra SEV is better than not reverting this diff.
If you copy this password, see you in SEV Review!
cause_a_sev_many_files

Differential Revision:
D6871289

Original commit changeset: 7ccf5a286ab4

fbshipit-source-id: e75cc7bd4a378e1092f4a01be3104fddb336759a
2018-02-02 07:35:07 -08:00
Ryan Nystrom
1d87526bab Fixup project file corruption
Summary:
Continuing issues raised in #1068. Project file was totally busted for macOS and AppleTV.
Closes https://github.com/Instagram/IGListKit/pull/1079

Differential Revision: D6883599

Pulled By: rnystrom

fbshipit-source-id: 29b118c87ffd302b3e54a47f81305292bd38a8fe
2018-02-02 07:02:04 -08:00
Igor Vasilenko
316779fb74 Removed unnecessary nil check on transitionDelegate
Summary:
Issue fixed: #1071

- [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/1076

Differential Revision: D6871289

Pulled By: rnystrom

fbshipit-source-id: 7ccf5a286ab4ee63bf72273142857496ce62b6f4
2018-02-01 07:04:42 -08:00
Ryan Nystrom
64676d5907 Add collection view as an exception param and capture data source state on crash
Summary:
Adding more metadata about the state of the data source at the time of crash.

Note that this will be a breaking change to the public repo, but it's on a much-less used API, and since this is very high-pri for us at the moment, I'm willing to make the breakage.

Reviewed By: manicakes

Differential Revision: D6863683

fbshipit-source-id: e979aea445abc1ea556182cb69758703499e161a
2018-01-31 15:16:59 -08:00
Vasilenko Igor Vladimirovich
f55b6d2895 Made IGListTransitionDelegate inherited from NSObject
Summary:
Issue fixed: #1072

Changes don't need new tests.

- [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/1075

Differential Revision: D6858886

Pulled By: rnystrom

fbshipit-source-id: ec3816cc66aa2f10c21ccc7dea6078adc034e74e
2018-01-31 11:17:59 -08:00
Ryan Nystrom
877ae3efdf Pod install at root to fix tests #trivial
Summary:
From #1068
Closes https://github.com/Instagram/IGListKit/pull/1074

Differential Revision: D6848813

Pulled By: rnystrom

fbshipit-source-id: 0d1f3522948fee0c19183d1417d343052e7b88d5
2018-01-30 13:02:49 -08:00
zhongwuzw
8bccac9a79 Optimize SEL search efficiency
Summary:
Optimize `SEL` search efficiency, reduced the time complexity from O (n) to O (1).

Not need tests.

- [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/1055

Differential Revision: D6839942

Pulled By: rnystrom

fbshipit-source-id: 911755d6f8a4cd79b387423a51b6ea44cc7a2a07
2018-01-29 20:32:57 -08:00
Ryan Nystrom
783adf8014 Fix project, examples, and CHANGELOG from internal changes
Summary:
- Unbreak builds so PRs should work (requires rebase)
- Add CHANGELOG entry
Closes https://github.com/Instagram/IGListKit/pull/1069

Differential Revision: D6839909

Pulled By: rnystrom

fbshipit-source-id: abe0c75b50069ec9aac55b6acb7872fd2c8f04fb
2018-01-29 16:03:58 -08:00
Sue Suhan Ma
a18bd7c495 Customized animation unit test
Summary: test when the item is inserted/removed, if the layout could successfully get the initial/final attributes from the section controller

Reviewed By: rnystrom

Differential Revision: D6759201

fbshipit-source-id: e674662d1e47c374d38019c988c1a37fece2417a
2018-01-29 12:34:13 -08:00