{ "id": "139164", "key": "TIMOB-18099", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-10-22T02:01:23.000+0000", "created": "2014-11-06T16:06:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "TCSupport" ], "versions": [ { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" } ], "issuelinks": [ { "id": "50585", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "154926", "key": "TIDOC-2444", "fields": { "summary": "TabGroup/Tab focus/blur selected/unselected events not correctly documented", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "49410", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "152238", "key": "TIMOB-19759", "fields": { "summary": "iOS: Parity: tab listeners", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-02-15T13:50:48.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": "1. In Android we have the click event on the tab, but in iOS we do not. This event should be removed for Android as well, since it's confusing and quite useless as tabs can be selected by swipes.\r\n2. In Android since 3.5.0 we have the tab selected and unselected events. In iOS we have focus/blur which fire exactly when the tab is selected and unselected. So iOS tab focus/blur should be renamed selected/unselected to match Android.\r\n3. Tab focus/blur should be removed since we have selected/unselected which are much clearer, and since it makes no sense for tabs to be focused/blurred. Focus/blur events should occur on the Window or perhaps on the entire tab group, but not for \"tabs\" which are only used for selection and are not really a containing UI element. Note that for Android tab focus/blur fire in numerous cases, not just tab selection, and in all \"relevant\" cases we have Window focus/blur in any case so for tabs they're redundant.", "attachment": [], "flagged": false, "summary": "iOS: Parity: Clean up tab events", "creator": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "mokesmokes", "key": "mokesmokes", "displayName": "Mark Mokryn", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "SDK 3.5.0", "closedSprints": [ { "id": 494, "state": "closed", "name": "2015 Sprint 20 SDK", "startDate": "2015-09-26T00:29:19.845Z", "endDate": "2015-10-10T00:29:00.000Z", "completeDate": "2015-10-12T05:33:30.964Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "362164", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~cng] In SDK 4.1.0 and 5.0.0 at least, the {{focus}} and {{blur}} events for iOS don't even include the {{index}}, {{previousIndex}}, {{tab}} and {{previousTab}} properties that the docs say it has, so they are useless. We should indeed bring the {{selected}} and {{unselected}} events to iOS.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-03T11:06:34.000+0000", "updated": "2015-09-03T11:06:34.000+0000" }, { "id": "364262", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*PR* https://github.com/appcelerator/titanium_mobile/pull/7239#issuecomment-143895561\r\n\r\nDemoCode:\r\n{code}\r\nvar win1 = Ti.UI.createWindow({\r\n backgroundColor: 'blue',\r\n title: 'Blue'\r\n});\r\nwin1.add(Ti.UI.createLabel({text: 'I am a blue window.'}));\r\n\r\nvar win2 = Ti.UI.createWindow({\r\n backgroundColor: 'red',\r\n title: 'Red'\r\n});\r\nwin2.add(Ti.UI.createLabel({text: 'I am a red window.'}));\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n window: win1,\r\n title: 'Blue'\r\n}),\r\ntab2 = Ti.UI.createTab({\r\n window: win2,\r\n title: 'Red'\r\n}),\r\ntabGroup = Ti.UI.createTabGroup({\r\n tabs: [tab1, tab2]\r\n});\r\n\r\n //Should display deprecated message.\r\ntabGroup.addEventListener(\"focus\", function(e){\r\n Ti.API.info(\"Index \"+ e.index);\r\n });\r\n tabGroup.addEventListener(\"blur\", function(e){\r\n Ti.API.info(\"Index \"+ e.index);\r\n});\r\n //New Events\r\n tabGroup.addEventListener(\"selected\", function(e){\r\n Ti.API.info(\"Index \"+ e.index);\r\n });\r\n tabGroup.addEventListener(\"unselected\", function(e){\r\n Ti.API.info(\"Index \"+ e.index);\r\n });\r\ntabGroup.open();\r\n{code}\r\n", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-17T23:03:48.000+0000", "updated": "2015-09-28T23:05:03.000+0000" }, { "id": "365163", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks [~apetkov], PR reviewed and merged!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-09-29T00:15:58.000+0000", "updated": "2015-09-29T00:15:58.000+0000" }, { "id": "366686", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, using the demo code provided by [~apetkov] I am able to see the deprecated messages for focus / blur when selecting tabs. Confirmed as working for iOS9 simulator & device.\r\n\r\nOSX El Capitan 10.11\r\nStudio: 4.3.1.201509302304\r\nTi SDK: 5.2.0.v20151009071418\r\nAppc NPM: 4.2.1-1\r\nAppc CLI: 5.1.0-38\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2015-10-13T18:45:51.000+0000", "updated": "2015-10-13T18:45:51.000+0000" }, { "id": "368366", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11.2 (15C27e)\r\nStudio 4.4.0.201510280736\r\nTi SDK 5.1.0.v20151028190028\r\nAppc NPM 4.2.1\r\nAppc CLI 5.1.0-38\r\nTi CLI 5.0.5\r\nAlloy 1.7.16\r\nArrow 1.3.13\r\nXcode 7.2 (7C46l)\r\nNode v0.12.7\r\nJava 1.7.0_80\r\nproduction\r\n\r\nDeprecation messages appear for blur/focus events and parity will be achieved with the linked, related ticket", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-10-29T23:11:51.000+0000", "updated": "2015-10-29T23:11:51.000+0000" }, { "id": "369549", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "This implementation we now have doesn't make much sense...\r\n\r\nWhen the TabGroup opens {{unselected}} and then {{selected}} are both fired. Only the last one could make sense, although I'd say the initial state should not fire events:\r\n\r\n{code}\r\n[INFO] Ti.UI.TabGroup:unselected {\r\n[INFO] \"index\": 0,\r\n[INFO] \"tab\": \"[Ti.UI.Tab] #permissions\",\r\n[INFO] \"previousIndex\": 0,\r\n[INFO] \"bubbles\": true,\r\n[INFO] \"type\": \"unselected\",\r\n[INFO] \"source\": \"[Ti.UI.TabGroup] #index\",\r\n[INFO] \"cancelBubble\": false\r\n[INFO] }\r\n[INFO] Ti.UI.TabGroup:selected {\r\n[INFO] \"previousIndex\": -1,\r\n[INFO] \"previousTab\": null,\r\n[INFO] \"tab\": \"[Ti.UI.Tab] #permissions\",\r\n[INFO] \"index\": 0,\r\n[INFO] \"bubbles\": true,\r\n[INFO] \"type\": \"selected\",\r\n[INFO] \"source\": \"[Ti.UI.TabGroup] #index\",\r\n[INFO] \"cancelBubble\": false\r\n[INFO] }\r\n{code}\r\n\r\nI guess best is to resolve TIMOB-19759 and then deprecate>remove these.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-10T14:28:17.000+0000", "updated": "2015-11-10T14:28:17.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }