Commit graph

18 commits

Author SHA1 Message Date
Tim Oliver
ceda03a0e1 Bring IGListDiffKit test coverage to 100%
Summary: Fills in the remaining gaps in the tests in order to bring the code coverage of IGListDiffKit (ie, the diffing engine portion of IGListKit) up to 100%.

Differential Revision: D45002512

fbshipit-source-id: b4795946400f7e5ead8882b5d0f5003fb1d17aed
2023-04-17 20:41:49 -07:00
Tim Oliver
f92b9339ee Standarize the copyright notice in all source files
Summary:
The standardized Meta copyright notice is "Copyright (c) Meta Platforms, Inc. and affiliates." and not "Copyright (c) Meta Platforms, Inc. and its affiliates." (Dropping the "its")

This diff updates the copyright notice in each source file to the correct this.

Reviewed By: willbailey

Differential Revision: D44737667

fbshipit-source-id: 643bf36df76723e70d9d826c53cf8f29b8a0c8cc
2023-04-06 02:44:16 -07:00
Tim Oliver
a1b9c2ddb3 Updated corporate branding in IGListKit source files
Summary:
A quick push to fix something I noticed while studying how IGListKit works. This simply replaces "Facebook, Inc" with "Meta Platforms, Inc" in all of the source files where the company copyright notice is posted. This should help bring our external facing projects more in line with our new corporate branding.

There's still a lot more references to "Facebook" as a company in the library (especially around linking to other Meta sponsored open source libraries), but this might need additional scrutiny and review on a case-by-case basis, so let's handle those ones separately.

Reviewed By: lorixx

Differential Revision: D41207363

fbshipit-source-id: 57cdbf5eb1023b41a5f32c0c05e01628686a19fe
2022-11-15 21:47:29 -08:00
Maxime Ollivier
254c04196a remove unused experiment param
Summary: We pass `experiments` to places that don't need it, so lets clean that up.

Reviewed By: patters

Differential Revision: D23145782

fbshipit-source-id: affcfe0f38d1b8e544940af89e5692dbdc36dd76
2020-09-08 09:11:11 -07:00
Nate Stedman
1a44045dce Run lint on IGListKit
Differential Revision: D19141253

fbshipit-source-id: 9ed4c278a91bb48a1f6d33cafa9ce8f21861573d
2019-12-19 09:34:42 -08:00
Nate Stedman
e4c60650f2 Split IGListKit and IGListDiffKit (#1377)
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1377

This splits the diffing-only components from `IGListKit` out into a separate library, `IGListDiffKit`, allowing them to be used independently of the rest of `IGListKit`. We've found that the diffing components of the library are useful independently of the rest of the `UICollectionView` infrastructure, and separating the libraries allows apps to take advantage of those components without paying the full binary size cost of `IGListKit`. The diffing components are available as a subspec in Cocoapods, and as an independent framework in Carthage and direct Xcode project import (i.e. Git submodules).

This is a breaking change, necessitating a major version bump, although it should have only minor impact for projects using the umbrella header `IGListKit.h`, as that header continues to import the diffing utilities. In particular, for a project using Cocoapods and importing `IGListKit.h`, there should be no code changes required.

Reviewed By: calimarkus

Differential Revision: D18114249

fbshipit-source-id: 363b5a427e32800bbc6e82f897230963b4167245
2019-10-31 08:26:12 -07:00
Bofei Zhu
b7bc76dce4 Change paths to path (#1205)
Summary:
## Changes in this pull request
Should map be a map of `IndexPath`s instead of arrays of `IndexPath`s? Also, we might need some unit tests on this part. I don't think it's covered.

### Checklist

- [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)
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1205

Reviewed By: Ziewvater

Differential Revision: D15962803

Pulled By: lorixx

fbshipit-source-id: f207b69ef0ebad08cd72b14ba53101e56d1604fd
2019-06-25 11:46:46 -07:00
Ryan Nystrom
8d8a632b67 Update MIT license language (#1272)
Summary:
Updating license language to meet FB open source standards.
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1272

Differential Revision: D12844366

Pulled By: rnystrom

fbshipit-source-id: 27ae49ae00d963c5c012c79c5738365c232a5773
2018-11-01 10:58:46 -07: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
Saad Ismail
d6e26d54e8 IGListDiffKit
Reviewed By: rnystrom

Differential Revision: D6201376

fbshipit-source-id: c7d2e643de5329f00f6d7a2bec4f0fc86e81f27b
2017-11-06 17:02:06 -08:00
Ryan Nystrom
dfc6b687a8 Add changeCount API to index set and path results
Summary:
Adding this API as a standard in preparation for a reloadData fallback test, avoiding massive batch updates stalling the main thread.

Depends on D5392536

Reviewed By: jeremycohen

Differential Revision: D5392713

fbshipit-source-id: 9447bad4b76194ccf26d74c5111624b2fba02efa
2017-07-12 12:54:28 -07:00
Ryan Nystrom
fdbe025fe1 Add base test case class for simpler unit testing
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
2017-04-20 14:36:28 -07:00
Bofei Zhu
2074eba50e Convert NSUInteger to NSInteger
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
2017-01-22 14:44:14 -08:00
Jesse Squires
69c3cc73e7 macOS support follow-up work, #270
Summary:
Progress on #270.

- Setup basic, empty example project
- Setup test target and add tests that work for macOS
- Update changelog
- Update travis-ci
Closes https://github.com/Instagram/IGListKit/pull/328

Differential Revision: D4325876

Pulled By: jessesquires

fbshipit-source-id: 342963ce5103d3980c697655e1f1a9b6f3f1c520
2016-12-13 23:14:07 -08:00
Ryan Nystrom
316fbe2b8b Remove NSObject+IGListDiffable category
Summary: Removing the category entirely (recreated for unit tests and examples). Went through and updated all of Instagram so we don't rely on the category and found a few models that needed cleaning up.

Reviewed By: jessesquires

Differential Revision: D4206552

fbshipit-source-id: ee8147e8872ea19f6c8bd8072df61eed5bffb6f3
2016-11-21 16:59:00 -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
b5aa5e3900 Replace diff result API for batch updates
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
2016-10-26 11:59:13 -07:00
FBShipIt
cdc796746a Initial commit
fbshipit-source-id: c38b897b9e2b87c782e0e01b0145d9189dc7f9d8
2016-10-11 10:12:17 -04:00