Summary:
Update pod and examples so project builds when synced
Depends on D6545334
Reviewed By: rnystrom
Differential Revision: D6573821
fbshipit-source-id: b0d4246fa9c0d627ebcd34ac7abd5c8453964037
Summary:
Fixes examples failing to build after #916. I should have looked at Travis closer, my bad!
- [x] All tests pass. Demo project builds and runs.
Closes https://github.com/Instagram/IGListKit/pull/946
Differential Revision: D6008573
Pulled By: rnystrom
fbshipit-source-id: 727da8f8e8d1079c7840aa9db1152477bf1058ee
Summary:
- Fixed#918 by checking `respondsToSelector:` (boo optionals)
- Cut 3.1.1 for immediate publish
- [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/921
Differential Revision: D5748009
Pulled By: rnystrom
fbshipit-source-id: b387b3988abc785f312bc47ac003851283972d7a
Summary:
~~Land after #661, #730 and D5031184~~
Rebuild the docs from script. Couple notes:
- Went from 100% to 99%, does that matter? Script output says
- > 99% documentation coverage with 2 undocumented symbols
- Looks like `NS_SWIFT_NAME` throws documentation for a loop on `IGListDiffOption` and `IGListExperiment`
- Swift names are different, will that be a problem?
Part of #707
Closes https://github.com/Instagram/IGListKit/pull/728
Differential Revision: D5050951
Pulled By: jessesquires
fbshipit-source-id: 19249c1d34e6f253b911965114fd4ae7458d2684
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:
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:
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:
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:
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:
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:
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:
So the main Podspec file now has two Subspecs, `Diffing` and for lack of better name `Default`. `Diffing` is purely the files within the common directories (used for Diffing, if in the future we support MacOS NSCollectionView then this may need changing). `Default` depends on `Diffing` but also adds all the non-common files.
To use it via CocoaPods, nothing changes. You `import IGListKit` and you will only have access to the files in the pod you use. (So if you use `IGListKit/Diffing` in your Podfile, then you will only get access to the diffing files). If you do a manual installation, or I assume via Carthage, then you will need to import the correct header file (either `IGListDiffKit.h` or `IGListKit.h` depending on what you want).
Turns out CocoaPods creates it's own umbrella header (unless you tell it otherwise) meaning our ones are unused by it.
Just to confirm `IGListKit` in your Podfile will give you everything, only if you add `/Diffing` will you "opt-out" o
Closes https://github.com/Instagram/IGListKit/pull/368
Differential Revision: D4367438
Pulled By: jessesquires
fbshipit-source-id: 272318ca551e7e8c4177ca3ca501fde23bd9705a
Summary:
- Added IGListCompatibility.h file, and imported it in the files where we need the target check.
- Ordered the project by type
In "IGListKit.h" we still have the conditional check for `#if TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR` - Did we want to make a macro or something for this check?
This is the most Obj-C I've ever done... just felt that was a worthy comment.
Closes#364
- [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/369
Differential Revision: D4366344
Pulled By: jessesquires
fbshipit-source-id: f0a6168b8965ded22a641814797fbdec92ca1c36
Summary:
- Add missing common files
- Fix podspec for common files
- Pod install all examples
Reviewed By: rnystrom
Differential Revision: D4350871
fbshipit-source-id: 708ebe6ce66caed75af5b2ac18920dcf45567d16
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
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
Summary:
Rebase from #140:
Create a flow layout for IGList that does not newline sections. Closes#3
- [x] Minimum inter-item spacing
- [x] Minimum line spacing
- [x] Constant item size with constant layout time
- [x] Update layout on insert/delete/move
- [x] Unit Test
Closes https://github.com/Instagram/IGListKit/pull/225
Differential Revision: D4211469
Pulled By: rnystrom
fbshipit-source-id: f4710dbf195701098ac50f94b6b2aa8c801b2a83