{ "id": "153821", "key": "TIMOB-20139", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-12-16T19:58:08.000+0000", "created": "2015-12-14T12:56:51.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "3dtouch", "peekandpop", "qe-5.4.0", "tableview" ], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [ { "id": "50140", "type": { "id": "10120", "name": "Gantt: finish-start", "inward": "has to be done after", "outward": "has to be done before" }, "outwardIssue": { "id": "153913", "key": "TIDOC-2405", "fields": { "summary": "Document TableView.previewContext", "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": "None", "id": "6" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "50119", "type": { "id": "10120", "name": "Gantt: finish-start", "inward": "has to be done after", "outward": "has to be done before" }, "inwardIssue": { "id": "153849", "key": "TIDOC-2401", "fields": { "summary": "Docs should make clear previewContext is not supported for TableView atm", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-06-09T18:09:18.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "When attempting to use Peek and Pop with a Tableview previewContext property, no index properties are provided when a row is clicked, making it impossible to display row-specific information / content.\r\n\r\nCode missing TableView implementation:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/a8b6440f99f7d1eb945ba92a1fe3e6602fbcc1ec/iphone/Classes/TiPreviewingDelegate.m#L112-L160", "attachment": [], "flagged": false, "summary": "iOS Peek & Pop: Events do not include itemIndex, sectionIdex, itemId for TableView", "creator": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "environment": null, "closedSprints": [ { "id": 536, "state": "closed", "name": "2015 Sprint 25 SDK", "startDate": "2015-12-05T01:30:40.415Z", "endDate": "2015-12-19T01:30:00.000Z", "completeDate": "2015-12-29T03:19:42.127Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "372823", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Looks like we forgot to implement TIMOB-19763 for TableViews as we did for ListViews.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-14T12:58:37.000+0000", "updated": "2015-12-14T12:58:37.000+0000" }, { "id": "372835", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "We didn't implement the features because we don't support new features for the (legacy) {{Ti.UI.TableView}} anymore. Developers should use {{Ti.UI.ListView}} for new features like peek and pop.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-12-14T15:51:18.000+0000", "updated": "2015-12-14T15:51:18.000+0000" }, { "id": "372838", "author": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "body": "There are sometimes good reasons for using a tableview and to limit the features to list view when it *appears* that it's easy enough to implement with a tableview (I've got a basic version working by using touch start to get the index) doesn't make any sense to me.\r\n\r\nBasically this is forcing us to use listviews for apps where we want peek and pop but that might not be the right list based solution for us -- apparently the fix is quite easy?", "updateAuthor": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "created": "2015-12-14T16:00:43.000+0000", "updated": "2015-12-14T16:06:39.000+0000" }, { "id": "372839", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Well, we did implement it in part:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/a8b6440f99f7d1eb945ba92a1fe3e6602fbcc1ec/iphone/Classes/TiPreviewingDelegate.m#L122-L129\r\n\r\nAnd do document it (by inheritance) here:\r\nhttp://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-property-previewContext\r\n\r\nAnd since there's still quite some use cases which ListView doesn't support I think we do need to add this to TableView as well.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-12-14T16:01:18.000+0000", "updated": "2015-12-14T16:01:18.000+0000" }, { "id": "372841", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The only reason it's in the docs is because we apply it to every TiViewProxy by default from which the table view inherits. We could plan it for some later release, but since we are after code freeze for 5.2, I'm not sure if we should hype this up. \r\n\r\nThe {{Ti.UI.TableView}} will most likely be deprecated in the future, so we encourage developers to migrate the API since 3 years now :-)", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-12-14T16:08:59.000+0000", "updated": "2015-12-14T16:08:59.000+0000" }, { "id": "372842", "author": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "body": "So because of something that could happen \"in the future\" you're not going to solve this problem now?", "updateAuthor": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "created": "2015-12-14T16:11:39.000+0000", "updated": "2015-12-14T16:11:39.000+0000" }, { "id": "372844", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "No, because it's no critical bug right now + we provide an API to fix it on the developer side + we are after code freeze for 5.2.0. Thats why.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-12-14T16:18:59.000+0000", "updated": "2015-12-14T16:18:59.000+0000" }, { "id": "372845", "author": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "body": "wow.\r\n\r\nok. closing ticket.", "updateAuthor": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "created": "2015-12-14T16:20:02.000+0000", "updated": "2015-12-14T16:20:02.000+0000" }, { "id": "372846", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Relax, all good :-) Just means, that it cannot be addressed right now, but for a 5.2.1 Release (or 5.2.0 backport). Since I'm off in december, maybe [~apetkov] can help?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-12-14T16:25:03.000+0000", "updated": "2015-12-14T16:25:03.000+0000" }, { "id": "372848", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "Appc has been going to deprecate TableView for about 3 years now. But keep in mind that TableView and ListView are not interchangeable components. Switching from TableView to ListView can involve significant re-architecting of your app (I know, I just did it and it was a royal pain in the you-know-what). There are many things you can do with TableView that you can't do with ListView. For small lists, the speed advantage of ListView is often not worth the effort compared to the coding and conceptual simplicity of the direct-view-access nature of TableView. ", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2015-12-14T17:14:06.000+0000", "updated": "2015-12-14T17:14:06.000+0000" }, { "id": "372861", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jasonkneen] Hello , I can understand you're fustrated ,however we are currently at code freeze as we have a release coming out very soon. This change will be added to the following release after that, i apologies for the inconvenience this might have caused to your app development. ", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-14T18:10:43.000+0000", "updated": "2015-12-14T18:10:43.000+0000" }, { "id": "372997", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7580\r\n\r\nDocs not updated, since we strongly recommend to use the {{Ti.UI.ListView}} to use Peek and Pop.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-12-15T11:09:21.000+0000", "updated": "2015-12-15T11:09:21.000+0000" }, { "id": "372998", "author": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "body": "But for what reason? Performance or just because it doesn't work out-of-the-box on TableView?\r\n\r\nI've got an app working with existing TableViews, and peek and pop and it's fine -- I had to do a workaround if I wanted to do the peek against the tableview itself -- using touch start to set the index before the peek -- otherwise it's possible to do the peek against the tableview row much like the mail app does.\r\n\r\nThanks for the PR -- assuming this will work fine now for TableViews.", "updateAuthor": { "name": "jasonkneen", "key": "jasonkneen", "displayName": "Jason Kneen", "active": true, "timeZone": "Europe/London" }, "created": "2015-12-15T11:34:55.000+0000", "updated": "2015-12-15T11:54:19.000+0000" }, { "id": "373002", "author": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "body": "[~hansknoechel] You realize that neither http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView nor http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListView state that TableView is in a need-to-be-fixed-only state or that ListView is recommended in place of TableView. It's only with a good bit of digging through the guides that one might find details of your recommendation to use ListView. If you're going to deprecate a component, which you're essentially doing here, that should be clearly documented in the API docs.", "updateAuthor": { "name": "timpoulsen", "key": "timpoulsen", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/Havana" }, "created": "2015-12-15T13:53:59.000+0000", "updated": "2015-12-15T13:53:59.000+0000" }, { "id": "373132", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FT and CR approved. Thanks Hans!\r\n\r\n{code:javascript}\r\nvar actions = [];\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n\r\n// The view to be previewed while popping.\r\nvar previewView = Ti.UI.createView({\r\n backgroundColor: \"blue\"\r\n});\r\n\r\n// The window to be opened after popping the preview.\r\nvar detailWindow = Ti.UI.createWindow({\r\n backgroundColor: \"yellow\"\r\n});\r\n\r\ndetailWindow.add(Ti.UI.createLabel({\r\n text: \"You made it!\"\r\n}));\r\n\r\n// The actions to be added to the preview context.\r\nvar action = Ti.UI.iOS.createPreviewAction({\r\n title: \"Preview Action\",\r\n style: Ti.UI.iOS.PREVIEW_ACTION_STYLE_DEFAULT\r\n});\r\n\r\naction.addEventListener(\"click\", function(e) {\r\n alert(\r\n \"Title: \" + e.title +\r\n \"\\nStyle: \" + e.style +\r\n \"\\nIndex: \" + e.index +\r\n \"\\nSectionIndex: \" + e.sectionIndex +\r\n \"\\nItemIndex: \" + e.itemIndex\r\n );\r\n});\r\n\r\nactions.push(action);\r\n\r\n// Create the preview context\r\nvar context = Ti.UI.iOS.createPreviewContext({\r\n preview: previewView,\r\n actions: actions, // Can have both Ti.UI.iOS.PreviewAction + Ti.UI.iOS.PreviewActionGroup\r\n contentHeight: 300 // When unspecified, we use the available height\r\n});\r\n\r\n// Fired after peeking the preview\r\n// Use this event to configure the preview depending on the sectionIndex / itemIndex\r\ncontext.addEventListener(\"peek\", function(e) {\r\n Ti.API.warn(\"sectionIndex: \" + e.sectionIndex);\r\n Ti.API.warn(\"itemIndex: \" + e.itemIndex);\r\n});\r\n\r\n// Fired after popping the preview\r\ncontext.addEventListener(\"pop\", function(e) {\r\n detailWindow.open();\r\n});\r\n\r\n// Assign the preview context\r\n\r\n\r\nvar section1 = Ti.UI.createTableViewSection({\r\n headerTitle: \"Section 1\"\r\n});\r\n\r\nvar section2 = Ti.UI.createTableViewSection({\r\n headerTitle: \"Section 2\"\r\n});\r\n\r\n\r\nfor(var i = 1; i <= 5; i++) {\r\n section1.add(Ti.UI.createTableViewRow({ title: 'Item'+i }));\r\n section2.add(Ti.UI.createTableViewRow({ title: 'Item'+i }));\r\n}\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n previewContext \t: context, // Will be ignored on unsupported devices\r\n data \t\t\t: [section1, section2]\r\n});\r\n\r\nwin.add(tableView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-16T19:56:42.000+0000", "updated": "2015-12-16T19:57:38.000+0000" }, { "id": "387964", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed as an improvement.
\r\nTested on:
\r\niPhone 6s Plus (9.3.1)\r\nMac OSX El Capitan 10.11.4\r\nStudio: 4.7.0.201606070951\r\n
Ti SDK: 5.4.0.v20160608165242\r\n
Appc NPM: 4.2.7-2\r\nAppc CLI: 5.4.0-13\r\n
Xcode 7.3\r\nNode v0.12.7\r\n*Closing Ticket.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-06-09T18:08:45.000+0000", "updated": "2016-06-09T18:08:45.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }