{ "id": "174203", "key": "TIMOB-27501", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-08-03T20:42:58.000+0000", "created": "2019-10-01T16:11:31.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [ { "id": "57850", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "173841", "key": "TIMOB-27209", "fields": { "summary": "iOS: Be able to determine dark / light mode, as well as changes on it", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "57851", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "174156", "key": "TIMOB-27519", "fields": { "summary": "Android: Semantic Colors with alpha value", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2020-08-03T20:42:58.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": [], "description": "A developer should be able to check the current {{Configuration.UI_MODE_NIGHT_MASK}}, i.e. dark theme vs light theme.", "attachment": [ { "id": "67038", "filename": "0001-feat-android-semantic-colors-and-night-mode.patch", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2019-10-10T09:52:43.000+0000", "size": 8569, "mimeType": "text/x-patch" } ], "flagged": false, "summary": "Android: Be able to determine dark / light theme, as well as changes on it", "creator": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "subtasks": [], "reporter": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "environment": null, "closedSprints": [ { "id": 1177, "state": "closed", "name": "2020 Sprint 2", "startDate": "2020-01-20T17:44:37.733Z", "endDate": "2020-01-31T17:44:00.000Z", "completeDate": "2020-01-31T16:57:44.689Z", "originBoardId": 114 }, { "id": 1194, "state": "closed", "name": "2020 Sprint 9", "startDate": "2020-04-24T17:09:51.572Z", "endDate": "2020-05-08T17:09:00.000Z", "completeDate": "2020-05-08T15:40:07.869Z", "originBoardId": 114 }, { "id": 1179, "state": "closed", "name": "2020 Sprint 3", "startDate": "2020-02-03T16:58:00.000Z", "endDate": "2020-02-14T16:58:00.000Z", "completeDate": "2020-02-17T09:45:06.128Z", "originBoardId": 114 }, { "id": 1195, "state": "closed", "name": "2020 Sprint 10", "startDate": "2020-05-08T16:37:58.282Z", "endDate": "2020-05-22T16:37:00.000Z", "completeDate": "2020-05-21T15:26:11.089Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "451742", "author": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "body": "Documentation: https://developer.android.com/guide/topics/ui/look-and-feel/darktheme\r\n\r\nSample code for the patch:\r\n\r\n{code:java}\r\nconst colorset = require('/semantic.colors.json');\r\nif (Ti.UI.Android) {\r\n const mode = Ti.UI.Android.nightModeStatus;\r\n if (mode === Ti.UI.Android.MODE_NIGHT_YES) {\r\n Ti.UI.semanticColorType = Ti.UI.SEMANTIC_COLOR_TYPE_DARK;\r\n } else {\r\n Ti.UI.semanticColorType = Ti.UI.SEMANTIC_COLOR_TYPE_LIGHT;\r\n }\r\n}\r\n\r\nObject.keys(colorset).forEach(name => {\r\n Alloy.CFG.color[name] = Ti.UI.fetchSemanticColor(name);\r\n});\r\n{code}\r\n\r\nAlso patch provides additional build step for android: color resources (xml) are generated from \"semantic.colors.json\" ({{res/values/values.xml}} for \"light\" colors and {{res/values-night/values-night.xml}} for \"dark\"). This allows to define colors one time in \"semantic.colors.json\" and then use them in android xml-theme.", "updateAuthor": { "name": "s.volkov", "key": "s.volkov", "displayName": "Sergey Volkov", "active": true, "timeZone": "Europe/Moscow" }, "created": "2019-10-01T17:01:22.000+0000", "updated": "2019-10-10T10:32:10.000+0000" }, { "id": "453854", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "I've started to look into this, because the iOS side had some funkiness to it as well.\r\n\r\nWe should have a cross-platform API to query for whether we're in dark/night mode versus normal/light mode. We had a property off the {{Ti.App.iOS}} namesake for iOS. We also had an API in {{Ti.UI.fetchSemanticColor}} that was problematic as it'd return different types based on OS/OS version - and one of the types was entirely undocumented.\r\n\r\nI'm in the process of trying to cleaning that up, incorporating [~s.volkov]'s PR changes for Android support, and trying to get the docs right around the previously undocumented proxy type it returns.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-28T15:40:21.000+0000", "updated": "2020-01-28T15:40:21.000+0000" }, { "id": "453862", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "WIP PR: https://github.com/appcelerator/titanium_mobile/pull/11457", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-28T19:26:51.000+0000", "updated": "2020-01-28T19:26:51.000+0000" }, { "id": "453863", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "WIP PR: https://github.com/appcelerator/titanium_mobile/pull/11457", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-28T19:26:51.000+0000", "updated": "2020-01-28T19:26:51.000+0000" }, { "id": "455417", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-05-08T22:36:00.000+0000", "updated": "2020-05-08T22:36:00.000+0000" }, { "id": "456327", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified on:\r\nMac OS: 10.15.4\r\nSDK: 9.1.0.v20200727104531\r\nAppc CLI: 8.1.0-master.7\r\nJDK: 11.0.4\r\nNode: 10.17.0\r\nStudio: 6.0.0.202005141803\r\nXcode: 12.0 beta\r\nDevice: iPhone X(v13.4), iOS simulator 13.5, Pixel 3(v10.0), Pixel 2 emulator(v10.0)", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-08-03T20:42:58.000+0000", "updated": "2020-08-03T20:42:58.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }