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

IGListAdapter support for scrollViewDidEndDecelerating #899

Closed
wants to merge 12 commits into from

Conversation

plarson
Copy link
Contributor

@plarson plarson commented Aug 15, 2017

References #842

We use -[UIScrollViewDelegate scrollViewDidEndDecelerating:] delegate callback in the app we are building to hide/show elements when motion has ended.

@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

Copy link
Contributor

@jessesquires jessesquires left a comment

Choose a reason for hiding this comment

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

Thanks @plarson ! 💯

Overall looks great. 👍 If possible, it'd be great to add a unit test. I think there are tests for the existing scroll methods, so you can follow that pattern.

One issue is that this is a breaking change for 3.0 clients. We have 2 options:

  1. defer this to 4.0 when breaking changes are acceptable to make
  2. make this additional method @optional and create a task to make it non-optional for the 4.0 release

We've already done (2) (I think) for another would-be-breaking API change in 3.1.

I'm fine with doing (2). cc @rnystrom for final decision here (due to how this will affect IG)

@param listAdapter The list adapter whose collection view ended decelerating.
@param sectionController The visible section controller that ended decelerating.
*/
- (void)listAdapter:(IGListAdapter *)listAdapter didEndDeceleratingSectionController:(IGListSectionController *)sectionController;
Copy link
Contributor

Choose a reason for hiding this comment

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

breaking change here.

@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

@plarson
Copy link
Contributor Author

plarson commented Aug 19, 2017

Ok @jessesquires, I made that method optional and added respondsToSelector checks

@rnystrom
Copy link
Contributor

Yup lets make this optional with a note that it will be required in 4.0

@jessesquires jessesquires added this to the 3.1.0 milestone Aug 20, 2017
add `@optional` explanation
@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

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.

@plarson would you mind adding some tests for both the adapter and stacked SC? We have some examples that should make this easy:

Once those are in we can merge this!

@rnystrom
Copy link
Contributor

I'm gonna bump this to 3.2 since its a new feature anyways. @plarson lmk if you're still able to work on this, if not we can take over the PR. Thanks!

@rnystrom rnystrom modified the milestones: 3.2.0, 3.1.0 Aug 22, 2017
@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

@plarson
Copy link
Contributor Author

plarson commented Aug 22, 2017

Ok, I added a test. I also adedd a NS_SWIFT_NAME for the selector because it wasn't translating automatically to match the others.

@rnystrom
Copy link
Contributor

@plarson awesome! We just need another test to cover IGListAdapter forwarding to other SCs (see example I posted above) and we're set!

@plarson
Copy link
Contributor Author

plarson commented Aug 22, 2017

My bad, added

@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

scroll delegate in local var
@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

stack SC local scroll delegate var
@facebook-github-bot
Copy link
Contributor

@plarson updated the pull request - view changes

@facebook-github-bot
Copy link
Contributor

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

@rnystrom rnystrom modified the milestones: 3.1.0, 3.2.0 Aug 23, 2017
facebook-github-bot pushed a commit that referenced this pull request Aug 23, 2017
Summary:
Preparing for 3.1.0 release, regen all documentation

⚠️ wait for #899, #908 to land, rebase, and regen ⚠️
Closes #907

Differential Revision: D5691928

Pulled By: rnystrom

fbshipit-source-id: 4e8a13c7b25bef2622c4212552a754d0f7d7da62
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.

4 participants