{ "id": "117491", "key": "ALOY-755", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-07-23T16:00:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "alloy", "styles" ], "versions": [ { "id": "15402", "description": "Alloy 1.2.0, concurrent with SDK 3.1.0", "name": "Alloy 1.2.0", "archived": false, "released": true, "releaseDate": "2013-08-15" }, { "id": "16595", "name": "Alloy 1.5.1", "archived": false, "released": true, "releaseDate": "2014-10-01" } ], "issuelinks": [ { "id": "30352", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "117489", "key": "ALOY-756", "fields": { "summary": "Alloy dynamic styling: access global app raw styles", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2019-11-07T00:38:59.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "While reading raw styles arrays is possible in alloy 1.2, modifying them does not affect to new alloy controllers created by Alloy.createController() or Alloy.createWidget().\r\n\r\nThis is due to default styles are hardcoded when alloy code is pre-compiled to titanium.\r\n\r\nInstead of that, we have to use the new alloy method $.UI.create('component', style).\r\n\r\nBut to force using $.UI.create() means to create the UI from the controller file, so all the powerful and flexibility of xml+tss files is lost.\r\n\r\nInstead of that, I suggest that modifying the raw styles overwrites the default styles hardcoded by alloy. I understand this is not a trivial feature, but I think this behavior is more in the line of what Alloy is and what means for the developers.\r\n\r\nAs an example, if I have a class called \"H1\" and I modify it, I expect that all new components using that class will be affected and will use the new style.\r\n\r\nRelated to TC-2646, the ideal would be that, if the style is in the global styles array, that style would be also inherited by every controller using that class.\r\n\r\nDiscussion and examples can be found at http://developer.appcelerator.com/question/155135/alloy-dynamic-styling-access-app-raw-style-and-edit-styles", "attachment": [], "flagged": false, "summary": "Alloy dynamic styling: modify raw styles should affect new alloy controllers", "creator": { "name": "jaraen", "key": "jaraen", "displayName": "Javier Rayon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "alloy 1.2", "comment": { "comments": [ { "id": "289668", "author": { "name": "janhelleman", "key": "janhelleman", "displayName": "Jan Helleman", "active": true, "timeZone": "Europe/Berlin" }, "body": "Is there any news or thoughts on this and the related issues matter? I'd like to modify styles in a mass yet localizable way. When I'd use an applyStyle kind of function I would lose most of the Alloy structuring plus it would make a mess of a code...", "updateAuthor": { "name": "janhelleman", "key": "janhelleman", "displayName": "Jan Helleman", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-01-24T23:02:53.000+0000", "updated": "2014-01-24T23:02:53.000+0000" }, { "id": "311811", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "I want to do this as well. Creating skins (say, a light and a dark theme) is quite cumbersome without being able to do this.", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2014-07-01T16:32:12.000+0000", "updated": "2014-07-01T16:32:12.000+0000" }, { "id": "342764", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Implementing this would require some potentially significant re-architecting of Alloy. I'm afraid it's not on our roadmap in the near-term. ", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2015-02-10T15:08:28.000+0000", "updated": "2015-02-10T15:08:28.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }