{ "id": "174754", "key": "ALOY-1721", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "21006", "name": "CLI Release 8.0.0", "archived": false, "released": true } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-02-25T18:37:21.000+0000", "created": "2020-02-20T16:25:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "20939", "name": "Alloy 1.14.5", "archived": false, "released": true, "releaseDate": "2019-11-27" } ], "issuelinks": [ { "id": "58231", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "174757", "key": "AC-6495", "fields": { "summary": "iOS and Android: Support for Global Vars in Styles (.tss) dropped??", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2020-02-25T18:37:21.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": "h5.Description\r\n\r\nSDK 9 removes the implicit global scope in app.js. We tried to handle this in ALOY-1633, but there was an oversight that the Alloy global can be used in styles which does not get touched by the babel plugin.\r\n\r\nWe need to either figure out how we can inject Alloy if needed, or just fallback to forcing the Alloy global to exist\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Copy the below contents to the right files\r\n\r\n{code: title=alloy.js}\r\nAlloy.Globals.color = 'blue'\r\n{code}\r\n\r\n{code: title=views/index.xml}\r\n\r\n\t\r\n\t\t\r\n\r\n{code}\r\n\r\n{code: title=controllers/index.js}\r\nfunction onClick() {\r\n\t$.UI.create('Window');\r\n}\r\n$.win.open();\r\n{code}\r\n\r\n{code: title=styles/index.tss}\r\n'Window': {\r\n\tbackgroundColor: Alloy.Globals.color\r\n}\r\n{code}\r\n2. Build for any platform/device\r\n3. Tap the window\r\n\r\n\r\nh5.Actual\r\n\r\nRuntime error\r\n\r\nh5.Expected\r\n\r\nBlue window with the label foo", "attachment": [], "flagged": false, "summary": "Styles: Alloy global can no longer be accessed in styles", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "SDK 9.0.0.v20200220034622", "closedSprints": [ { "id": 1180, "state": "closed", "name": "2020 Sprint 4", "startDate": "2020-02-17T09:48:41.834Z", "endDate": "2020-02-28T09:48:00.000Z", "completeDate": "2020-02-28T17:07:21.344Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "454370", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "https://github.com/appcelerator/alloy/pull/955", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-02-20T19:08:57.000+0000", "updated": "2020-02-20T19:08:57.000+0000" }, { "id": "454372", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Alloy PR merged, should be in a preprod CLI (expecting 8.0.0-master.10) in around an hour", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2020-02-20T19:49:02.000+0000", "updated": "2020-02-20T19:49:02.000+0000" }, { "id": "454432", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in CLI 8.0.0-master.10.\r\nClosing.\r\n\r\nStudio Ver: 6.0.0.201911251516\r\nSDK Ver: 9.0.0.v20200224113949\r\nOS Ver: 10.14.5\r\nXcode Ver: Xcode 11.3.1\r\nAppc NPM: 5.0.0-2\r\nAppc CLI: 8.0.0-master.10\r\nDaemon Ver: 3.2.0\r\nTi CLI Ver: 5.2.2\r\nAlloy Ver: 1.14.6\r\nNode Ver: 12.13.1\r\nNPM Ver: 6.12.1\r\nJava Ver: 11.0.1\r\nAndroid Devices: ⇨ google Pixel (Android 10)\r\nIOS Simulator: ⇨ iPhone 11 Pro iOS 13.3\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-02-25T18:37:09.000+0000", "updated": "2020-02-25T18:37:09.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }