Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGListBindingSectionController no longer asserts when reloading the entire section. #1213

Closed
wants to merge 20 commits into from

Conversation

jeffbailey
Copy link
Contributor

@jeffbailey jeffbailey commented Jul 10, 2018

Changes in this pull request

Issue fixed: #1174

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

@iglistkit-bot
Copy link

iglistkit-bot commented Jul 10, 2018

1 Warning
⚠️ All pull requests should have a milestone attached, unless marked #trivial.

Generated by 🚫 Danger

@jeffbailey jeffbailey changed the title Support reloading a IGListBindingSectionController. #1174 Support reloading a IGListBindingSectionController. Jul 10, 2018
@jeffbailey
Copy link
Contributor Author

To test the change, I updated IGTestDiffingObject::isEqualToDiffableObject to not always return YES. Now it does a simple compare for the number of objects associated with the key. That actually triggered the assert that was there previously when running IGListBindingSectionControllerTests::test_whenAdapterReloadsObjects_thatSectionUpdated. Now that I converted the assert to a warning, the test passes again.

CHANGELOG.md Outdated
@@ -12,6 +12,8 @@ The changelog for `IGListKit`. Also see the [releases](https://github.com/instag

- Added `IGListCollectionScrollingTraits` for exposing `UICollectionView` scrolling traits to section controllers via `IGListCollectionContext`. [Adam Stern](https://github.com/adamastern) (tbd)

- Support reloading a `IGListBindingSectionController`. [Jeff Bailey](https://github.com/jeffbailey) (tbd)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 nits:

  • Replace tbd with the number and link to this PR (1213)
  • Let's make the line a little more descriptive. Something like "no longer asserts when reloading..." etc etc.

return self.objects.count == testDiffingObject.objects.count;
}

return NO;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting to myself that this actually tests not tripping the assert anymore. See comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Pull request has been updated @rnystrom.

@jeffbailey jeffbailey changed the title Support reloading a IGListBindingSectionController. No longer asserts when reloading a IGListBindingSectionController. Jul 14, 2018
@jeffbailey jeffbailey changed the title No longer asserts when reloading a IGListBindingSectionController. IGListBindingSectionController no longer asserts when reloading the entire section. Jul 14, 2018
Copy link
Contributor

@rnystrom rnystrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffbailey what's up with the comment about the stacked controller? Looks like commit history got kind of wonky? (that's fine if so, we squash everything into a single commit)

Also heads-up we're still planning on deprecating that feature!

@jeffbailey
Copy link
Contributor Author

Yeah, I'm not sure why the stacked controller change showed up there. Just squash to a single commit.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rnystrom is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

larssondaniel pushed a commit to Ingenio/simplehabit-app-ios-iglistkit that referenced this pull request Nov 16, 2019
…ntire section. (Instagram#1213)

Summary:
Issue fixed: Instagram#1174

- [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: Instagram#1213

Differential Revision: D9003398

Pulled By: rnystrom

fbshipit-source-id: 2c68f42e21abaea9191f26309668d866544f80b4
@shial4
Copy link

shial4 commented Nov 19, 2019

When will be this released?

@lorixx
Copy link
Contributor

lorixx commented Nov 23, 2019

@shial4 We made 4.0.0 release yesterday, enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can someone shed some light on an IGAssert in IGListBindingSectionController?
6 participants