BigBalli commented on PR #157: URL: https://github.com/apache/cordova-plugin-dialogs/pull/157#issuecomment-1094372245
Agreed, very opinionated and would require more work to make it a feature suitable for everyone. G > On Apr 10, 2022, at 2:12 PM, Norman Breau ***@***.***> wrote: > > > One would expect red is generally the negative action but it is also the users decision to fit their color format.. > > Agreed. Apple Docs <https://developer.apple.com/documentation/uikit/uialertactionstyle/uialertactionstyledestructive> states that the UIAlertActionStyleDestructive style is for: > > a style that indicates the action might change or delete data. > > In otherwords, you would generally use this style when you have perhaps a delete confirmation prompt, where the OK button is the red / dangerous style. > > if([btnLabel isEqualToString:@"Cancel"] || [btnLabel isEqualToString:@"No"]){ > btnStyle=UIAlertActionStyleDestructive; > } > But this PR appears to apply this style to the "cancel" button or a "no" button. With all respect, I think this change is too opinionated and not fit to be in the library. It would be better if we can provide style options so that the developer can opt to choose a style themselves rather than trying to select a style based on the button text. > > I understand this might be difficult to accomplish, given that the existing API isn't very extensible. > > — > Reply to this email directly, view it on GitHub <https://github.com/apache/cordova-plugin-dialogs/pull/157#issuecomment-1094370427>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADIM3TPSJAOZDXDXAJ5AOLVEM74VANCNFSM5TAD2YKQ>. > You are receiving this because you authored the thread. > -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
