-
Notifications
You must be signed in to change notification settings - Fork 147
Remove AlertMacOS in favor of Alert & promptMacOS #1548
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
Conversation
Summary: `AlertIOS` was deprecated and removed long ago (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: #35586 Test Plan: Test page shows up fine on iOS .  Reviewed By: lunaleaps Differential Revision: D41825889 Pulled By: NickGerleman fbshipit-source-id: 82e4405b1f3a1ccb558b5a5038a90416e7a32c29
test Sheets? |
wait in your Video sheet doesn't look like sheets? |
I think Ventura made them floating windows |
if that's really the case, we should document expected behaviors? |
Once we merge to 0.71, we will have typescript types for files. When there, we can update the documentation in our repo. You can see I updated the iOS documentation in Alert.d.ts in my upstream PR here: facebook#35586 |
Deprecate AlertMacOS in favor of Alert move UIAlertController define to RCTAlertController.h define only on macos target revert podfile.lock
Fix merge issue Get rid of workaround maybe? Better type? Fix codegen error Remove AlertMacOS altogether Space Refactor test page logic Delete AlertIOS Make promptMacOS work make example load Fix Alert.prompt() Move examples to AlertIOSExample Remove changes to AlertExample Remove more fix error More fixed
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 .  Reviewed By: lunaleaps Differential Revision: D41825889 Pulled By: NickGerleman fbshipit-source-id: 82e4405b1f3a1ccb558b5a5038a90416e7a32c29
Please select one of the following
Summary
Copy of #662 to try and land this change.
RN Core once had a separate
Alert
andAlertIOS
, but have since deprecated and removed the latter. We had forkedAlertIOS
intoAlertMacOS
. It's been deprecated for a while, let's just remove it to get rid of unnecessary diffs.To this effect, I found some unnecessary example code in RN Core that we can cleanup for even less diffs. Soo overall, the order of operations is..
Alert.PromptMacOS
(this PR)AlertIOSExample
page (this PR)AlertIOSExamples
intoAlertExamples
([RNTester] Merge AlertIOSExample page into AlertExample page facebook/react-native#35586)AlertExmaples
. (Some future PR).Changelog
[macOS] [Deprecated] - Deprecate AlertMacOS in favor of Alert
Test Plan
Existing RNTester tests still work.
Screen.Recording.2022-12-08.at.3.08.34.PM.mov
Microsoft Reviewers: Open in CodeFlow