{ "id": "174757", "key": "AC-6495", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2020-02-21T10:34:04.000+0000", "created": "2020-02-21T03:21:02.000+0000", "labels": [], "versions": [], "issuelinks": [ { "id": "58231", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "174754", "key": "ALOY-1721", "fields": { "summary": "Styles: Alloy global can no longer be accessed in styles", "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": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-02-21T10:34:04.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Titanium SDK 9.0.0.v20200220034622\r\n\r\nHappens in both iOS and Android\r\n\r\nPlease add:\r\n{code:javaScript}\r\nvar Alloy = Alloy || require('/alloy');\r\n{code}\r\n\r\nto the build process in the contents of the styles folder\r\n\r\nwe have styles declared as Global vars accessible via Alloy.Globals:\r\n\r\nE.g.\r\n{code:javaScript}\r\n bottom: Alloy.Globals.Styles.NAV_BAR_BUTTONS_BOTTOM_PADDING,\r\n height: Alloy.Globals.Styles.NAV_BAR_BUTTONS_HEIGHT,\r\n touchFeedbackColor: Alloy.Globals.Colors.CALL_TO_ACTION\r\n{code}\r\n\r\nWe didn't notice issues whilst internally testing but later when released to Production we are capturing these JS errors:\r\n{code:javaScript}\r\naction: create, \r\nbubbles: False, \r\ncancelBubble: False, \r\ncolumn: 172, \r\ncontroller: api/mobile_app/v1/errors/reports, \r\nformat: json, \r\njavascriptStack: \r\nReferenceError: Alloy is not defined\r\n at /alloy/styles/calendar.js:1:172\r\n at Module._runScript (ti:/module.js:587:9)\r\n at Module.load (ti:/module.js:106:7)\r\n at Module.loadJavascriptText (ti:/module.js:436:9)\r\n at Module.loadAsFile (ti:/module.js:488:15)\r\n at Module.loadAsFileOrDirectory (ti:/module.js:410:20)\r\n at Module.require (ti:/module.js:245:23)\r\n at Module.global.Module.require (:19311:34)\r\n at require (ti:/module.js:550:15)\r\n at Object.exports.createStyle (/alloy.js:263:1)\r\n{code}\r\n\r\nPlease note that error occurs in: *{color:red}/alloy/styles/calendar.js:1:172{color}*\r\nwhich is a .tss file compiled to .js\r\n\r\nIt is breaking some minor functionality in the app.", "attachment": [], "flagged": false, "summary": "iOS and Android: Support for Global Vars in Styles (.tss) dropped??", "creator": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "subtasks": [], "reporter": { "name": "fahad86", "key": "fahad86", "displayName": "Muhammad Ahmed Fahad", "active": true, "timeZone": "Asia/Shanghai" }, "environment": null, "comment": { "comments": [ { "id": "454382", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~fahad86] this is an unintended regression due to changes in SDK 9. We've fixed it in ALOY-1721and are aiming to release a CLI RC with the fix next week, you could probably workaround this yourself for now by adding the below to your alloy.js\r\n\r\n{code}\r\nglobal.Alloy = Alloy;\r\nglobal._ = _;\r\nglobal.Backbone = Backbone;\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-02-21T10:22:31.000+0000", "updated": "2020-02-21T10:23:56.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }