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
Add support for flashScrollIndicators on iOS #14058
Add support for flashScrollIndicators on iOS #14058
Conversation
* @platform ios | ||
*/ | ||
flashScrollIndicators: function() { | ||
this.getScrollResponder().scrollResponderFlashScrollIndicators() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semi: Missing semicolon.
@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
@javache let me know if there's anything I can do to make the import succeed. |
Can you update the ScrollViewExample snapshot test? This is currently breaking tests. |
@javache done! Note: while generating the updated snapshots, I noticed 2 issues:
Is it still worth it to update non Thanks |
I am afraid, we have to redo snapshots one more time... because I changed them. |
@shergin what iOS versions did you use to generate the snapshots? I rebased my changes against the latest master and tried to regenerate the snapshots, but I got more changed snapshots than Here is a visual diff: left is original version in master you generated, middle is diff (differences are in red), right is my generated version: As you can see, the difference is only in the last 2 examples that use a custom track image. I'm wondering if the new snapshot infra is dependant on a specific screen color profile. |
I just tried changing my screen color profile and got the same results as in my initial test. Also I can see that the example with the thumbs up image |
Oooops, as I mentioned in 3df537a, I changed the way how we make screenshots, and it probably causes your problem. The tests works fine in cloud thought. So, should we remove color profile from images? |
Ok I'll try tomorrow with 10.3 |
For iOS10 snapshots, I used iOS 10.3 on iPhone 5S and Apple TV 10.2 simulators. For non iOS10 snapshots, I used iOS 9 on iPhone 5S and Apple TV 9.2 simulators. No other snapshots were changed with this setup.
8a7e5ef
to
34763c5
Compare
Alright @shergin @javache, I got the right output! For iOS10 snapshots, I used iOS 10.3 on iPhone 5S and Apple TV 10.2 simulators. We should probably document what devices and iOS versions are used to generate those snapshots. I had different results using 10.2 or iOS 9.3 |
@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: Flashing scroll indicators is a standard behavior on iOS to show the user there's more content. Launch RNTester on iOS, go to the ScrollView section, tap the "Flash scroll indicators" button. You'll see this: ![Flash scroll indicators](https://cloud.githubusercontent.com/assets/57791/26250919/ebea607a-3cab-11e7-96c6-27579cc809ab.gif) I've exposed the method `flashScrollIndicators` on all scrolling components that were already exposing a `scrollToXXX` method so it's usable from those components using a ref. Let me know what you think. Closes facebook/react-native#14058 Differential Revision: D5103239 Pulled By: shergin fbshipit-source-id: caad8474fbe475065418d771b17e4ea9766ffcdc
Motivation
Flashing scroll indicators is a standard behavior on iOS to show the user there's more content.
Test Plan
Launch RNTester on iOS, go to the ScrollView section, tap the "Flash scroll indicators" button.
You'll see this:
Misc
I've exposed the method
flashScrollIndicators
on all scrolling components that were already exposing ascrollToXXX
method so it's usable from those components using a ref.Let me know what you think.