Uh oh!
There was an error while loading. Please reload this page.
iOS: Fix refreshControl layouting - #28236
Conversation
facebook-github-bot
commented
Mar 5, 2020
Hi @yogevbd! Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
facebook-github-bot
commented
Mar 5, 2020
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
RNTester.app (iOS): 10715136 bytes |
Edit: nevermind, react-native 0.62 targets iOS 10.0. I didn't know about this change, looks good! My app uses large title (without react-native-navigation) and suffers the same issue. |
shergin
commented
Mar 22, 2020
I think we dropped support for iOS 9 in January, so that should be possible to land. I will be oncall next week, so I will try to land it today. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
shergin
left a comment
There was a problem hiding this comment.
The compilation fails with:
stderr: xplat/js/react-native-github/React/Views/ScrollView/RCTScrollView.m:233:23: error: incompatible pointer types assigning to 'UIRefreshControl * _Nullable' from 'UIView *' [-Werror,-Wincompatible-pointer-types]
self.refreshControl = refreshControl;
^ ~~~~~~~~~~~~~~
yogevbd
commented
Mar 24, 2020
@shergin The build should pass now. Can you please review? Thanks! |
Base commit: 41fb336 |
Base commit: 41fb336 |
guyca
commented
Apr 2, 2020
Only the windows tests suite fails. I'm assuming it's flaky since this PR was rebased yesterday and other builds are passing. Could someone please trigger the failing tests suite? 🙏 @shergin |
guyca
commented
Apr 20, 2020
@shergin Tests are green! 💚 |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
guyca
commented
Jul 26, 2020
LGTM! 🔥 |
yogevbd
commented
Jul 26, 2020
@shergin@PeteTheHeat Can you guys please try to merge it again? |
simonmitchell
commented
Jul 27, 2020
Whoop whoop! Great work guys, excited to see this merged as it's now patched in two of our projects 😝 |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@PeteTheHeat has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Evan-Younan
commented
Jul 31, 2020
Thanks a lot for this fix! Looking forward to seeing this merged soon. |
chrise86
commented
Sep 23, 2020
Has this made it into a release yet? |
chrise86
commented
Sep 24, 2020
@simonmitchell@yogevbd tried this out using a patch, and the refresh indicator works great now. I have noticed a couple odd jumps on load sometimes, where the title appears small to start and the content appears under the navbar, but generally much better. However it looks like this has broken |
guyca
commented
Sep 25, 2020
@chrise86 |
julian-baumann
commented
Oct 18, 2020
What is the current status on this? Btw @yogevbd how did you manage to apply a transparent background to a large title only with react native navigation? And also remove the border. |
yogevbd
commented
Oct 19, 2020
@julian-baumann These options should do with react-native-navigation: {topBar: {background: {color: 'transparent',noBorder: true}}} |
brmk
commented
Nov 26, 2020
What is the plan for releasing this? It looks abandoned, doesn't it? |
habovh
commented
Dec 15, 2020
Well according to this commit details 1b0fb9b it looks like this fix will be part of React Native 0.64 (currently in RC1). |
Summary: Fixes#30912 Reverts #31024 which did not fix the issue This fix was removed in #28236, however it caused bug #7976 to resurface, as reported in #30912 Pull Request resolved: #30978 Test Plan: This code had been present for quite some time before being removed in #28236 ## Changelog [Internal] [fixed] - regression with refresh control Reviewed By: p-sun Differential Revision: D26981600 Pulled By: PeteTheHeat fbshipit-source-id: 2560e7dba1cfd6ed41d98f2c9ff4cd07a0e5fa24
pouyarezvani
commented
May 4, 2021
Was this fix released? because I'm still having this issue with the large header and FlatList RefreshControl. |
dandre-hound
commented
Aug 2, 2021
@yogevbd we are discussing in #31461 how this PR introduces an undesirable visual jump when pulling to refresh on RN list components (scrollview, flatlist, and sectionlist). We are able to reproduce the visual jump on fresh react-native projects with and without navigation headers. After reverting this PR, pulling to refresh is smooth as expected. Do you have any pointers as to why this may be happening, especially since we're able to reproduce without navigation headers? We're really surprised more people haven't mentioned #31461 since it's easily reproducible and it's a very obvious UI issue. Do you think we're safe to rollback this commit locally if we don't use large navigation headers? Or does this PR fix multiple issues with pulling to refresh? If this PR is only intended to fixe this one issue with pull to refresh on large header titles, we may roll this back locally. Thanks. |
yogevbd
commented
Aug 3, 2021
@dandre-hound it is safe to rollback this commit if you don't use navigation large headers. Will work on a fix asap. |
dandre-hound
commented
Aug 4, 2021
Sounds great @yogevbd -- we are happy to help test. Thank you for offering to look into this! |
This reverts commit 1b0fb9b.
Is anybody working on a fix for the bug introduced by this PR? Edit, sorry for the false alarm. It is actually working fine on 0.73 for us. |
Summary
In
react-native-navigationwe allow the usage of native iOS navigationBar largeTitle which cause the title to "jump" when pulling to refresh.We found that the layout calculations of the refreshControl element mess up the system behaviour.
Changelog
[iOS] [Fixed] - Fix refreshControl messes up navigationBar largeTitles
Test Plan
Before the fix:
And after:
How it looks like with react-native init app after the fix: