-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feature(ios/core/dialog): set destructive style from options #8676
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
feature(ios/core/dialog): set destructive style from options #8676
Conversation
We added a property called destructiveActionsIndexes in order to support ios destructive style for action buttons. See: https://developer.apple.com/documentation/uikit/uialertaction/style/destructive Co-authored-by: Marc Bisquert <[email protected]>
Set the ios destructive style for the action buttons given the indexes included in the optional destructiveActionsIndexes property. The action buttons not included in the stated property remain with the default style. Co-authored-by: Marc Bisquert <[email protected]>
1. Substitute let for const. 2. Create thisActionIsDestructive variable for readability. Co-authored-by: Marc Bisquert <[email protected]> Co-authored-by: Diego Rodriguez <[email protected]> Co-authored-by: Sergio Sanchez <[email protected]>
Co-authored-by: Marc Bisquert <[email protected]> Co-authored-by: Diego Rodriguez <[email protected]> Co-authored-by: Sergio Sanchez <[email protected]>
Closes #6749 |
@diegovincent Thank you for this - possible to do a quick format on the files to use tabs [2]? I know, I'm not a fan of tabs either (shhhh) - that's way core modules has been formatted historically so stick with that for now - we will most likely add an auto format on commit hook in so you don't have to worry about this hassle in the future. That will make the changeset a bit easier to see. |
…xes-property-to-Actions
Gotta say, I am more of a tabs than spaces guy! But there is a reason for it. Tabs can be configured however you want, but spaces cannot (in terms of width). Thus, for accesibility reasons (visual impairment) tabs > spaces. When I realized that, the discussion was over for me. Having said that, I'll see how to format it as you want, I guess you can do it with Prettier prettier easily. |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Diego Rodriguez.
|
Tab-width = 2 spaces
984f0e8
to
e6c0aa2
Compare
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 the CLA at https://www.nativescript.org/cla. |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
Since this is what Travis CI is asking. See: https://travis-ci.org/github/NativeScript/NativeScript/builds/705343740
@NathanWalker as seen in 06dd083 and on this Travis CI build I had to use 4 spaces because that is what the Travis CI asked for. Unless you want us to explicitly disobey the CI, this should be merged as it is. If instead you want double tabs, simply revert the last commit (06dd083). |
…xes-property-to-Actions
Thank you @diegovincent |
@NathanWalker I can't find any instructions on how to use this new option. |
PR Checklist
What is the current behavior?
User can create default actions in iOS.
What is the new behavior?
User can now create destructive actions in iOS as well.
Implements #6749. Related to #3830, #5553.