-
Notifications
You must be signed in to change notification settings - Fork 24.1k
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
[RNTester] Merge AlertIOSExample page into AlertExample page #35586
Conversation
Base commit: 5928144 |
Base commit: 5928144 |
PR build artifact for 641a419 is ready. |
PR build artifact for b186f91 is ready. |
PR build artifact for d1eced2 is ready. |
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@NickGerleman merged this pull request in 76bf71e. |
Thank you! |
Summary: `AlertIOS` was deprecated and removed long ago (facebook@e2bd7db) but there continues to be a test page with the name `AlertIOS` in RN-Tester. `AlertIOSExample.js` contains valid examples of how to use `Alert.prompt()` so it's worth keeping them around. Let's move those into `AlertExample.js` and remove `AlertIOSExample.js`. While we're here, let's do some extra fixes to the test page: - Remove `showsIndividualExamples = true`. For whatever reason, I needed to remove this to show the examples properly... - Convert all uses of `<TouchableHighlight>` with `<Pressable>`. The latter replaces the former, so I thought that made sense.. Some extra context: In React Native macOS, we had forked `AlertIOS` into `AlertMacOS`, with a corresponding example page. This PR was made while working on removing those (microsoft#1548). ## Changelog [INTERNAL] [CHANGED] - Moved `Alert.prompt` examples into common rn-tester test page Pull Request resolved: facebook#35586 Test Plan: Test page shows up fine on iOS . ![Simulator Screen Recording - iPhone 14 Pro - 2022-12-07 at 15 15 40](https://user-images.githubusercontent.com/6722175/206318170-1893c8f6-0596-4825-8312-f45e45557095.gif) Reviewed By: lunaleaps Differential Revision: D41825889 Pulled By: NickGerleman fbshipit-source-id: 82e4405b1f3a1ccb558b5a5038a90416e7a32c29
Summary
AlertIOS
was deprecated and removed long ago (e2bd7db) but there continues to be a test page with the nameAlertIOS
in RN-Tester.AlertIOSExample.js
contains valid examples of how to useAlert.prompt()
so it's worth keeping them around. Let's move those intoAlertExample.js
and removeAlertIOSExample.js
. While we're here, let's do some extra fixes to the test page:showsIndividualExamples = true
. For whatever reason, I needed to remove this to show the examples properly...<TouchableHighlight>
with<Pressable>
. The latter replaces the former, so I thought that made sense..Some extra context:
In React Native macOS, we had forked
AlertIOS
intoAlertMacOS
, with a corresponding example page. This PR was made while working on removing those (microsoft#1548).Changelog
[INTERNAL] [CHANGED] - Moved
Alert.prompt
examples into common rn-tester test pageTest Plan
Test page shows up fine on iOS .