{ "id": "125751", "key": "TIMOB-16355", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" }, { "id": "17684", "name": "Release 5.2.1", "archived": false, "released": true, "releaseDate": "2016-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-03-14T22:19:25.000+0000", "created": "2014-02-02T19:16:45.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "listview", "qe-5.2.0", "separatorinsets", "tableview" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [ { "id": "35921", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "127773", "key": "TIMOB-16642", "fields": { "summary": "iOS: separatorInsets are ignored when using TableView SearchBar", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-24T22:31: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": "The new {{separatorInsets}} can only be set for the full {{TableView}} or {{ListView}}. Unfortunately, they affect not only the separator lines, but also the section {{headerTitle}} and {{footerTitle}} while at the same time the {{TableView}} and {{ListView}} direct {{headerTitle}} and {{footerTitle}} are **not** affected.\r\n\r\nI would suggest changing the behavior for the section {{headerTitle}} and {{sectionTitle}} to be not affected as well. You can always use a custom header and footer view and the main reason for {{seperatorInsets}} is to disable/customize the inset of the separator line in iOS7 and up.\r\n\r\nh1. To reproduce\r\nRun both of this {{app.js}} both with and without the {{separatorInsets}} property and compare the screenshots attached:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff'\r\n});\r\n\r\nvar sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit headerTitle', footerTitle: 'Fruit footerTitle' });\r\nsectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));\r\nsectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));\r\n\r\nvar sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables headerTitle', footerTitle: 'Vegetables footerTitle' });\r\nsectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));\r\nsectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));\r\n\r\nvar table = Ti.UI.createTableView({\r\n\ttop: 20,\r\n\tstyle: Ti.UI.iPhone.TableViewStyle.GROUPED,\r\n\theaderTitle: 'Table headerTitle',\r\n\tfooterTitle: 'Table footerTitle',\r\n\r\n // On second run remove this property\r\n\tseparatorInsets: {\r\n\t\tleft: 0, right: 0\r\n\t},\r\n\r\n\tdata: [sectionFruit, sectionVeg]\r\n});\r\n\r\nwin.add(table);\r\nwin.open();\r\n{code}", "attachment": [ { "id": "45549", "filename": "iOS-simulatorschermafbeelding 2 feb. 2014 20.10.58.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-02-02T19:16:45.000+0000", "size": 57323, "mimeType": "image/png" }, { "id": "45550", "filename": "iOS-simulatorschermafbeelding 2 feb. 2014 20.16.18.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2014-02-02T19:16:45.000+0000", "size": 57529, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: separatorInsets should not be used for header/section titles", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "CLI/SDK 3.2.0.GA", "closedSprints": [ { "id": 529, "state": "closed", "name": "2015 Sprint 24 SDK", "startDate": "2015-11-21T01:30:12.670Z", "endDate": "2015-12-05T01:30:00.000Z", "completeDate": "2015-12-07T03:57:17.094Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "290837", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with 3.2.0 release.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-03T06:04:45.000+0000", "updated": "2014-02-03T06:04:45.000+0000" }, { "id": "319871", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduced with SDK Version 3.2.0 GA, 3.2.2 GA and SDK 3.4.0 GA\r\n\r\nCLI version 3.3.0, \r\nTitanium SDK version 3.4.0 \r\nTitanium SDK version 3.2.0 \r\niOS SDK: 7.1 \r\nAppcelerator Studio, build: 3.3.0.201407111535", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-22T06:47:22.000+0000", "updated": "2014-08-22T06:47:22.000+0000" }, { "id": "367090", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Wouldn't it be fixed if we only apply the insets on the cells and not the table view?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-10-18T08:39:31.000+0000", "updated": "2015-10-18T08:39:31.000+0000" }, { "id": "367097", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "That would disallow the user to set the section insets if he wants. But rather be the \"quick and dirty\" way.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-10-18T19:00:39.000+0000", "updated": "2015-10-18T19:00:39.000+0000" }, { "id": "367118", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I remember that this property was only implemented for users to be able to revert the change in iOS 8 where it started showing these line insets by default. This is also in the docs:\r\n\r\n{quote}In iOS 7 and later, cell separators do not extend all the way to the edge of the list view. This property sets the default inset for all cells in the table.{quote}\r\n\r\nSo I don't think it's a problem if we make it not apply to the section header/footer titles anymore.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-10-19T06:43:40.000+0000", "updated": "2015-10-19T06:43:40.000+0000" }, { "id": "368578", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Alright, let's get this into 5.2.0. [~cng] ok?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-02T05:37:32.000+0000", "updated": "2015-11-02T05:37:32.000+0000" }, { "id": "371976", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Implemented rowSeparatorInsets and tableSeparatorInsets properties. If the rowSeparatorInsets is not set upon creation the inset for the cell will be the same as the header and footer as it is currently. If it's set however, it will set the cell inset to the left and right values of rowSeparatorInsets. The property can be set upon creation only because its applied to each cell as they are created.\r\n\r\nPR pending https://github.com/appcelerator/titanium_mobile/pull/7534/files.\r\n{code:title=DemoCode.javascript|borderStyle=solid}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n \r\nvar sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit headerTitle', footerTitle: 'Fruit footerTitle' });\r\nsectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));\r\nsectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));\r\n \r\nvar sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables headerTitle', footerTitle: 'Vegetables footerTitle' });\r\nsectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));\r\nsectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));\r\n \r\nvar table = Ti.UI.createTableView({\r\n top: 20,\r\n style: Ti.UI.iPhone.TableViewStyle.GROUPED,\r\n headerTitle: 'Table headerTitle',\r\n footerTitle: 'Table footerTitle',\r\n \r\n // // On second run remove this property\r\n separatorInsets: {\r\n left: 100, right: 100\r\n },\r\n\r\n rowSeparatorInsets: {\r\n left: 30, right: 30\r\n },\r\n \r\n data: [sectionFruit, sectionVeg]\r\n});\r\n\r\ntable.addEventListener(\"scrollend\",function(e) {\r\n Ti.API.info(\"Inside event\");\r\n table.setRowSeparatorInsets({left: 50, right:50});\r\n});\r\n \r\nwin.add(table);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-02T23:50:31.000+0000", "updated": "2015-12-02T23:52:41.000+0000" }, { "id": "372003", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~apetkov] so according to your sample code, the expected behavior of setRowSeperatorInsets in the event \"scrollend\" is that it does nothing correct? ", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-03T03:13:46.000+0000", "updated": "2015-12-03T03:14:08.000+0000" }, { "id": "372075", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yeah it should have no effect to the behavior. ", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-03T17:33:11.000+0000", "updated": "2015-12-03T17:33:11.000+0000" }, { "id": "372128", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "CR and FT passed. PR Merged!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-12-04T03:18:23.000+0000", "updated": "2015-12-04T03:18:23.000+0000" }, { "id": "375763", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, setting {{rowSeparatorInsets}} property does not influence the position of header / section titles, if the property is not set - but instead {{separatorInsets}} - header / section titles will be influenced. \r\n\r\nTested on:\r\n\r\niPhone 6s Plus Device (9.2)\r\n\r\nMac OSX El Capitan 10.11 (15A284)\r\nAppc Studio: 4.5.0.201601262138\r\nTi SDK: 5.2.0.v20160202103508\r\nAppc NPM: 4.2.3-1\r\nApp CLI: 5.2.0-239\r\nXcode 7.2\r\nNode v4.2.3\r\n\r\n*Closing Ticket.*\r\n\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-02T21:11:34.000+0000", "updated": "2016-02-02T21:11:34.000+0000" }, { "id": "378048", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reopening the ticket, because the deprecation warning {{Ti.UI.TableView.separatorInsets DEPRECATED in 6.0.0, in favor of Ti.UI.TableView.tableSeparatorInsets}} is currently (5.2.0.GA) shown. Fix + backport to adjust the deprecation:\r\n\r\nPR (master): https://github.com/appcelerator/titanium_mobile/pull/7782\r\nPR (5_2_X): https://github.com/appcelerator/titanium_mobile/pull/7783\r\n\r\nSteps to test: Run the above demo code using 5.2.0.GA, 5.2.x and master branch, check the logs.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-27T14:09:28.000+0000", "updated": "2016-02-27T14:09:28.000+0000" }, { "id": "378388", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11.3 (15D21)\r\nStudio 4.5.0.201602170821\r\nTi SDK 5.2.1.v20160228190750\r\nAppc NPM 4.2.3\r\nAppc CLI 5.2.0\r\nAlloy 1.7.33\r\nXcode 7.2 (7C68)\r\n\r\nBehavior is as Harry describes, however the deprecation warning now properly states that Ti.UI.TableView.separatorInsets are deprecated in 5.2.0. Tested using provided test code", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-01T23:24:13.000+0000", "updated": "2016-03-01T23:24:13.000+0000" }, { "id": "379466", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Reopening since the issue calls for both TableView and ListView to be fixed but the merged PRs only contain fixes for TableView.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-03-10T18:34:27.000+0000", "updated": "2016-03-10T18:34:27.000+0000" }, { "id": "379474", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR(Master):https://github.com/appcelerator/titanium_mobile/pull/7843\r\nPR(5_2_X):https://github.com/appcelerator/titanium_mobile/pull/7829\r\n\r\nDemo code: \r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar sections = [];\r\nvar sectionFruit = Ti.UI.createListSection({ headerTitle: 'Fruit headerTitle',});\r\nvar fruitDataSet = [\r\n {properties: { title: 'Apple'}},\r\n {properties: { title: 'Banana'}},\r\n];\r\nsectionFruit.setItems(fruitDataSet);\r\nsections.push(sectionFruit);\r\n \r\nvar sectionVeg = Ti.UI.createListSection({ headerTitle: 'Vegetables headerTitle'});\r\nvar vegDataSet = [\r\n {properties: { title: 'Carrots'}},\r\n {properties: { title: 'Potatoes'}},\r\n];\r\nsectionVeg.setItems(vegDataSet);\r\nsections.push(sectionVeg);\r\n \r\nvar listView = Ti.UI.createListView({\r\n top: 20,\r\n headerTitle: 'Table headerTitle',\r\n footerTitle: 'Table footerTitle',\r\n \r\n separatorInsets: {\r\n left: 50, right: 50\r\n },\r\n \r\n rowSeparatorInsets: {\r\n left: 30, right: 30\r\n },\r\n \r\n});\r\n listView.sections = sections;\r\n listView.addEventListener(\"itemclick\",function(e){\r\n Ti.API.info(\"here\");\r\n listView.setSeparatorInsets({left: 50, right: 50});\r\n\r\n });\r\n \r\nwin.add(listView);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-10T21:43:00.000+0000", "updated": "2016-03-17T21:49:07.000+0000" }, { "id": "379694", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bump. Review?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-14T22:02:23.000+0000", "updated": "2016-03-14T22:02:23.000+0000" }, { "id": "379938", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "A couple things noticed when using the most recent sample code, with this environment:\r\n\r\nMacOS 10.11.3 (15D21)\r\nStudio 4.5.0.201602170821\r\nTi SDK 5.2.1.v20160316113102\r\nAppc NPM 4.2.4-2\r\nAppc CLI 5.2.1-12\r\nAlloy 1.7.35\r\nXcode 7.2.1 (7C1002)\r\n\r\n1. The property added to ListView is tableSeparatorInsets. I would expect the property be called listSeparatorInsets. Anyone agree?\r\n2. I do not see the deprecation warning when using separatorInsets with ListViews, as I do with TableViews.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-16T23:43:10.000+0000", "updated": "2016-03-16T23:43:10.000+0000" }, { "id": "379943", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~ewieber] Hi, yeah i agree we should change the name to listSeparatorInsets, ill do a PR to change the name and updated the docs. As for the deprecated message it should definitely be there just tested. Its there for the master version [master|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIListView.m#L549] and [5.2.X|https://github.com/appcelerator/titanium_mobile/blob/5_2_X/iphone/Classes/TiUIListView.m#L543]", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-17T00:03:49.000+0000", "updated": "2016-03-17T00:03:49.000+0000" }, { "id": "380005", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~apetkov] I do not see the deprecation message when I have SDK 5.2.1.X selected from the CLI, no matter what the tiapp.xml SDK is set to. If I select 5.4.X from the CLI, then I will see the message", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-17T17:15:05.000+0000", "updated": "2016-03-17T17:15:05.000+0000" }, { "id": "380079", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-18T12:07:55.000+0000", "updated": "2016-03-18T12:16:22.000+0000" }, { "id": "380658", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11.4 (15E65)\r\nStudio 4.5.0.201602170821\r\nTi SDK 5.2.1.v20160318225121\r\nAppc NPM 4.2.4-2\r\nAppc CLI 5.2.1-21\r\nAlloy 1.8.2\r\nXcode 7.3 (7D175)\r\n\r\nI now correctly see the deprecation warning and separatorInsets has been split into two properties (tableSeparatorInsets and rowSeparatorInsets) for tableViews and listViews. Tested using provided sample code, with edits", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-03-24T22:31:18.000+0000", "updated": "2016-03-24T22:31:18.000+0000" } ], "maxResults": 25, "total": 25, "startAt": 0 } } }