[jira] [Commented] (CB-1933) Using comma in button labels

2014-10-08 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164765#comment-14164765
 ] 

ASF GitHub Bot commented on CB-1933:


Github user asfgit closed the pull request at:

https://github.com/apache/cordova-mobile-spec/pull/6


> Using comma in button labels
> 
>
> Key: CB-1933
> URL: https://issues.apache.org/jira/browse/CB-1933
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, CordovaJS
>Reporter: Ingo Bürk
>Assignee: Max Woghiren
>Priority: Minor
>
> It's currently not possible to use comma in button labels when creating 
> confirm dialogs. This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the 
> buttonLabels argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 
> 'Title', ['Yes, Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an 
> array has been passed and act accordingly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-1933) Using comma in button labels

2014-08-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14088576#comment-14088576
 ] 

ASF GitHub Bot commented on CB-1933:


Github user purplecabbage commented on the pull request:

https://github.com/apache/cordova-mobile-spec/pull/6#issuecomment-51418167
  
is this still valid? with everything moved to plugin tests ...
merge conflicts.


> Using comma in button labels
> 
>
> Key: CB-1933
> URL: https://issues.apache.org/jira/browse/CB-1933
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, CordovaJS
>Reporter: Ingo Bürk
>Assignee: Max Woghiren
>Priority: Minor
>
> It's currently not possible to use comma in button labels when creating 
> confirm dialogs. This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the 
> buttonLabels argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 
> 'Title', ['Yes, Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an 
> array has been passed and act accordingly.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-1933) Using comma in button labels

2013-03-14 Thread Max Woghiren (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13602345#comment-13602345
 ] 

Max Woghiren commented on CB-1933:
--

I think we should go ahead and push this for iOS and Android.  The other 
platforms have had about a month to implement them; the bugs for the other 
platforms will remain outstanding and fixable.  Furthermore, this change is 
quite minor, so it won't cause that many issues.

> Using comma in button labels
> 
>
> Key: CB-1933
> URL: https://issues.apache.org/jira/browse/CB-1933
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, CordovaJS
>Reporter: Ingo Bürk
>Assignee: Max Woghiren
>Priority: Minor
>
> It's currently not possible to use comma in button labels when creating 
> confirm dialogs. This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the 
> buttonLabels argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 
> 'Title', ['Yes, Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an 
> array has been passed and act accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-1933) Using comma in button labels

2013-02-15 Thread Max Woghiren (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13579503#comment-13579503
 ] 

Max Woghiren commented on CB-1933:
--

You're right; a developer who tries to create a confirm notification that does 
have a comma in one of the labels will see undesired behavior on unsupported 
platforms.

Because of that, I agree that this shouldn't be released until all platforms 
support it.

> Using comma in button labels
> 
>
> Key: CB-1933
> URL: https://issues.apache.org/jira/browse/CB-1933
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, CordovaJS
>Reporter: Ingo Bürk
>Assignee: Max Woghiren
>Priority: Minor
>
> It's currently not possible to use comma in button labels when creating 
> confirm dialogs. This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the 
> buttonLabels argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 
> 'Title', ['Yes, Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an 
> array has been passed and act accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-1933) Using comma in button labels

2013-02-15 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13579500#comment-13579500
 ] 

Ingo Bürk commented on CB-1933:
---

Deleted my previous comment. I have to read more carefully. Maybe the best way 
to go is to not include this at all until it is added for all platforms. I 
don't like the discrepancy between the platforms. Once they're all there it 
could be included in a future release and the comma-separated method could just 
be removed as deprecated.

The reason I don't like the discrepancy is because it might lure people into 
using the array format and then their code breaks on other platforms. Although 
that certainly could be stated in the API as a "quirk" for other platforms not 
supporting it yet (but that's somewhat of a lie – it's not a quirk, it simply 
wouldn't be implemented yet).

> Using comma in button labels
> 
>
> Key: CB-1933
> URL: https://issues.apache.org/jira/browse/CB-1933
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, CordovaJS
>Reporter: Ingo Bürk
>Assignee: Max Woghiren
>Priority: Minor
>
> It's currently not possible to use comma in button labels when creating 
> confirm dialogs. This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the 
> buttonLabels argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 
> 'Title', ['Yes, Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an 
> array has been passed and act accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-1933) Using comma in button labels

2013-02-15 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13579499#comment-13579499
 ] 

Ingo Bürk commented on CB-1933:
---

I only suggested this a while ago, I don't have a use for it right now. Still, 
I don't think that is a good way to go because it introduces a discrepancy for 
the JS interface between the platforms which would require developers to adapt 
their JS code depending on the platform. That is defeating the purpose of the 
Cordova project. 

As long as comma-separated strings aren't fully removed, I think the best way 
would be to allow both an array and a string as a parameter. If a string is 
passed, it is parsed into an array before being sent to the native plugin part. 
This is slightly different to your approach in the sense that it won't break 
existing code on Android/iOS because it allows downward compatibility and keeps 
the multi-platform support alive (if not using the new format). I hope it's 
clear what I mean. Unfortunately I don't have the time to work on this myself 
right now.

> Using comma in button labels
> 
>
> Key: CB-1933
> URL: https://issues.apache.org/jira/browse/CB-1933
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, CordovaJS
>Reporter: Ingo Bürk
>Assignee: Max Woghiren
>Priority: Minor
>
> It's currently not possible to use comma in button labels when creating 
> confirm dialogs. This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the 
> buttonLabels argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 
> 'Title', ['Yes, Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an 
> array has been passed and act accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CB-1933) Using comma in button labels

2013-02-15 Thread Max Woghiren (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13579489#comment-13579489
 ] 

Max Woghiren commented on CB-1933:
--

Here's a set of pull requests to deal with this issue.

https://github.com/apache/cordova-android/pull/12
https://github.com/apache/cordova-ios/pull/16
https://github.com/apache/cordova-js/pull/11
https://github.com/apache/cordova-mobile-spec/pull/6

The Android and iOS commits change the button label parameter in 
Notification.confirm from a comma-separated String to an array.

The js commit determines the platform, and if it's Android or iOS, processes 
the given button labels into an array.  If it's another platform, it processes 
them into a comma-separated string.  (This relies on the Android and JS pull 
requests.)

The mobile-spec commit adds a second manual confirm test that uses an array of 
strings to specify the button labels, one of which has a comma.

Other platforms need to support the array format for button labels.  As this is 
done, the js needs to be updated to massage the data correctly (ie. the list of 
platforms for which to ensure the button labels are in array form needs to be 
updated).

Since the string format is deprecated, we can eventually clean this up more 
when we only support the array format.  Namely, platform specific stuff in the 
js can be removed, along with the irrelevant mobile-spec test.  Upon release, 
the documentation will need to be updated as well.

---

If there's a better approach to making this change, please let me know.  This 
is an externally-facing change that can't really be accomplished without 
changing the API.  The gradual per-platform implementation stuff is sort of 
annoying though, and I'm not sure if there's a better way to go about it.

> Using comma in button labels
> 
>
> Key: CB-1933
> URL: https://issues.apache.org/jira/browse/CB-1933
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, CordovaJS
>Reporter: Ingo Bürk
>Assignee: Max Woghiren
>Priority: Minor
>
> It's currently not possible to use comma in button labels when creating 
> confirm dialogs. This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the 
> buttonLabels argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 
> 'Title', ['Yes, Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an 
> array has been passed and act accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira