-
Notifications
You must be signed in to change notification settings - Fork 147
Fix macOS Alert API issues #355
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
…iew." This reverts commit 5a67ae0.
{ | ||
key: 'AlertMacOSExample', | ||
module: require('../examples/Alert/AlertMacOSExample'), | ||
supportsTVOS: true, |
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.
Is this true?
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.
ha. That's what it was before it was removed in the .61 merge. This will go away again after issue #354.
} else { | ||
callback(@[buttonKey]); | ||
} | ||
buttonKey = buttons[response - NSAlertFirstButtonReturn].allKeys.firstObject; |
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.
Is this copied from somewhere? We should probably get rid of the dot notation.
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.
Same below in this file.
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.
When it was ported from the ios above years ago it assumed the same dot notation.
Nice additions to RNTester 👌 |
Please select one of the following
Summary
The Alert API for macOS was broken:
alert
calls were showing an input field (only prompts should show an input field)defaultValue
arg ofprompt
has not being honoredAlertMacOSExample
was lostalert
andprompt
with a single button were not returning a JS callbackThe first two issues were recent regressions when merging from upstream. The last issue is old, possible since macOS Alert was first implemented, and discovered as I tested the macOS and iOS RNTester side by side.
Closes #353
In react-native there is the
Alert
API that works for iOS and Android, but contains anoptions
argument with Android specific options.There is also an
AlertIOS
with iOS specific concerns but it is now deprecated.When macOS was first implemented we made an
AlertMacOS
with macOS specific concerns. Long term we should deprecate this and add the macOS concerns to theoptions
argument ofAlert
.Issue #354 tracks deprecating
AlertMacOS
.Changelog
[macOS] [Fixed] - Fix macOS Alert API issues
Test Plan
The RNTester
Alert
and the newly restoredAlertMacOS
pages where manually tested.Microsoft Reviewers: Open in CodeFlow