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

Offsetting RefreshControl on iOS via progressViewOffset #10718

Closed
scarlac opened this issue Nov 3, 2016 · 7 comments
Closed

Offsetting RefreshControl on iOS via progressViewOffset #10718

scarlac opened this issue Nov 3, 2016 · 7 comments
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@scarlac
Copy link
Contributor

scarlac commented Nov 3, 2016

Description

An object class check for RefreshControl is hard-coded into ScrollView making it impossible to offset the pull-to-refresh loader via JS. Tinkering with the style prop on RefreshControl can cause crashes and strange visual artifacts. A native solution seems the only near-term viable option besides re-implementing everything from scratch.

I have a fix locally to make the Android-only property progressViewOffset on RefreshControl work on iOS as well.

I will submit a PR as soon as possible. Please reply here if there is any disinterest in resolving this issue by adding iOS support via progressViewOffset

Reproduction

  1. Start a project
  2. Set up a component
  3. Add the refreshControl={<RefreshControl progressViewOffset={-13}/>} property.
  4. Run in iOS simulator
  5. Pull-down while list is at top
  6. An activity indicator will slowly appear as you pull down.

The indicator does not move according to the progressViewOffset property on RefreshControl.

Additional Information

  • React Native version: 0.36
  • Platform: iOS 10.0
  • Operating System: macOS 10.12.1
@brentvatne
Copy link
Collaborator

This would be nice to have! Looking forward to the PR @scarlac

@scarlac
Copy link
Contributor Author

scarlac commented Dec 7, 2016

@brentvatne: Done. Should I include the documentation change in this PR as well?

@shergin shergin added the Platform: iOS iOS applications. label Mar 16, 2017
@mountainmoon
Copy link

mountainmoon commented May 17, 2017

This is a very usefull feature, why it has not be merged till now ? @scarlac @brentvatne

@scarlac
Copy link
Contributor Author

scarlac commented May 18, 2017

@mountainmoon Too long time passed so I had to move on. I'm now working on other projects, so I unfortunately don't have the time to fix the issue that was raised by @arsen

If you can fix the issue I think @hramos will be willing to reopen it

@hramos
Copy link
Contributor

hramos commented Jul 20, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Jul 20, 2017
@hramos hramos closed this as completed Jul 20, 2017
wschurman referenced this issue Sep 5, 2017
Summary:
Previous `contentOffset` can be invalid for a new layout and overscroll the ScrollView, so the diff fixes that.
Also documented here: #13566

Reviewed By: mmmulani

Differential Revision: D5414442

fbshipit-source-id: 7de1b4a4571108a37d1795e80f165bca5aba5fef
@Bonobomagno
Copy link

Still an issue on 0.55. The workarounds are pretty bad.

@hramos
Copy link
Contributor

hramos commented May 25, 2018

@Bonobomagno happy to re-open the issue if you are ready to send a PR.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
facebook-github-bot pushed a commit that referenced this issue Mar 11, 2021
Summary:
Fixes #10718, bringing `progressViewOffset` support to iOS.

Thanks to Taylor123 for the initial PR upon which this fix is based.

## Changelog

[iOS] [Fix] - `progressViewOffset` prop of `RefreshControl` and `VirtualizedList` now works on iOS

Pull Request resolved: #30737

Test Plan:
Tested with quick-and-dirty sample app.

![progressViewOffset-iOS](https://user-images.githubusercontent.com/1563532/104526540-82fe1d80-55b7-11eb-9f99-e025bedf4874.gif)

## Documentation

The corresponding documentation update PR can be found [here](facebook/react-native-website#2441).

Reviewed By: kacieb

Differential Revision: D26813977

Pulled By: sammy-SC

fbshipit-source-id: 45cc5a647d70e44a29c6391b7586cb41ca011bef
savv pushed a commit to savv/react-native-savv that referenced this issue May 18, 2021
Summary:
Fixes facebook#10718, bringing `progressViewOffset` support to iOS.

Thanks to Taylor123 for the initial PR upon which this fix is based.

## Changelog

[iOS] [Fix] - `progressViewOffset` prop of `RefreshControl` and `VirtualizedList` now works on iOS

Pull Request resolved: facebook#30737

Test Plan:
Tested with quick-and-dirty sample app.

![progressViewOffset-iOS](https://user-images.githubusercontent.com/1563532/104526540-82fe1d80-55b7-11eb-9f99-e025bedf4874.gif)

## Documentation

The corresponding documentation update PR can be found [here](facebook/react-native-website#2441).

Reviewed By: kacieb

Differential Revision: D26813977

Pulled By: sammy-SC

fbshipit-source-id: 45cc5a647d70e44a29c6391b7586cb41ca011bef

(cherry picked from commit 310a6bc)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
7 participants