titanium-sdk icon indicating copy to clipboard operation
titanium-sdk copied to clipboard

Android: Ti.UI.Color parity

Open drauggres opened this issue 2 years ago • 6 comments

iOS

  • For semantic colors (defined in semantic.colors.json) Ti.UI.fetchSemanticColor returns Ti.UI.Color instance.
  • For "system" colors (standard colors) Ti.UI.fetchSemanticColor returns Ti.UI.Color instance.
  • Ti SDK supports passing Ti.UI.Color instances for component properties.

Android

  • For semantic colors (defined in semantic.colors.json) Ti.UI.fetchSemanticColor returns string: ti.semantic.color:dark=<ColorString>;light=<ColorString>. Must return a Ti.UI.Color instance.
  • For "system" colors (Ti.Android.R.color) Ti.UI.fetchSemanticColor returns string: @color/${colorName}. Must return a Ti.UI.Color instance.
  • Passing Ti.UI.Color instances for component properties is not supported. Ti.UI.Color must be supported for any color-related properties.

drauggres avatar Feb 17 '22 12:02 drauggres

Awesome PRs as always you are doing here :+1:

m1ga avatar Feb 17 '22 15:02 m1ga

@m1ga Can you help reviewing here? We definitely need both functional- and code-testing.

hansemannn avatar Mar 21 '22 17:03 hansemannn

@hansemannn I would prioritize the other PRs first since this one shouldn't be included in the next release. We have to rebuild all modules that use a color cast. In my opinion a tidev 10.2.0 should be a feature/bugfix release with an easy update from 10.1.1. We still get the getter/setter questions from people that update from 8 to 10 and having to explain that the module is not a good experience :smile:

m1ga avatar Mar 21 '22 17:03 m1ga

Agree. Let's schedule this one for 11.0.0 then and #13266 for 10.2.0 (if possible to review).

hansemannn avatar Mar 21 '22 18:03 hansemannn

@m1ga I think we should include this one in this major.

hansemannn avatar Dec 23 '22 13:12 hansemannn

https://github.com/tidev/titanium_mobile/pull/13273 will break many modules! So we should be a bit slower with major releases (was already asked why its 12.0.0 instead of 11.2.0 :smile: ). Then I'm fine with merging it for 13.0.0. But we should give developers some time to see the Calling .toColor() without Context parameter is deprecated warning and update the modules. Since Google raised the compileSDK for updates more people have to update apps/modules at the moment and at least see that warning now.

So if we aim for a 13 end of next year (and do 12.x.x over the rest of the year). Then we can merge it so we have more time to test modules with the master branch ourselves.

m1ga avatar Dec 23 '22 14:12 m1ga