{ "id": "165621", "key": "TIMOB-24361", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-09T22:33:03.000+0000", "created": "2017-01-31T20:42:25.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "merge-6.1.0" ], "versions": [ { "id": "18154", "name": "Release 6.0.1", "archived": false, "released": true, "releaseDate": "2016-12-21" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-05-09T23:14:18.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "In TIMOB-23453 we fixed an issue where a warning log was thrown when using {{rgba()}} values. Unfortunately, this did not include rgb-values, so for {{rgb()}} values the {{[WARN] Hex color passed looks invalid: rgb(...)}} warning is still logged. This should be fixed!", "attachment": [], "flagged": false, "summary": "iOS: Using rgb color values causing a false warning, Android: 2-digit float-values do not work", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "405897", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "The Android part of rgba() has a bug too:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/util/TiColorHelper.java#L28\r\n\r\ndoesn't allow to have more than one number after the {{.}}\r\n\r\nwhile this is working in 6.0.1: {{rgba(0.3, 1.0, 1.0, 0.1)}} something like this won't work: {{rgba(0.35, 0.55, 0.55, 0.15)}}\r\n\r\nFix for TiColorHelper.java:\r\n{code:java}\r\nstatic Pattern rgbaPattern = Pattern.compile(\"rgba\\\\(\\\\s*([0-9]{1,3})\\\\s*,\\\\s*([0-9]{1,3})\\\\s*,\\\\s*([0-9]{1,3})\\\\s*,\\\\s*(\\\\d\\\\.\\\\d+)\\\\s*\\\\)\");\r\nstatic Pattern floatsPattern = Pattern.compile(\"rgba\\\\(\\\\s*(\\\\d\\\\.\\\\d+)\\\\s*,\\\\s*(\\\\d\\\\.\\\\d+)\\\\s*,\\\\s*(\\\\d\\\\.\\\\d+)\\\\s*,\\\\s*(\\\\d\\\\.\\\\d+)\\\\s*\\\\)\");\r\n{code}\r\n the second {{\\d}} always needs a {{+}}\r\n\r\nPR and test will follow. ", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-31T21:01:22.000+0000", "updated": "2017-01-31T21:01:22.000+0000" }, { "id": "405914", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8809\r\n\r\nTest-Case:\r\n{code:js}\r\nvar win = Titanium.UI.createWindow({\r\n\tbackgroundColor: 'rgb(255, 255, 0)', // Shoult not throw a warning, making the background yellow\r\n});\r\n\r\nwin.addEventListener('click', function() {\r\n\twin.setBackgroundColor('rgb(255.00, 255.00, 255.00, 0.55)'); // Should also work on Android, making the background gray\r\n});\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-31T23:19:56.000+0000", "updated": "2017-01-31T23:19:56.000+0000" }, { "id": "406566", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "iOS changes are fine. ", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-08T06:13:59.000+0000", "updated": "2017-02-08T06:13:59.000+0000" }, { "id": "406988", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hansknoechel] [~vijaysingh] Here's a fixed test case, you may want to re-test iOS?\r\n\r\n{code:js}\r\nvar win = Titanium.UI.createWindow({\r\n\tbackgroundColor: 'rgb(255, 255, 0)', // background yellow\r\n});\r\n \r\nwin.addEventListener('click', function() {\r\n\twin.setBackgroundColor('rgba(1.00, 1.00, 1.00, 0.55)'); // background gray\r\n});\r\n \r\nwin.open();\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-02-14T16:57:42.000+0000", "updated": "2017-02-14T16:57:42.000+0000" }, { "id": "407167", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "If Android works like this, we have a more critical parity issue than I thought here. They definitely need to work the same in the future. But that could be handled in an own ticket, where we need to think on how to deprecate properly without removing backwards compatibility.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-02-16T09:21:47.000+0000", "updated": "2017-02-16T09:21:47.000+0000" }, { "id": "419031", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "It has to be from 0-255, on both platforms. See the {{Colors}} section of [the docs|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI] for details.\r\n\r\nRequested PR (6_1_X): https://github.com/appcelerator/titanium_mobile/pull/9011", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-03T16:54:59.000+0000", "updated": "2017-05-03T16:54:59.000+0000" }, { "id": "419033", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "And [~michael]: I think we got confused by your comment about {{rgba(0.3, 1.0, 1.0, 0.1)}}, because the docs say 0-255 and you talked about 0-1. You ok as well with sticking with the 255-bit length?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-03T17:09:10.000+0000", "updated": "2017-05-03T17:09:10.000+0000" }, { "id": "419034", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-05-03T17:17:15.000+0000", "updated": "2017-05-03T17:17:15.000+0000" }, { "id": "419422", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FR Passed, using:\r\nMacOS 10.12 (16A323)\r\nStudio 4.9.0.201704061825\r\nTi SDK 6.1.0.v20170503095848\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.0\r\nAlloy 1.9.11\r\nXcode 8.3.2 (8E2002)\r\n\r\n2-digit float values are accepted on both iOS and Android platforms, for rgb() and rgba().", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-09T22:33:03.000+0000", "updated": "2017-05-09T22:33:03.000+0000" }, { "id": "419425", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Fix verified in builds:\r\n6.1.0.v20170509153815\r\n6.2.0.v20170509154110", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-09T23:14:18.000+0000", "updated": "2017-05-09T23:14:18.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }