Commit graph

723 commits

Author SHA1 Message Date
独木舟的木
d55479ec5c Update README.zh.md (#1545)
Summary:
`pod 'IGListKit', '~> 4.0.0'`

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1545

Differential Revision: D33592010

Pulled By: lorixx

fbshipit-source-id: b01bdaa0aacc01b4d7d8ec3470903e59c58db7d9
2022-01-18 14:57:58 -08:00
Facebook Community Bot
ba849d0faa
Re-sync with internal repository (#1547) 2021-12-09 15:33:04 -08:00
jtannady
0c0f86e384
Update references from "master" to "main" 2021-12-07 16:35:00 -08:00
jtannady
45a0172f75
Update references from "master" to "main" 2021-12-07 16:33:26 -08:00
Dustin Williams
987055532a Get index path or scroll position of first visible item in list (#1544)
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1544

Refactored and added functions to IGListAdapter for getting index path or scroll position of first visible item in list.

This makes it possible to see which item is the current first visible item scrolled to in the list, and determine how far it is scrolled into (analogous to additionalOffset in scrollToObject:).

Reviewed By: lorixx

Differential Revision: D32196398

fbshipit-source-id: d809d5f96bb4e1d95055dbebe4e55c1a428a40ed
2021-11-09 00:04:10 -08:00
Zhisheng Huang
05dd3cb71e re-run doc build script
Summary:
As title, currently https://instagram.github.io/IGListKit/ is not working.

Let's try to rebuild the doc

Reviewed By: Ziewvater

Differential Revision: D31811862

fbshipit-source-id: 8a0b0ce6c73542da71dddd13c24b5eb9fe9b0506
2021-10-28 15:49:12 -07:00
Brandon Kieft
b367f7ceb2 Handle cases where the delegate is already an IGListAdapter
Summary:
I was assuming the delegate would always be an IGListAdapterProxy, but this only happens if the client sets either the `collectionViewDelegate` or `scrollViewDelegate` properties on IGListAdapter. Otherwise the delegate will just be the IGListAdapter. Change the debug code to handle this case.

We were starting to see some debug logs roll in with the delegate class listed as IGListAdapter. Hopefully this will return the correct class now.

Differential Revision: D31690438

fbshipit-source-id: bf6dde57756fee4fe617944d45e152cae734b4f1
2021-10-19 08:48:48 -07:00
Lvv.me
0f9d8b8db2 Update CI Xcode version to 13.0 (#1536)
Summary:
## Changes in this pull request

- Update CI Xcode version to 13.0 for testing iOS 15 compatibility

### 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/1536

Reviewed By: candance

Differential Revision: D31628765

Pulled By: lorixx

fbshipit-source-id: 1583cf0e1e8df524deede1204ce1430baa39262b
2021-10-14 08:47:56 -07:00
Brandon Kieft
44c009b6fc Add TEMP code to print the delegate class in the assert message
Summary:
Trying to track down the causes of this assert. Unfortunately the assert does not tell us which class is returning the bad info. Add some HACKY TEMP code to print out the class name in some cases. Hopefully this will catch all the issues.

I put the code in a static function called within the assert, so it should be compiled out of prod builds.

Differential Revision: D31482081

fbshipit-source-id: bef0274c0e35b90d5f77b0cfd337e3f9a772e8b8
2021-10-13 19:05:24 -07:00
Ben Jessup
ad59a9ead3 Update README with SPM instructions (#1477)
Summary:
## Changes in this pull request

-Added Swift Package Manager installation instructions to README.md

Issue fixed: #

### Checklist

- [ ] All tests pass. Demo project builds and runs.
- [ ] 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.
- [ ] 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/1477

Reviewed By: candance

Differential Revision: D31358873

Pulled By: lorixx

fbshipit-source-id: 2429dd1dc42d28a82c40507ad876e514de51eab6
2021-10-13 16:10:55 -07:00
Tamarous
9ca1c692eb Fix 'The domain/default pair of (Info.plist,CFBundleShortVersionString) does not exist' issue (#1507)
Summary:
Fix 'The domain/default pair of (Info.plist,CFBundleShortVersionString) does not exist' issue

## Changes in this pull request

Issue fixed: #

when run pod install under Examples/Examples-iOS, you may encounter the error:

```
The domain/default pair of (path/to/IGListKit/Source/Info, CFBundleShortVersionString) does not exist.
[!] The `IGListDiffKit` pod failed to validate due to 1 error:
    - ERROR | version: A version is required
```
Changed the usage of `defaults read` in scripts/version.sh to `/usr/libexec/PlistBuddy` will fix the problem.

### 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/1507

Reviewed By: bdotdub

Differential Revision: D28753682

Pulled By: lorixx

fbshipit-source-id: 44fa4edffac94c48257c2d841321877d0068794a
2021-10-13 16:06:21 -07:00
Lvv.me
2f37d18be3 Fix Carthage build issue (#1531)
Summary:
## Changes in this pull request

Issue fixed:
- Fix Carthage build issue.
- Remove useless Pod files.

### 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/1531

Reviewed By: Ziewvater

Differential Revision: D31192872

Pulled By: lorixx

fbshipit-source-id: f0aa6fa1a9b3550c352cc15433f8a2a24551bc4c
2021-09-30 16:04:18 -07:00
3a4oT
a1036e06e3 SPM number10 (#1487)
Summary:
## Changes in this pull request

 A better version of https://github.com/Instagram/IGListKit/issues/1465 =)

- SPM support with script-based generations.

- added macOS Catalyst support

 ### Generate SPM layout

1. From **project's root** run:

   `bash scripts/generate_spm_sources_layout.sh`

  2. Commit Changes

 Repeat those steps each time you delete/add the project's files. **Make sure** to have this CI step which will check that `generate_spm_sources_layout.sh` is not broken.

Issue fixed: https://github.com/Instagram/IGListKit/issues/1368 #1406

### Checklist

- [ ] All tests pass. Demo project builds and runs.
- [ ] 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.
- [ ] 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/1487

Reviewed By: DimaVartanian, candance

Differential Revision: D30428297

Pulled By: lorixx

fbshipit-source-id: 655291ff03445dec9b0b8cd97916f0c88207e9a7
2021-08-31 19:28:37 -07:00
Daniel Rodríguez
60bdc2edab Header compatibility with Mac Catalyst.
Summary:
In T97824645 a test that was failing for other reason was fixed and started
failing because it could not compile IGListKit.

The problem is that IGListKit was not prepared to be compiled for Mac Catalyst
since it was only testing for iOS platforms to include UIKit. These changes
modify the header to work in Mac Catalyst.

Differential Revision: D30410680

fbshipit-source-id: f886826b9c485acfb039a9e681afd85f9186c344
2021-08-19 16:56:47 -07:00
Adam Mordavsky
469306670d Adds support for Apple Silicon brew directory (#1513)
Summary:
## Changes in this pull request

Issue fixed: #

When I've tried to run the `Examples/Examples-iOS` the compilation of the project failed on the `Swiftlint` phase.
`../../scripts/lint.sh: line 8: swiftlint: command not found
    Error: SwiftLint not installed!
    Download from https://github.com/realm/SwiftLint,
    or brew install swiftlint.`

### 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/1513

Reviewed By: candance

Differential Revision: D30326670

Pulled By: lorixx

fbshipit-source-id: 99efc3bcda508ec89987f236aa38ee892c148dea
2021-08-19 09:58:10 -07:00
Zhisheng Huang
e4f0f204e1 Fix the Gemfile.lock for the CI build (#1524)
Summary:
Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1524

easy

Reviewed By: bdotdub

Differential Revision: D30354078

fbshipit-source-id: 2ccca064bf78f3cc98d91660f686d36863ab9bcd
2021-08-16 17:10:48 -07:00
Zhisheng Huang
237f76c9bf Fix the slather
Summary:
Run
```
bundle update slather
```

Differential Revision: D30349860

fbshipit-source-id: 9c7334125a4916e8ffd74556649c0570fa76a241
2021-08-16 15:11:33 -07:00
3a4oT
cd0fe69983 Run tests from Xcode12. Github workflow (#1478)
Summary:
## Changes in this pull request

- set header `IGListAdapterUpdaterCompatible.h` to - public which fixed Xcode 12 unit test iOS build.
- include `IGListTransitionData.m` to tvOS trget which fixed Xcode 12 tvOS framework build.
- Added GitHub workflow `CI`.

### Checklist

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

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1478

Reviewed By: candance

Differential Revision: D25504500

Pulled By: lorixx

fbshipit-source-id: 91f477838f176f662dd74928b75df670a4106968
2021-08-16 13:36:42 -07:00
Zhisheng Huang
f4de8caff1 Remove UIKit dependencies in IGListDiffKit code
Summary:
This was accidentally introduced in D25334717 (9cb16b0f31), at the time I didn't pay close attention to the impact there. The diff actually broke the CI for IGListKit in open source community since IGListDiffKit was meant to be compatible in both MacOS and iOS.

The right approach is to rely on the IGListCompatibility.h to resolve the linked code here.

Reviewed By: rzito

Differential Revision: D30344334

fbshipit-source-id: 842ca560a1bfe6d54e7d90466575e4ed35cd9b87
2021-08-16 11:49:28 -07:00
dependabot[bot]
3f04fe4cb6 Bump addressable from 2.7.0 to 2.8.0 (#1517)
Summary:
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md">addressable's changelog</a>.</em></p>
<blockquote>
<h1>Addressable 2.8.0</h1>
<ul>
<li>fixes ReDoS vulnerability in Addressable::Template#match</li>
<li>no longer replaces <code>+</code> with spaces in queries for non-http(s) schemes</li>
<li>fixed encoding ipv6 literals</li>
<li>the <code>:compacted</code> flag for <code>normalized_query</code> now dedupes parameters</li>
<li>fix broken <code>escape_component</code> alias</li>
<li>dropping support for Ruby 2.0 and 2.1</li>
<li>adding Ruby 3.0 compatibility for development tasks</li>
<li>drop support for <code>rack-mount</code> and remove Addressable::Template#generate</li>
<li>performance improvements</li>
<li>switch CI/CD to GitHub Actions</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6469a232c0"><code>6469a23</code></a> Updating gemspec again</li>
<li><a href="24336385de"><code>2433638</code></a> Merge branch 'main' of github.com:sporkmonger/addressable into main</li>
<li><a href="e9c76b8897"><code>e9c76b8</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/sporkmonger/addressable/issues/378">https://github.com/Instagram/IGListKit/issues/378</a> from ashmaroli/flat-map</li>
<li><a href="56c5cf7ece"><code>56c5cf7</code></a> Update the gemspec</li>
<li><a href="c1fed1ca0a"><code>c1fed1c</code></a> Require a non-vulnerable rake</li>
<li><a href="0d8a3127e3"><code>0d8a312</code></a> Adding note about ReDoS vulnerability</li>
<li><a href="89c76130ce"><code>89c7613</code></a> Merge branch 'template-regexp' into main</li>
<li><a href="cf8884f815"><code>cf8884f</code></a> Note about alias fix</li>
<li><a href="bb03f7112e"><code>bb03f71</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/sporkmonger/addressable/issues/371">https://github.com/Instagram/IGListKit/issues/371</a> from charleystran/add_missing_encode_component_doc_entry</li>
<li><a href="6d1d8094a6"><code>6d1d809</code></a> Adding note about :compacted normalization</li>
<li>Additional commits viewable in <a href="https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=addressable&package-manager=bundler&previous-version=2.7.0&new-version=2.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Instagram/IGListKit/network/alerts).

</details>

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1517

Reviewed By: candance

Differential Revision: D30253632

Pulled By: lorixx

fbshipit-source-id: 50c5c8fda7c38ec48249575a07c4dd005c4276cf
2021-08-11 13:58:28 -07:00
Anna Tang
f2166c358b Scroll to focused media below header
Summary:
## Context
We want the post-tap headers to be sticky so that context is maintained as the user scrolls down the media chain.

## In this diff
When clicking on a media tile in a media module (rather than the See All CTA), the sticky header was covering part of the media post's header. We want to shift the scroll-to view down so that the sticky header is sitting on top of the media post's header.

- Create new version of IGListAdapter API's `scrollToObject` function that contains an additional parameter `additionalYOffset`
- Call new `scrollToObject` function with offset of 48.0f (height of header)

## In this stack
Add sticky headers for post-taps, excluding SERP

Reviewed By: maxolls

Differential Revision: D29961626

fbshipit-source-id: c8644cc868e8d7ec92cad5f6c7742d93d001f67d
2021-08-10 19:59:39 -07:00
Benjamin Fishbein
936f558567 Impliments open archive function for Activity Center
Summary: Impliments Bloks navigation to open archive native screen

Differential Revision: D30125112

fbshipit-source-id: b441b16d430cd0e01b2942a9b5acda4150aeee6d
2021-08-09 09:20:55 -07:00
dependabot[bot]
406addc138 Bump nokogiri from 1.11.1 to 1.11.4 (#1508)
Summary:
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.1 to 1.11.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/releases">nokogiri's releases</a>.</em></p>
<blockquote>
<h2>1.11.4 / 2021-05-14</h2>
<h3>Security</h3>
<p>[CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses:</p>
<ul>
<li><a href="https://security.archlinux.org/CVE-2019-20388">CVE-2019-20388</a></li>
<li><a href="https://security.archlinux.org/CVE-2020-24977">CVE-2020-24977</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3517">CVE-2021-3517</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3518">CVE-2021-3518</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3537">CVE-2021-3537</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3541">CVE-2021-3541</a></li>
</ul>
<p>Note that two additional CVEs were addressed upstream but are not relevant to this release. <a href="https://security.archlinux.org/CVE-2021-3516">CVE-2021-3516</a> via <code>xmllint</code> is not present in Nokogiri, and <a href="https://security.archlinux.org/CVE-2020-7595">CVE-2020-7595</a> has been patched in Nokogiri since v1.10.8 (see <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1992">#1992</a>).</p>
<p>Please see <a href="https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-7rrm-v45f-jp64">nokogiri/GHSA-7rrm-v45f-jp64 </a> or <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2233">#2233</a> for a more complete analysis of these CVEs and patches.</p>
<h3>Dependencies</h3>
<ul>
<li>[CRuby] vendored libxml2 is updated from 2.9.10 to 2.9.12. (Note that 2.9.11 was skipped because it was superseded by 2.9.12 a few hours after its release.)</li>
</ul>
<h2>1.11.3 / 2021-04-07</h2>
<h3>Fixed</h3>
<ul>
<li>[CRuby] Passing non-<code>Node</code> objects to <code>Document#root=</code> now raises an <code>ArgumentError</code> exception. Previously this likely segfaulted. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1900">#1900</a>]</li>
<li>[JRuby] Passing non-<code>Node</code> objects to <code>Document#root=</code> now raises an <code>ArgumentError</code> exception. Previously this raised a <code>TypeError</code> exception.</li>
<li>[CRuby] arm64/aarch64 systems (like Apple's M1) can now compile libxml2 and libxslt from source (though we continue to strongly advise users to install the native gems for the best possible experience)</li>
</ul>
<h2>1.11.2 / 2021-03-11</h2>
<h3>Fixed</h3>
<ul>
<li>[CRuby] <code>NodeSet</code> may now safely contain <code>Node</code> objects from multiple documents. Previously the GC lifecycle of the parent <code>Document</code> objects could lead to nodes being GCed while still in scope. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1952#issuecomment-770856928">#1952</a>]</li>
<li>[CRuby] Patch libxml2 to avoid &quot;huge input lookup&quot; errors on large CDATA elements. (See upstream <a href="https://gitlab.gnome.org/GNOME/libxml2/-/issues/200">GNOME/libxml2#200</a> and <a href="https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/100">GNOME/libxml2!100</a>.) [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2132">#2132</a>].</li>
<li>[CRuby+Windows] Enable Nokogumbo (and other downstream gems) to compile and link against <code>nokogiri.so</code> by including <code>LDFLAGS</code> in <code>Nokogiri::VERSION_INFO</code>. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2167">#2167</a>]</li>
<li>[CRuby] <code>{XML,HTML}::Document.parse</code> now invokes <code>#initialize</code> exactly once. Previously <code>#initialize</code> was invoked twice on each object.</li>
<li>[JRuby] <code>{XML,HTML}::Document.parse</code> now invokes <code>#initialize</code> exactly once. Previously <code>#initialize</code> was not called, which was a problem for subclassing such as done by <code>Loofah</code>.</li>
</ul>
<h3>Improved</h3>
<ul>
<li>Reduce the number of object allocations needed when parsing an HTML::DocumentFragment. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2087">#2087</a>] (Thanks, <a href="https://github.com/ashmaroli"><code>@​ashmaroli</code></a>!)</li>
<li>[JRuby] Update the algorithm used to calculate <code>Node#line</code> to be wrong less-often. The underlying parser, Xerces, does not track line numbers, and so we've always used a hacky solution for this method. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1223">https://github.com/Instagram/IGListKit/issues/1223</a>, <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2177">#2177</a>]</li>
<li>Introduce <code>--enable-system-libraries</code> and <code>--disable-system-libraries</code> flags to <code>extconf.rb</code>. These flags provide the same functionality as <code>--use-system-libraries</code> and the <code>NOKOGIRI_USE_SYSTEM_LIBRARIES</code> environment variable, but are more idiomatic. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2193">#2193</a>] (Thanks, <a href="https://github.com/eregon"><code>@​eregon</code></a>!)</li>
<li>[TruffleRuby] <code>--disable-static</code> is now the default on TruffleRuby when the packaged libraries are used. This is more flexible and compiles faster. (Note, though, that the default on TR is still to use system libraries.) [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2191#issuecomment-780724627">#2191</a>, <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2193">#2193</a>] (Thanks, <a href="https://github.com/eregon"><code>@​eregon</code></a>!)</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md">nokogiri's changelog</a>.</em></p>
<blockquote>
<h2>1.11.4 / 2021-05-14</h2>
<h3>Security</h3>
<p>[CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses:</p>
<ul>
<li><a href="https://security.archlinux.org/CVE-2019-20388">CVE-2019-20388</a></li>
<li><a href="https://security.archlinux.org/CVE-2020-24977">CVE-2020-24977</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3517">CVE-2021-3517</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3518">CVE-2021-3518</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3537">CVE-2021-3537</a></li>
<li><a href="https://security.archlinux.org/CVE-2021-3541">CVE-2021-3541</a></li>
</ul>
<p>Note that two additional CVEs were addressed upstream but are not relevant to this release. <a href="https://security.archlinux.org/CVE-2021-3516">CVE-2021-3516</a> via <code>xmllint</code> is not present in Nokogiri, and <a href="https://security.archlinux.org/CVE-2020-7595">CVE-2020-7595</a> has been patched in Nokogiri since v1.10.8 (see <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1992">#1992</a>).</p>
<p>Please see <a href="https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-7rrm-v45f-jp64">nokogiri/GHSA-7rrm-v45f-jp64 </a> or <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2233">#2233</a> for a more complete analysis of these CVEs and patches.</p>
<h3>Dependencies</h3>
<ul>
<li>[CRuby] vendored libxml2 is updated from 2.9.10 to 2.9.12. (Note that 2.9.11 was skipped because it was superseded by 2.9.12 a few hours after its release.)</li>
</ul>
<h2>1.11.3 / 2021-04-07</h2>
<h3>Fixed</h3>
<ul>
<li>[CRuby] Passing non-<code>Node</code> objects to <code>Document#root=</code> now raises an <code>ArgumentError</code> exception. Previously this likely segfaulted. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1900">#1900</a>]</li>
<li>[JRuby] Passing non-<code>Node</code> objects to <code>Document#root=</code> now raises an <code>ArgumentError</code> exception. Previously this raised a <code>TypeError</code> exception.</li>
<li>[CRuby] arm64/aarch64 systems (like Apple's M1) can now compile libxml2 and libxslt from source (though we continue to strongly advise users to install the native gems for the best possible experience)</li>
</ul>
<h2>1.11.2 / 2021-03-11</h2>
<h3>Fixed</h3>
<ul>
<li>[CRuby] <code>NodeSet</code> may now safely contain <code>Node</code> objects from multiple documents. Previously the GC lifecycle of the parent <code>Document</code> objects could lead to nodes being GCed while still in scope. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1952#issuecomment-770856928">#1952</a>]</li>
<li>[CRuby] Patch libxml2 to avoid &quot;huge input lookup&quot; errors on large CDATA elements. (See upstream <a href="https://gitlab.gnome.org/GNOME/libxml2/-/issues/200">GNOME/libxml2#200</a> and <a href="https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/100">GNOME/libxml2!100</a>.) [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2132">#2132</a>].</li>
<li>[CRuby+Windows] Enable Nokogumbo (and other downstream gems) to compile and link against <code>nokogiri.so</code> by including <code>LDFLAGS</code> in <code>Nokogiri::VERSION_INFO</code>. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2167">#2167</a>]</li>
<li>[CRuby] <code>{XML,HTML}::Document.parse</code> now invokes <code>#initialize</code> exactly once. Previously <code>#initialize</code> was invoked twice on each object.</li>
<li>[JRuby] <code>{XML,HTML}::Document.parse</code> now invokes <code>#initialize</code> exactly once. Previously <code>#initialize</code> was not called, which was a problem for subclassing such as done by <code>Loofah</code>.</li>
</ul>
<h3>Improved</h3>
<ul>
<li>Reduce the number of object allocations needed when parsing an <code>HTML::DocumentFragment</code>. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2087">#2087</a>] (Thanks, <a href="https://github.com/ashmaroli"><code>@​ashmaroli</code></a>!)</li>
<li>[JRuby] Update the algorithm used to calculate <code>Node#line</code> to be wrong less-often. The underlying parser, Xerces, does not track line numbers, and so we've always used a hacky solution for this method. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1223">https://github.com/Instagram/IGListKit/issues/1223</a>, <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2177">#2177</a>]</li>
<li>Introduce <code>--enable-system-libraries</code> and <code>--disable-system-libraries</code> flags to <code>extconf.rb</code>. These flags provide the same functionality as <code>--use-system-libraries</code> and the <code>NOKOGIRI_USE_SYSTEM_LIBRARIES</code> environment variable, but are more idiomatic. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2193">#2193</a>] (Thanks, <a href="https://github.com/eregon"><code>@​eregon</code></a>!)</li>
<li>[TruffleRuby] <code>--disable-static</code> is now the default on TruffleRuby when the packaged libraries are used. This is more flexible and compiles faster. (Note, though, that the default on TR is still to use system libraries.) [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2191#issuecomment-780724627">#2191</a>, <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2193">#2193</a>] (Thanks, <a href="https://github.com/eregon"><code>@​eregon</code></a>!)</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9d69b44ed3"><code>9d69b44</code></a> version bump to v1.11.4</li>
<li><a href="058e87fdfd"><code>058e87f</code></a> update CHANGELOG with complete CVE information</li>
<li><a href="92852514a0"><code>9285251</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2234">#2234</a> from sparklemotion/2233-upgrade-to-libxml-2-9-12</li>
<li><a href="5436f6120f"><code>5436f61</code></a> update CHANGELOG</li>
<li><a href="761d320af2"><code>761d320</code></a> patch: renumber libxml2 patches</li>
<li><a href="889ee2a9cb"><code>889ee2a</code></a> test: update behavior of namespaces in HTML</li>
<li><a href="9751d852c0"><code>9751d85</code></a> test: remove low-value HTML::SAX::PushParser encoding test</li>
<li><a href="9fcb7d25ea"><code>9fcb7d2</code></a> test: adjust xpath gc test to libxml2's max recursion depth</li>
<li><a href="1c99019f5f"><code>1c99019</code></a> patch: backport libxslt configure.ac change for libxml2 config</li>
<li><a href="82a253fe7c"><code>82a253f</code></a> patch: fix isnan/isinf patch to apply cleanly to libxml 2.9.12</li>
<li>Additional commits viewable in <a href="https://github.com/sparklemotion/nokogiri/compare/v1.11.1...v1.11.4">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&previous-version=1.11.1&new-version=1.11.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Instagram/IGListKit/network/alerts).

</details>

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1508

Reviewed By: bdotdub

Differential Revision: D28753600

Pulled By: lorixx

fbshipit-source-id: 8465bed2bd3a249ff84e45a2c0dbfb06bae021f2
2021-06-17 10:55:03 -07:00
Sarah Zhou
7c2b48151e Add containerContentOffset to IGListCollectionContext
Summary:
**In this diff**

Add `containerContentOffset` to `IGListCollectionContext`
- In this stack, I check this value from the product tile and content tile section controllers to determine how far the user has scrolled down the containing scroll view

**In this stack**

Add `scroll_logging_info` to product card and content tile events to track scroll depth on the Shop Tab homepage
- Project plan: https://fb.quip.com/mF9qAnGPE8CI
- Logging spec: https://fb.quip.com/6wp7AO63d8Wb#LPWACADjpNK

Differential Revision: D27793071

fbshipit-source-id: 22123511b0f85fd636d82981671ccda0b0d7db7d
2021-04-15 13:15:41 -07:00
Krzysztof Jordan
6f7cee5345 FastMod @(number) to @number to for efficiency in .m, .mm, .h files
Summary:
fastmod --extensions m,mm,h '@\((-)?([\d\.]+)\)([\s\)\],])' '@${1}${2}${3}' --dir fbobjc/*/
Regex updated to capture cases for @(number), and @(number)]

Reviewed By: adamjernst

Differential Revision: D27513888

fbshipit-source-id: aacfc12ad46fef90fe7a7cb46cc8c7a68b2b8c32
2021-04-13 02:12:02 -07:00
Brian Clouser
4d1c1b0b86 Clear last transaction builder before early exit
Summary: Clean up lastTransationBuilder

Reviewed By: maxolls

Differential Revision: D27657431

fbshipit-source-id: a29e4236c60fd8a3657a457d1affbe22c55fdd37
2021-04-12 10:42:31 -07:00
Jian Chen
c7c8f38638 Add <IGListDiffable> to isEqualToDiffableObject method argument type
Summary:
This method generated using the remodel generation script does not match with the header file.

 The method declared in .h file is:
    - (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object;

But implementation generated in .m file is:
    - (BOOL)isEqualToDiffableObject:(nullable id)object
    {
        return [self isEqual:object];
    }

This fix is to generate the implementation as:
    - (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object
    {
        return [self isEqual:object];
    }

Reviewed By: natestedman

Differential Revision: D27146804

fbshipit-source-id: f7d0d598e97e0ef47948b973ff38d9a319cd4b0d
2021-03-18 02:20:45 -07:00
Erich Graham
efe66a44e3 Add Swift value type initializer override for IGListSingleSectionController
Summary: Adds an init override if the generic type is a Swift value conforming to `ListIdentifiable`.

Reviewed By: natestedman

Differential Revision: D27013270

fbshipit-source-id: 44f5c45e6396643d251c23bfedb6cd0a482e3913
2021-03-12 11:22:53 -08:00
Reyner Crosby
601de1b444 Silence string interpolation warning in IGListCollectionContext+Refinements.swift
Summary:
Silences warning:
```
Source/IGListSwiftKit/IGListCollectionContext+Refinements.swift:90:71: warning: string interpolation produces a debug description for an optional value; did you mean to make this explicit?
            fatalError("A nib named \"\(nibName)\" was not found in \(bundle)")
                                                                      ^~~~~~
Source/IGListSwiftKit/IGListCollectionContext+Refinements.swift:90:71: note: use 'String(describing:)' to silence this warning
            fatalError("A nib named \"\(nibName)\" was not found in \(bundle)")
                                                                      ^~~~~~
                                                                      String(describing:  )
Source/IGListSwiftKit/IGListCollectionContext+Refinements.swift:90:71: note: provide a default value to avoid this warning
            fatalError("A nib named \"\(nibName)\" was not found in \(bundle)")
                                                                      ^~~~~~
```

Reviewed By: natestedman

Differential Revision: D26320097

fbshipit-source-id: a5fa87fbe2cdf2ad8b55f985a904cf0d387debad
2021-02-08 13:18:47 -08:00
Vivian Phung
f4013b4ffe IGListCollectionContext Examples
Summary: IGListCollectionContext Examples

Reviewed By: natestedman

Differential Revision: D26267044

fbshipit-source-id: 9f940922d7cb22283d6fcf1ac7354edcd966676b
2021-02-05 09:36:53 -08:00
Vivian Phung
6d6cbe1a2f IGListCollectionContext typesafe method for dequeueReusableSupplementaryView(ofKind: ... nibName:
Summary: add typesafe method for dequeueReusableSupplementaryView(ofKind: ... nibName:

Reviewed By: natestedman

Differential Revision: D26238618

fbshipit-source-id: 50b99311594fa0987752980025a927da1513b55d
2021-02-05 09:36:53 -08:00
Vivian Phung
6224a6536c IGListCollectionContext typesafe method for dequeueReusableSupplementaryView(fromStoryboardOfKind:
Summary: add typesafe method for dequeueReusableSupplementaryView(fromStoryboardOfKind:

Reviewed By: natestedman

Differential Revision: D26238613

fbshipit-source-id: 15d18628fd54e2d7d0ff3cb0b1f88bb473bfbfed
2021-02-05 09:36:53 -08:00
Vivian Phung
dd3726343d IGListCollectionContext typesafe method for dequeueReusableSupplementaryView(:ofKind
Summary: add typesafe method for dequeueReusableSupplementaryView(:ofKind

Reviewed By: natestedman

Differential Revision: D26238603

fbshipit-source-id: 178bee6da1957a132c73610b9db0796323cbff26
2021-02-05 09:36:52 -08:00
Vivian Phung
f3abdcac0d IGListCollectionContext typesafe method for dequeueReusableCellFromStoryboard
Summary: add typesafe method for dequeueReusableCellFromStoryboard

Reviewed By: natestedman

Differential Revision: D26238579

fbshipit-source-id: 11e09b4487b2d64b1be53530358922e98b00cd33
2021-02-05 09:36:52 -08:00
Vivian Phung
7b26f4f32e IGListCollectionContext typesafe method for dequeueReusableCell(withNibName:
Summary: add typesafe method for dequeueReusableCell(withNibName:

Reviewed By: natestedman

Differential Revision: D26266979

fbshipit-source-id: 31297d1563d6c4b931c34ac57911dedc4776310f
2021-02-05 09:36:52 -08:00
dependabot[bot]
493f640e4f Bump nokogiri from 1.10.8 to 1.11.1 (#1496)
Summary:
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.8 to 1.11.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/releases">nokogiri's releases</a>.</em></p>
<blockquote>
<h2>v1.11.1 / 2021-01-06</h2>
<h3>Fixed</h3>
<ul>
<li>[CRuby] If <code>libxml-ruby</code> is loaded before <code>nokogiri</code>, the SAX and Push parsers no longer call <code>libxml-ruby</code>'s handlers. Instead, they defensively override the libxml2 global handler before parsing. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2168">#2168</a>]</li>
</ul>
<h3>SHA-256 Checksums of published gems</h3>
<pre><code>a41091292992cb99be1b53927e1de4abe5912742ded956b0ba3383ce4f29711c  nokogiri-1.11.1-arm64-darwin.gem
d44fccb8475394eb71f29dfa7bb3ac32ee50795972c4557ffe54122ce486479d  nokogiri-1.11.1-java.gem
f760285e3db732ee0d6e06370f89407f656d5181a55329271760e82658b4c3fc  nokogiri-1.11.1-x64-mingw32.gem
dd48343bc4628936d371ba7256c4f74513b6fa642e553ad7401ce0d9b8d26e1f  nokogiri-1.11.1-x86-linux.gem
7f49138821d714fe2c5d040dda4af24199ae207960bf6aad4a61483f896bb046  nokogiri-1.11.1-x86-mingw32.gem
5c26111f7f26831508cc5234e273afd93f43fbbfd0dcae5394490038b88d28e7  nokogiri-1.11.1-x86_64-darwin.gem
c3617c0680af1dd9fda5c0fd7d72a0da68b422c0c0b4cebcd7c45ff5082ea6d2  nokogiri-1.11.1-x86_64-linux.gem
42c2a54dd3ef03ef2543177bee3b5308313214e99f0d1aa85f984324329e5caa  nokogiri-1.11.1.gem
</code></pre>
<h2>v1.11.0 / 2021-01-03</h2>
<h3>Notes</h3>
<h4>Faster, more reliable installation: Native Gems for Linux and OSX/Darwin</h4>
<p>&quot;Native gems&quot; contain pre-compiled libraries for a specific machine architecture. On supported platforms, this removes the need for compiling the C extension and the packaged libraries. This results in <strong>much faster installation</strong> and <strong>more reliable installation</strong>, which as you probably know are the biggest headaches for Nokogiri users.</p>
<p>We've been shipping native Windows gems since 2009, but starting in v1.11.0 we are also shipping native gems for these platforms:</p>
<ul>
<li>Linux: <code>x86-linux</code> and <code>x86_64-linux</code> -- including musl platforms like alpine</li>
<li>OSX/Darwin: <code>x86_64-darwin</code> and <code>arm64-darwin</code></li>
</ul>
<p>We'd appreciate your thoughts and feedback on this work at <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2075">#2075</a>.</p>
<h3>Dependencies</h3>
<h4>Ruby</h4>
<p>This release introduces support for Ruby 2.7 and 3.0 in the precompiled native gems.</p>
<p>This release ends support for:</p>
<ul>
<li>Ruby 2.3, for which <a href="https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/">official support ended on 2019-03-31</a> [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1886">#1886</a>] (Thanks <a href="https://github.com/ashmaroli"><code>ashmaroli</code></a>!)</li>
<li>Ruby 2.4, for which <a href="https://www.ruby-lang.org/en/news/2020/04/05/support-of-ruby-2-4-has-ended/">official support ended on 2020-04-05</a></li>
<li>JRuby 9.1, which is the Ruby 2.3-compatible release.</li>
</ul>
<h4>Gems</h4>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md">nokogiri's changelog</a>.</em></p>
<blockquote>
<h2>v1.11.1 / 2021-01-06</h2>
<h3>Fixed</h3>
<ul>
<li>[CRuby] If <code>libxml-ruby</code> is loaded before <code>nokogiri</code>, the SAX and Push parsers no longer call <code>libxml-ruby</code>'s handlers. Instead, they defensively override the libxml2 global handler before parsing. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2168">#2168</a>]</li>
</ul>
<h2>v1.11.0 / 2021-01-03</h2>
<h3>Notes</h3>
<h4>Faster, more reliable installation: Native Gems for Linux and OSX/Darwin</h4>
<p>&quot;Native gems&quot; contain pre-compiled libraries for a specific machine architecture. On supported platforms, this removes the need for compiling the C extension and the packaged libraries. This results in <strong>much faster installation</strong> and <strong>more reliable installation</strong>, which as you probably know are the biggest headaches for Nokogiri users.</p>
<p>We've been shipping native Windows gems since 2009, but starting in v1.11.0 we are also shipping native gems for these platforms:</p>
<ul>
<li>Linux: <code>x86-linux</code> and <code>x86_64-linux</code> -- including musl platforms like alpine</li>
<li>OSX/Darwin: <code>x86_64-darwin</code> and <code>arm64-darwin</code></li>
</ul>
<p>We'd appreciate your thoughts and feedback on this work at <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2075">#2075</a>.</p>
<h3>Dependencies</h3>
<h4>Ruby</h4>
<p>This release introduces support for Ruby 2.7 and 3.0 in the precompiled native gems.</p>
<p>This release ends support for:</p>
<ul>
<li>Ruby 2.3, for which <a href="https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/">official support ended on 2019-03-31</a> [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1886">#1886</a>] (Thanks <a href="https://github.com/ashmaroli"><code>ashmaroli</code></a>!)</li>
<li>Ruby 2.4, for which <a href="https://www.ruby-lang.org/en/news/2020/04/05/support-of-ruby-2-4-has-ended/">official support ended on 2020-04-05</a></li>
<li>JRuby 9.1, which is the Ruby 2.3-compatible release.</li>
</ul>
<h4>Gems</h4>
<ul>
<li>Explicitly add racc as a runtime dependency. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/1988">#1988</a>] (Thanks, <a href="https://github.com/voxik"><code>voxik</code></a>!)</li>
<li>[MRI] Upgrade mini_portile2 dependency from <code>~&gt; 2.4.0</code> to <code>~&gt; 2.5.0</code> [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2005">#2005</a>] (Thanks, <a href="https://github.com/alejandroperea"><code>alejandroperea</code></a>!)</li>
</ul>
<h3>Security</h3>
<p>See note below about CVE-2020-26247 in the &quot;Changed&quot; subsection entitled &quot;XML::Schema parsing treats input as untrusted by default&quot;.</p>
<h3>Added</h3>
<ul>
<li>Add Node methods for manipulating &quot;keyword attributes&quot; (for example, <code>class</code> and <code>rel</code>): <code>#kwattr_values</code>, <code>#kwattr_add</code>, <code>#kwattr_append</code>, and <code>#kwattr_remove</code>. [<a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2000">#2000</a>]</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="7be6f04aa2"><code>7be6f04</code></a> version bump to v1.11.1</li>
<li><a href="aa0c399195"><code>aa0c399</code></a> dev: overhaul .gitignore</li>
<li><a href="3d90c6d1bc"><code>3d90c6d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2169">#2169</a> from sparklemotion/2168-active-support-test-failure</li>
<li><a href="bbf850c629"><code>bbf850c</code></a> changelog: update for <a href="https://github-redirect.dependabot.com/sparklemotion/nokogiri/issues/2168">#2168</a></li>
<li><a href="ee697726dc"><code>ee69772</code></a> ci: another valgrind suppression</li>
<li><a href="f9a2c4e050"><code>f9a2c4e</code></a> fix: restore proper error handling in the SAX push parser</li>
<li><a href="35aa88b75e"><code>35aa88b</code></a> fix(cruby): reset libxml2's error handler in sax and push parsers</li>
<li><a href="07459fd0e0"><code>07459fd</code></a> fix(test): clobber libxml2's global error handler before every test</li>
<li><a href="b682ac5afe"><code>b682ac5</code></a> ci: ensure all tests are running <code>setup</code></li>
<li><a href="007662fc21"><code>007662f</code></a> github: update &quot;installation difficulty&quot; issue template</li>
<li>Additional commits viewable in <a href="https://github.com/sparklemotion/nokogiri/compare/v1.10.8...v1.11.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nokogiri&package-manager=bundler&previous-version=1.10.8&new-version=1.11.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Instagram/IGListKit/network/alerts).

</details>

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1496

Reviewed By: lorixx

Differential Revision: D26201659

Pulled By: iperry90

fbshipit-source-id: 6e7bc3c0b97119a54e0fa3de806793d4286999e7
2021-02-02 13:18:40 -08:00
Mark
bb962cb3d3 The README file in this repo has a bad link - [404:NotFound] - “MIT-licensed” (#1489)
Summary:
The markup version of the readme that is displayed for the main page in this repo contains the following bad link:

“MIT-licensed”
https://github.com/Instagram/IGListKit/blob/master/LICENSE

It should be: https://github.com/Instagram/IGListKit/blob/master/LICENSE.md

**Extra**

This bad link was found by a tool I recently created as part of an new experimental hobby project: https://github.com/MrCull/GitHub-Repo-ReadMe-Dead-Link-Finder

Re-check this Repo via: http://githubreadmechecker.com/Home/Search?SingleRepoUri=https%3a%2f%2fgithub.com%2fInstagram%2fIGListKit

If this has been helpful, or if you have any feedback on the tool itself, then please feel free to share your thoughts by adding a comment here, or adding to a “Discussion” in the tool’s Repo.

## Changes in this pull request

Issue fixed: Did not log issue for trivial typo in readme.

### Checklist

- [N/A] All tests pass. Demo project builds and runs.
- [N/A] I added tests, an experiment, or detailed why my change isn't tested.
- [N/A] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [N/A] 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/1489

Reviewed By: bdotdub

Differential Revision: D25872470

Pulled By: lorixx

fbshipit-source-id: befe2359d1d2604ec872bf454893e10233f75ac5
2021-02-02 09:09:36 -08:00
Nate Stedman
64d9bc570b Add refined Swift wrapper for IGListSingleSectionController
Summary: This API is dependent on dynamic types right now, making it awkward and unsafe to use in Swift. By providing a generic wrapper, we can make it safer to use.

Reviewed By: joetam

Differential Revision: D26057302

fbshipit-source-id: ec5d5ed202900f6171761214900fde1f9615e7f5
2021-01-26 07:34:31 -08:00
Maxime Ollivier
9f0462086f clean up @synthesize from the updater
Summary: We don't need these synthesize anymore.

Reviewed By: joetam

Differential Revision: D26052888

fbshipit-source-id: eedb9acea68846af1a23fea15a44f94351eb999a
2021-01-25 13:49:24 -08:00
Maxime Ollivier
249b152776 fix NSInteger printing
Summary: While building the example project, I noticed this warning

Reviewed By: lorixx

Differential Revision: D25962436

fbshipit-source-id: c686e07ac82551f658b40a72280dac29a026cb62
2021-01-21 19:58:49 -08:00
Maxime Ollivier
2d8827f96e fix example projects
Summary: Run `pod install` on each project

Reviewed By: Haud, lorixx

Differential Revision: D25962431

fbshipit-source-id: 0cff259d798ba6e2b96408d29639665ea3245596
2021-01-21 19:58:49 -08:00
Maxime Ollivier
9a11f6b55f graduate IGListExperimentBackgroundDiffing to a property
Summary:
`IGListExperimentBackgroundDiffing` has been running on Instagram for a couple months now, and we're seeing nice scroll performance improvements (less frame drops) without increasing crashes. Lets move the experiment to a real property!

Should it be enabled by default?
   * I'm leaning toward no, but I could be convinced otherwise. This optimization is good for large/complex applications with lots of diffing, but I'm not sure the more common apps would need it initially. It does make updates more complicated and the order of operation will be a bit different. For example, we've seen some places call `-performUpdatesAnimated` and almost immediately expect the `IGListAdapter` data to be updated, leading to missing views. This issue can still happen without background diffing, but less often.

Reviewed By: joetam

Differential Revision: D25884786

fbshipit-source-id: 3c8755a774f63868b7dfbc8e7a2e5c012a9e7e27
2021-01-21 19:58:49 -08:00
Maxime Ollivier
032e1b0b83 goodbye allowsBackgroundReloading
Summary:
Originally, `allowsBackgroundReloading` was added to improve performance, but ironically, it's causing lots of performance issues among other issues.
* Performance: Looking back, it's not too surprising that it causes perf issues. We're falling back to a full `-reloadData` if the view is not in the window, which can happen pretty often. For example, if a view-controller is within a `UINavigationController` stack but not on top, or within a `UITabBarController`. Because a full `-reloadData` will re-query the cells and re-create the entire layout, it's going to be more expensive than an incremental update via `-performUpdatesAnimated`. The proof is in the data and we have a few examples where this flag was the cause of significant UI stalls.
* Bugs: Because we might reload cells often, it can create strange animation artifacts. Specifically, it was breaking the `UIView` snapshots just before a transition, like the new zoom animator.

Overall, we ended disabling this feature and I think most apps will be in the same boat.

But what if this flag does improve my app's performance?
* File an issue and lets chat! I'd be curious to understand why that's the case. If a full `-reloadData` is more performant than an incremental `-performUpdatesAnimated`, than something odd is happening and I don't think this flag is the right solution.

Reviewed By: joetam

Differential Revision: D25884777

fbshipit-source-id: c4626a52082ef4c7b7300b21077529f26c551e70
2021-01-21 19:58:48 -08:00
Maxime Ollivier
4ca6e9d0a6 add new updater to CHANGELOG
Summary: Add changes from the last couple diffs

Reviewed By: iperry90

Differential Revision: D25884783

fbshipit-source-id: 18160bcd796d2ef0a3180e6da3b791e3895e018e
2021-01-21 19:58:48 -08:00
Maxime Ollivier
6c48800ff5 remove protocol IGListAdapterUpdaterCompatible
Summary: Now that the experimental updater is done, we can remove this protocol.

Reviewed By: iperry90

Differential Revision: D25884776

fbshipit-source-id: e7ce962f166aecf73ca1e8fdfa41404bc794696e
2021-01-21 19:58:48 -08:00
Maxime Ollivier
9994d5abc2 clean up performExperimentalUpdateAnimated
Summary:
Lets clean up `-performExperimentalUpdateAnimated`
* Remove the "experimental"
* Re-order the params to match the other method
* Rename dataBlock -> sectionDataBlock to make it clear we mean sections
* Rename applyDataBlock -> applySectionDataBlock

Reviewed By: Haud

Differential Revision: D25884784

fbshipit-source-id: e24c54b43c08c02538c83ba044b1a547cd0f38ae
2021-01-21 19:58:48 -08:00
Maxime Ollivier
43af8838df merge IGListUpdatingDelegateExperimental into IGListUpdatingDelegate
Summary:
Now that the new updater has shipped, lets update `IGListUpdatingDelegate` with the new methods:
* `-performExperimentalUpdateAnimated` is the new section update method (renaming coming in the next diff)
* `-performDataSourceChange` lets us safely update the `UICollectionView` dataSource

Also, something I've been wanting to do for a long time, lets group related methods in `IGListUpdatingDelegate.h`.

Reviewed By: Haud

Differential Revision: D25884780

fbshipit-source-id: 5d9201ace8bf6b281d71ff03463cb7c911e7f967
2021-01-21 19:58:47 -08:00
Maxime Ollivier
247e7cac65 ship the new updater
Summary:
It's time to ship the new updater! `IGListExperimentalAdapterUpdater` has been running on Instagram for a couple months with better performance and stability. In this diff, we're renaming `IGListExperimentalAdapterUpdater` (and related classes) to `IGListAdapterUpdater`.

Here's a recap:

## Stability

* `[IGListAdapter setDataSource]` isn't safe
  * We're changing the underlying data without telling the `UICollectionView`.
  * Fix: Lets invalidate the `UICollectionView` data by changing its dataSource.
* `[IGListAdapter setCollectionView]` isn't safe
  * This is synchronous, but we might have pending or on-going updates. The `UICollectionView` might get synced before the pending update actually start executing, so the diff results will be off.
  * Fix: Lets wrap updates in a transaction that can be cancelled.
* Returning a nil `IGListSectionController` from `IGListAdapterDataSource` could crash
  * The `IGListAdapterUpdater` will still perform the diffing assuming that all the objects will have a section, which isn't the case.
  * Fix: Lets generate the `IGListSectionController` before the diffing.
* Other improvements
  * Lets ask for the `fromObject` just before diffing, instead of asking when scheduling the update.
  * If the `UICollectionView` section count doesn't match `fromObject`, lets fallback to a reload.

## Performance

* Re-test background diffing
  * `IGListExperimentBackgroundDiffing` and coalescing updates wasn't safe because of the issues mentioned above. The longer we wait, the more likely we'll end up in a race condition. Lets try re-testing with the stability improvements.
* Unblocks background layout calculation
  * This is a larger project, but these improvements are required to make background work safe.
* Only create the `backgroundView` if needed (although this doesn't really require the new updater)

## Other

* Transactions
  * `IGListAdapterUpdater` is the workhorse of `IGListKit` and has become a bit hard to follow over the years. We want to break it apart into simpler, more manageable parts.
* Avoid blocks
  * There's a lot of blocks flying around, making crash logs hard to read. Lets try to use methods/functions where possible.

Reviewed By: Haud, lorixx

Differential Revision: D25884782

fbshipit-source-id: 1357fa23513a239051d5b1766823effa3199f656
2021-01-21 19:58:47 -08:00
Maxime Ollivier
3b47aa27dc add debugDescriptionLines for new updater
Summary: The current `IGListAdapterUpdater` implements `-debugDescriptionLines` which is used by `IGListDebugger` to dump information about all the apaters, so lets also implement it for `IGListExperimentalAdapterUpdater`.

Reviewed By: lorixx

Differential Revision: D25884781

fbshipit-source-id: 86b227258f033f0079058af04915171d6a149241
2021-01-21 19:58:47 -08:00
Maxime Ollivier
329a4d300d ship IGListExperimentSectionCountValidation
Summary: This makes sure the `UICollectionView` section count matches what we expect before applying a diff results, if not, we fallback to a `reloadData`. This doesn't decrease the crash rate significantly, but it's nice to have a last line of defense. We do tradeoff crashes for performance issues, but it's better that an app works at all and we'll see the issue via asserts.

Reviewed By: lorixx

Differential Revision: D25884778

fbshipit-source-id: 5011d0907ce0f971ea3a0bf95c1549d52f615982
2021-01-21 19:58:47 -08:00