{ "id": "168104", "key": "TIMOB-24776", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-06-29T08:05:58.000+0000", "created": "2017-06-05T23:02:31.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "demo_app" ], "versions": [], "issuelinks": [ { "id": "55193", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "168379", "key": "TIMOB-24817", "fields": { "summary": "Android: ListView item template support CommonJS modules", "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 } } } }, { "id": "56949", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "172515", "key": "TIMOB-26498", "fields": { "summary": "Windows: ListView item template support CommonJS modules and Alloy 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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "55065", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "118966", "key": "ALOY-1518", "fields": { "summary": "ListView: Custom widget support in templates", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "56954", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "172518", "key": "TIMOB-26499", "fields": { "summary": "iOS: Third-party modules cannot be referenced anymore in Alloy templates", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "55093", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "117333", "key": "TIMOB-15091", "fields": { "summary": "iOS: Cannot use a module when using a listview childtemplates", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "56623", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171810", "key": "TIMOB-26138", "fields": { "summary": "Android: Cannot use a module when using a listview childtemplates", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2018-11-14T22:51:57.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "According to [http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem], the ListView item template only supports a limited set of view classes from the Ti.UI namespace. The {{type}} property sets the Ti.UI view to be used, i.e 'Ti.UI.Label' \r\n{code}\r\nvar template = {\r\n childTemplates: [\r\n { \r\n type: 'Ti.UI.ImageView', \r\n bindId: '',\r\n properties: { }\r\n },\r\n { \r\n type: 'Ti.UI.Label', \r\n bindId: '',\r\n properties: { }\r\n }\r\n // supported views http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem\r\n ],\r\n events: { }\r\n};\r\n{code}\r\n\r\nInstead of composing the listview's UI repeatedly, I would like to be able to use a javascript module in list template, i.e:\r\n{code:title=customRow.js}\r\nfunction Controller() {\r\n var $ = this;\r\n $.__views.container = Ti.UI.createView({\r\n layout: \"horizontal\",\r\n width: Ti.UI.SIZE,\r\n backgroundColor: \"transparent\"\r\n });\r\n $.__views.rname = Ti.UI.createLabel({\r\n text: \"row\"\r\n });\r\n $.__views.rimg = Ti.UI.createImageView({\r\n image: 'img.png'\r\n });\r\n $.__views.container.add($.__views.rname);\r\n $.__views.container.add($.__views.rimg);\r\n _.extend($, $.__views);\r\n _.extend($, exports);\r\n}\r\nmodule.exports = Controller;\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS: ListView item template support CommonJS modules", "creator": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "subtasks": [], "reporter": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "environment": null, "closedSprints": [ { "id": 1045, "state": "closed", "name": "2018 Sprint 13 SDK", "startDate": "2018-06-17T20:47:13.621Z", "endDate": "2018-07-01T20:47:00.000Z", "completeDate": "2018-07-02T18:40:05.029Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "433551", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello [~hknoechel] - I need you to scope this out and determine how much effort.\r\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-01-23T22:40:23.000+0000", "updated": "2018-01-23T22:40:23.000+0000" }, { "id": "433574", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The reason why we don't support is because of the general ListView architecture and it's proxy handling. Compared to the Ti.UI.TableView which is able to do this, the Ti.UI.ListView does not really reference the proxies in every row but has a virtual representation of them, making the ListView performing as great as it does. This is also the reason why events are abstracted as well and the number of UI elements supported by the ListView are limited. By allowing to require templates, we would basically need to remove that generic handling again and allow direct proxy-references in the ListView, making it not much better than the Ti.UI.TableView architecture.\r\n\r\nLet me know your thoughts, but I'd really speak out against this. And regarding TIMOB-15091, I think it should be doable without this change by whitelisting module views in the list of allowed UI elements. \r\n\r\n*EDIT*: Being more specific, I could think of the following adjustment that may be doable:\r\n{code:js}\r\n{\r\n type: 'View', // Resolves to TiMapViewProxy which is valid view-proxy inside ti.map\r\n module: 'TiMap', \r\n bindId: '',\r\n properties: { }\r\n}\r\n{code}\r\n\r\n*EDIT 2*: Seems to work, lets discuss this!\r\n\r\n*EDIT 3*: PR is up in TIMOB-15091, awaiting Android parity to complete task.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-24T09:13:34.000+0000", "updated": "2018-01-24T10:28:06.000+0000" }, { "id": "434825", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Will this also work for non-native modules? Eg. a reusable commonjs component that's composed of multiple view proxies.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2018-02-23T17:07:08.000+0000", "updated": "2018-02-23T17:07:08.000+0000" }, { "id": "435826", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] per Feon's question, can this work with non-native modules? I've scheduled this for 7.2.0, is that doable?", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-21T22:19:21.000+0000", "updated": "2018-03-21T22:19:21.000+0000" }, { "id": "438679", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/10131", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-06-25T19:20:16.000+0000", "updated": "2018-06-25T19:20:16.000+0000" }, { "id": "443607", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.5.0.v20181114112657.\r\nClosing.\r\n\r\nStudio Ver: 5.1.2.201810301430\r\nSDK Ver: 7.5.0.v20181114112657\r\nOS Ver: 10.14\r\nXcode Ver: Xcode 10.1\r\nAppc NPM: 4.2.13\r\nAppc CLI: 7.0.8-master.4\r\nDaemon Ver: 1.1.3\r\nTi CLI Ver: 5.1.1\r\nAlloy Ver: 1.13.4\r\nNode Ver: 8.9.1\r\nNPM Ver: 5.5.1\r\nJava Ver: 10.0.2\r\nIOS Simulator: Iphone 8 IOS 12.1", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-11-14T22:51:50.000+0000", "updated": "2018-11-14T22:51:50.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }