{ "id": "97974", "key": "ALOY-127", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "14791", "description": "2012 Sprint 15", "name": "2012 Sprint 15", "archived": true, "released": false }, { "id": "14176", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": false, "released": true, "releaseDate": "2012-12-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-08-02T09:17:33.000+0000", "created": "2012-07-25T08:46:40.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [ { "id": "19614", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "98573", "key": "ALOY-158", "fields": { "summary": "Templates for \"alloy new\"", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": null, "updated": "2018-03-07T22:25:39.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Most apps have one window, or just a couple, but have many views. It would make more sense to me that 'alloy generate view view_name' would generate a View not a Window.", "attachment": [], "flagged": false, "summary": "'alloy generate view' should generate a View not Window", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "210201", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Perhaps we should have something a little more robust than this to allow more power and flexibility. We could have an option or argument to the CLI that lets you specify the type of element you'd like in the generated view. Or we could even have templates for the generated views.\r\n\r\nCouple ideas:\r\n\r\n{code}alloy generate view VIEW_NAME [VIEW_TYPE]{code}\r\nWhere VIEW_TYPE would be an optional argument that gives the top-level view type (i.e., View, Window, TabGroup, etc...)\r\n\r\n{code}alloy generate view VIEW_NAME [-v TEMPLATE]{code}\r\nWhere TEMPLATE could be a view template we would define somewhere in Alloy.\r\n\r\nI think we probably need to define what are the useful \"templates\" for views before making any changes.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-27T09:51:04.000+0000", "updated": "2012-07-27T09:51:04.000+0000" }, { "id": "210203", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I like the template choice. If a View is used though don't we need to wrap in window so we can use it add() and open().", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-27T09:55:43.000+0000", "updated": "2012-07-27T09:55:43.000+0000" }, { "id": "210207", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I don't understand what you mean in your last sentence. The template would dictate which elements are used. Where do add() and open() come into play?", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-27T10:00:34.000+0000", "updated": "2012-07-27T10:00:34.000+0000" }, { "id": "210244", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Tony, both VIEW_TYPE and TEMPLATE would be fantastic. I still think the default (if you omit VIEW_TYPE) should be View not Window! :)\r\n", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2012-07-27T11:15:44.000+0000", "updated": "2012-07-27T11:15:44.000+0000" }, { "id": "210262", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If I create a View and then put a Button in it in index.xml and in the controller index.js I do $.index.open(); that will work? If so forget what what I wrote above.\r\n", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-27T12:59:43.000+0000", "updated": "2012-07-27T12:59:43.000+0000" }, { "id": "210263", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Russ, this is exactly why I brought up the concept of removing the 'view' generator and providing only the \"component\" one. That way your \"TEMPLATE\" would consist not only of the view, but also the style and controller, allowing you construct all 3 files in concert.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-27T13:01:52.000+0000", "updated": "2012-07-27T13:01:52.000+0000" }, { "id": "211202", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "now generates View by default. Initial issue is fixed. Created new issue ALOY-158 to discuss generating based on templates.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-02T09:17:33.000+0000", "updated": "2012-08-02T09:17:33.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }