Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20000] Rename appearance properties to keyboardAppearance

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-11-24T19:03:41.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.2.0
ComponentsiOS
Labelsqe-5.2.0
ReporterFokke Zandbergen
AssigneeAngel Petkov
Created2015-11-17T08:40:18.000+0000
Updated2016-01-22T00:42:37.000+0000

Description

The TextField and [TextArea.appearance](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TextArea-property-appearance) properties should be renamed to keyboardAppearance to better describe what appearance they are about. TIMOB-19940 has already used this new name for adding appearance control to the AlertDialog input fields. To prevent confusion we should resolve this ticket together.

Comments

  1. Hans Knöchel 2015-11-17

    [~fokkezb] What is with the SearchBar, can we set it there, too?
  2. Fokke Zandbergen 2015-11-17

    That weirdo has keyboardType (so not appearance) without documenting what the value can be: https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.SearchBar-property-keyboardType https://github.com/appcelerator/titanium_mobile/blob/bc85170157d3bebc5de1d61a9fe6e34bce84a8c9/iphone/Classes/TiUISearchBar.m#L102 We should rename that to keyboardAppearance as well and while we're at it see if we can add returnKeyType as well.
  3. Hans Knöchel 2015-11-17

    keyboardType != keyboardAppearence
  4. Fokke Zandbergen 2015-11-17

    Not? What's the difference?
  5. Hans Knöchel 2015-11-17

    - keyboardType configures the keyboard type (number pad, email, phone pad, ascii, etc.) - keyboardAppearance configures the keyboard appearance (default, light, dark, alert)
  6. Fokke Zandbergen 2015-11-17

    O shoot, yes... sorry :) Well, it's missing documentation https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.SearchBar-property-keyboardType
  7. Angel Petkov 2015-11-17

    PR pending https://github.com/appcelerator/titanium_mobile/pull/7459/files Demo Code:
       Ti.UI.setBackgroundColor('white');
       var win = Ti.UI.createWindow({
         title: 'Click window to test'
       });
       
       var field = Ti.UI.createTextArea({
         width           : 300,
         height          : 50,
         top             : 200,
         right           : 0 ,
         backgroundColor : "#f0f0f0",
         value           : "Hello",
         keyboardType : Titanium.UI.KEYBOARD_ASCII,
         appearance: Titanium.UI.KEYBOARD_APPEARANCE_LIGHT,
       });
       
       
        var textField = Ti.UI.createTextField({
           borderStyle   : Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
         color           : '#336699',
         top             : 100, 
         right           : 0,
         width           : 250, 
         height          : 60,
         backgroundColor :'Green',
         keyboardType    : Titanium.UI.KEYBOARD_TWITTER,
         appearance      : Titanium.UI.KEYBOARD_APPEARANCE_DARK
       });
       
       var search = Titanium.UI.createSearchBar({
           barColor            :'#000', 
           showCancel          :true,
           height              :43,
           top                 :20,
           left                :0,
           keyboardType        : Titanium.UI.KEYBOARD_TYPE_URL,
           keyboardAppearance  : Titanium.UI.KEYBOARD_APPEARANCE_DARK
       });
       field.autocorrect = false;
       
       win.add(textField);
       win.add(field);
       win.add(search);
       win.open();
       
    Expected Results : A warning stating that keyboard_twitter and keyboard_ASCII is deprecated. A warning stating that appearance is deprecated in favor of keyboardApperance.
  8. Hans Knöchel 2015-11-24

    QE: Changes done as part of TIMOB-19939. Please check that ticket for demo code.
  9. Harry Bryant 2016-01-19

    Verified as fixed, with SDK 5.2.0.v20160114021251 Receive DEPRECATED warning messages in console as per the expected results. Tested on: iPhone 6s Plus Device (9.2) Mac OSX El Capitan 10.11 (15A284) Ti SDK: 5.2.0.v20160114021251 Appc NPM: 4.2.2 App CLI: 5.2.0-220 Xcode 7.2 Node v4.2.3 *Closing Ticket.*

JSON Source