Commit Graph

15 Commits

Author SHA1 Message Date
Adlai Holler
5fa588ee70 Make -[IGListAdapter updater] Public, Read-Only
Summary:
Hey IGListKit folks! Would you be willing to expose this, so that other objects that are given a list adapter can inspect its updater configuration?

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

Reviewed By: jessesquires

Differential Revision: D4379016

Pulled By: rnystrom

fbshipit-source-id: 4056457181fea31f71b1e928b60aec46160cc585
2017-01-03 16:59:02 -08:00
Ryan Nystrom
e9ad6b199e Working ranges in stacked section controllers
Summary:
Closes #354

- [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/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/356

Differential Revision: D4365718

Pulled By: jessesquires

fbshipit-source-id: 41d7bcd823415e5795a069a4ef335e60e7da806a
2016-12-23 08:29:14 -08:00
Ryan Nystrom
ad30e53507 Move macOS and diffing files to Common dir
Summary:
Moving files to `Common` dir so changes are more automated with Buck and easier to manage in the long run. Ran `pod install` on test and example targets. Updated buck file to include `Common` so diffing lib still works.

Part of #270

Reviewed By: jessesquires

Differential Revision: D4346722

fbshipit-source-id: 366d89f6dd571b158b5fccd542080c51517ed341
2016-12-19 12:29:24 -08:00
Jesse Squires
e5afb5b4d0 Add scrolling method on IGListCollectionContext. Close #267
Summary:
- Add scrolling method on IGListCollectionContext so that section controllers can scroll to themselves.
- Update CHANGELOG.
- Other misc fixes.
- Closes #267 on GitHub.

Reviewed By: rnystrom

Differential Revision: D4261144

fbshipit-source-id: 9eed833cfff06107607bba01a0beee1d871497b6
2016-12-01 16:14:04 -08:00
Ryan Nystrom
7a4ebc94bc Add stricter build flags
Summary:
Gets the `xcodeproj` in parity with our internal build settings.

Fixes #211

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

Differential Revision: D4210413

Pulled By: rnystrom

fbshipit-source-id: c820faf97ef04bc7cf7c369446d0e17829b6339b
2016-11-19 11:58:58 -08:00
Suraya Shivji
e2fbb68670 Swap NSUInteger to NSInteger Public API
Summary:
Swapped NSUInteger to NSInteger in public headers. Fixed a test in IGListSectionMapTests.m to pass with NSInteger. For issue #200!

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

Differential Revision: D4191521

Pulled By: rnystrom

fbshipit-source-id: 3f15c5ee3f8ed2d382de2602912a2e998bfbcbba
2016-11-16 15:28:59 -08:00
Jesse Squires
204f7d5390 Docs updates and refinements, #181
Summary:
Did a full pass on documentation.

- Clean up
- Fixes
- Better markdown

> **NOTE:** this PR does not re-gen docs. I will do that next. Before we cut 2.0
Closes https://github.com/Instagram/IGListKit/pull/198

Reviewed By: rnystrom

Differential Revision: D4181253

Pulled By: jessesquires

fbshipit-source-id: 133c4af392bb396ecc6eff0c895c55e6d18730b7
2016-11-15 11:44:10 -08:00
Ryan Nystrom
8ea5e08880 Add edge-case unit tests
Summary:
- Removed dead code in batch data and updater
- Tested updating with empty index sets
- Tested updating with not-found section controller
- Tested reloading when collection view or data source are not set
- Tested `-[IGListAdapter sectionForObject:]`
- Tested index path return for not-found section controller
- Tested pointer comparison with `NSObject+IGListDiffable` category

Fixes #190, #189

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

Differential Revision: D4172781

Pulled By: rnystrom

fbshipit-source-id: c25cc917e9a1ebc5fc94fa022e01f99c80c2466c
2016-11-12 09:59:10 -08:00
Ryan Nystrom
1a92c15b50 Return nil if accesing OOB section
Summary: Rare crashers that take `NSNotFound` from `sectionFor...` API and then immediately look up the object w/out checking for not found. Instead return nil.

Reviewed By: dshahidehpour

Differential Revision: D4142946

fbshipit-source-id: ca80f87729b5ee6699740de897d73b819d27d132
2016-11-07 15:44:23 -08:00
Ryan Nystrom
576ab4d1ff Remove NSIndexPath pretty print
Summary:
Saw this pop up in coverage reports. We don't log or assert `NSIndexPath` at all so this doesn't really seem necessary.

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

Differential Revision: D4138474

Pulled By: rnystrom

fbshipit-source-id: ad8375e47d1584f594d3df29f07a1d5d1a53f3c5
2016-11-06 12:44:10 -08:00
Ryan Nystrom
f5339113df Support supplementaryViews created from nibs (continued)
Summary:
Continuing the work on #90. I don't believe I can push directly to that PR since the origin is `master` of a repo I don't have access to.

https://help.github.com/articles/checking-out-pull-requests-locally/

I went ahead and added another supplementary view test copying the old one we had.

cc jessesquires in case there's something else I can do here. I believe this will still give rawlinxx credit?
Closes https://github.com/Instagram/IGListKit/pull/162

Differential Revision: D4137364

Pulled By: rnystrom

fbshipit-source-id: d8418ac5728fd6d9570fa1d1568f4343f5c4112b
2016-11-05 16:29:06 -07:00
Sven Bacia
ce4b851da3 Support cells created from nibs
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
2016-10-14 18:59:18 -07:00
Ryan Nystrom
394760081c Add isLast/FirstSection API to IGListSectionController
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
2016-10-13 12:44:12 -07:00
Kyle Hickinson
a2e0005357 Replace reusable identifier methods with a C function (#40)
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
2016-10-11 17:59:08 -07:00
FBShipIt
cdc796746a Initial commit
fbshipit-source-id: c38b897b9e2b87c782e0e01b0145d9189dc7f9d8
2016-10-11 10:12:17 -04:00