{ "id": "104875", "key": "ALOY-378", "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": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-05-02T00:06:06.000+0000", "created": "2012-11-13T15:44:44.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "notable", "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "37205", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "129866", "key": "TIDOC-1652", "fields": { "summary": "Alloy: add description for Themes support to Widgets", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-05-29T05:02:20.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": "12329", "name": "Runtime", "description": "Generic bucket for uncategorized runtime issues" }, { "id": "12333", "name": "Widgets" }, { "id": "12326", "name": "XML", "description": "View XML and parsing" } ], "description": null, "attachment": [], "flagged": false, "summary": "Widget themes", "creator": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 50, "state": "closed", "name": "2014 Sprint 09 Tooling", "startDate": "2014-04-28T15:43:24.381Z", "endDate": "2014-05-10T03:44:00.000Z", "completeDate": "2014-05-12T13:36:16.254Z", "originBoardId": 113 } ], "comment": { "comments": [ { "id": "231025", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I want this ;)\r\n\r\nIt could be as easy as:\r\n\r\n{code}\r\nthemes/MyTheme/widgets/MyWidget/views/widget.xml\r\n -> Overwrites: widgets/MyWidget/views/widget.xml\r\nthemes/MyTheme/widgets/MyWidget/assets/icon.png\r\n -> Overwrites: widgets/MyWidget/assets/icon.png\r\nthemes/MyTheme/widgets/MyWidget/styles/widget.tss\r\n -> Overwrites: widgets/MyWidget/styles/widget.tss\r\n{code}", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-12-12T12:39:26.000+0000", "updated": "2012-12-12T12:39:26.000+0000" }, { "id": "231027", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It would be slightly more complex, as themes will not just overwrite styles, but will instead merge with them. This will prevent a developer from having to rewrite a whole style file in order to theme it. You can just change as many or as few characteristics of the style as you like.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-12T14:11:21.000+0000", "updated": "2012-12-12T14:11:21.000+0000" }, { "id": "231028", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "@Tony I get that, but I assume you have the logic for merging TSS already in place so I just meant 'easy' as in 'same story, other paths'.\r\n\r\nAnd concerning theming a widget's view; that you can't merge obviously and should just overwrite, like assets.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-12-12T14:30:40.000+0000", "updated": "2012-12-12T14:30:40.000+0000" }, { "id": "231412", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Mmmm, maybe I know how to make it more difficult :)\r\n\r\nI'm using Alloy widgets for small UI components like pull-to-refresh. I use these on multiple places within the same app. Now, if I want to theme e.g. the pullToRefresh widget in different ways for different places it's being used in, the solution I proposed isn't sufficient.\r\n\r\nMaybe we can add an optional subfolder structure, named after the controller the widget is used in:\r\n\r\n{code}\r\nthemes/MyTheme/widgets/MyWidget/styles/widget.tss\r\n -> Merges with the default style at all places where this widget is being used.\r\nthemes/MyTheme/widgets/MyController/MyWidget/styles/widget.tss\r\nOR themes/MyTheme/widgets/MyWidget/MyController/styles/widget.tss\r\n -> Merges with the style resulting from the main theming of the widget.\r\n{code}\r\n\r\nDoes this make any sense?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-12-14T13:53:28.000+0000", "updated": "2012-12-14T13:53:28.000+0000" }, { "id": "239865", "author": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "body": "+1 on this request. I've got a widget (custom tab group) and need to easily change the design based on themes.", "updateAuthor": { "name": "matthewcongrove", "key": "matthewcongrove", "displayName": "Matthew Congrove", "active": true, "timeZone": "America/Chicago" }, "created": "2013-02-26T20:49:29.000+0000", "updated": "2013-02-26T20:49:29.000+0000" }, { "id": "239987", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "A workaround can be found at: https://github.com/FokkeZB/Alloy-Theming-Widgets", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2013-02-27T12:42:34.000+0000", "updated": "2013-02-27T12:42:34.000+0000" }, { "id": "243023", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Out of curiousity, how dynamic is dynamic? Is there any possibility that this restyling feature is something that can be done at compile time (if not now, but in the future)?", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-19T20:34:07.000+0000", "updated": "2013-03-19T20:34:07.000+0000" }, { "id": "243024", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Blain, that's essentially how it will take place initially. Later once dynamic styling is incorporated we'll build in a means to make this change at runtime.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-19T20:48:40.000+0000", "updated": "2013-03-19T20:48:40.000+0000" }, { "id": "280349", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "This is something that would really help me automate a few things that always need manual changes or poorly used syntax/location of resolution.\r\n\r\nHoping this becomes a priority. ", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2013-11-20T17:39:37.000+0000", "updated": "2013-11-20T17:39:37.000+0000" }, { "id": "301251", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR: https://github.com/appcelerator/alloy/pull/365\n\nFunctional test\n\n1. Run the ALOY 378 test app included in the PR. It uses a theme, which is applied to the tableview and starrating widget.\n2. Confirm that the theme was applied correctly:\n\n* On all platforms: \n** Labels in the tableview will be red, rows will be 50dp high (set via the theme using existing theming functionality)\n** In the widget, the star on, off, and half images used by the widget will be replaced with a plus, minus, and empty-circle set of images\n** star images are distorted by having a height and width applied from the theme\n* On iOS: \n** the half-star image used by the widget will be replaced by an Appcelerator logo\n** star images will have a yellow background color applied", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-04-17T16:17:58.000+0000", "updated": "2014-04-17T16:17:58.000+0000" }, { "id": "301928", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR merged", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-04-21T18:56:21.000+0000", "updated": "2014-04-21T18:56:21.000+0000" }, { "id": "303158", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "From the QE: \"non-platform-specific assets from a theme should not overwrite those from a widget's platform-specific folders.\" Reopening to update asset priorities.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-05-01T14:15:50.000+0000", "updated": "2014-05-01T14:15:50.000+0000" }, { "id": "303195", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "New PR: https://github.com/appcelerator/alloy/pull/381 \r\n\r\nI've updated the https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-378 test app to include the platform-specific asset within the widget.\r\n\r\nFunctional test: build the app, the star.png asset (a star) from the widget's platform (ios) folder should overwrite the star.png (a plus-sign) from the theme.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-05-01T17:50:13.000+0000", "updated": "2014-05-01T17:52:13.000+0000" }, { "id": "303266", "author": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed and working as expected with the PR https://github.com/appcelerator/alloy/pull/381\r\n\r\nTiSDK 3.3.0.v20140430151716 \r\nAlloy 1.4.0-dev\r\nAppcelerator Studio 3.3.0.201404301307\r\nCLI 3.3.0-dev\r\n\r\nClosing.", "updateAuthor": { "name": "fcasali", "key": "fcasali", "displayName": "Federico Casali", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-01T23:41:46.000+0000", "updated": "2014-05-01T23:41:46.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }