{ "id": "175019", "key": "TIMOB-27977", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-08-06T14:33:02.000+0000", "created": "2020-05-20T10:50:09.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "event", "iOS", "slider" ], "versions": [], "issuelinks": [ { "id": "59192", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "176056", "key": "TIMOB-28355", "fields": { "summary": "Ti.UI.Slider Test Suite: Titanium.UI.Slider Acceptance TIMOB-27977 Android Only", "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": "None", "id": "6" }, "issuetype": { "id": "10100", "description": "This Issue Type is used to create Zephyr Test within Jira.", "name": "Test", "subtask": false } } } }, { "id": "58445", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "175179", "key": "TIMOB-27978", "fields": { "summary": "TiAPI: Add \"isTrusted\" property to all events", "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": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-02-17T05:40:13.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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Component: Ti.UI.Slider\r\nPlatform: Android\r\n\r\nAt the moment it is not possible to differentiate between a \"user slide\" and a \"change of the value by code\" inside the change event. There is already a `fromUser` parameter inside the listener:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISlider.java#L315\r\n\r\nExposing that value inside the event:\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/TiUISlider.java#L361\r\n\r\nand changing the calls to that function to \"onProgressChanged(seekBar, curPos, false);\" (last parameter false) would only output true if the slider was dragged by the user.\r\n\r\nPR and Test case will follow", "attachment": [], "flagged": false, "summary": "TiAPI: Add \"isTrusted\" property to Ti.UI.Slider \"change\" event", "creator": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "455521", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/11717", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-05-20T10:56:04.000+0000", "updated": "2020-05-20T10:56:04.000+0000" }, { "id": "455900", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~michael], perhaps a better solution would be that a \"change\" event should *+NOT+* be fired when setting the {{Slider}} \"value\" property programmatically? This is how {{TextField}} and {{TextArea}} works. Although doing it this way may qualify it as a breaking-change. _(Your approach is not a breaking-change.)_\r\n\r\nI just checked {{Picker}} and it fire a \"change\" event when changing its selection programmatically too.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-20T03:13:21.000+0000", "updated": "2020-06-20T03:14:07.000+0000" }, { "id": "455903", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "Perhaps the non breaking change for now and then make it behave the same way like TextFields in a later SDK?", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-20T07:38:59.000+0000", "updated": "2020-06-20T07:38:59.000+0000" }, { "id": "455912", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "After putting some more thought into this, I agree with you. I don't think we should make a breaking-change to this. It's not \"wrong\" of it to fire a change event when the value is changed programmatically. In fact, many UI frameworks work this way.\r\n\r\nWhen developing for the web, events have an {{isTrusted}} boolean property which is set {{true}} if it was generated by end-user interaction. Perhaps we should do the same? It's not the best property name, but it is a standard name that web developers are familiar with. What do you think?\r\nhttps://developer.mozilla.org/docs/Web/API/Event/isTrusted\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-22T23:26:30.000+0000", "updated": "2020-06-22T23:26:30.000+0000" }, { "id": "455914", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "Guys I don't get it...I was finding solution on Ti.Slack about this, because Android returns this property natively and it is not exposed to Titanium app. That's it. I think that simple solution(already prepared by Michael) is the best - just expose that fromUser property and done... ", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2020-06-23T06:51:55.000+0000", "updated": "2020-06-23T06:51:55.000+0000" }, { "id": "455921", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~max87], Titanium is a cross-platform framework. What we implement on Android also needs to be implemented on iOS. And it's also preferred that we implement things the JavaScript way since Titanium appeals to web developers. Titanium's \"event\" object already replicates several several standard properties such as [type|https://developer.mozilla.org/en-US/docs/Web/API/Event/type] and [bubbles|https://developer.mozilla.org/en-US/docs/Web/API/Event/bubbles]. We're talking about implementing this ticket via [isTrusted|https://developer.mozilla.org/docs/Web/API/Event/isTrusted] as well.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-06-23T15:51:43.000+0000", "updated": "2020-06-23T15:51:43.000+0000" }, { "id": "455922", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "updated the PR and changed the parameter to \"isTrusted\". Added the value to the documentation, too", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-23T16:27:49.000+0000", "updated": "2020-06-23T16:27:49.000+0000" }, { "id": "455923", "author": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "body": "@Joshua Quick I understand. What I meant was, that solution is already prepared(I think that it's not important if parameter is called fromUser or isTrusted, important is, that such a parameter is exposed to Ti developers). For iOS there is no such a parameter in native side(AFAIK). Strange is, that when I implemented this funcionality as custom, there was a performance issues and it was not working well. As I made changes to SDK and exposed fromUser, everything is okay. On the other side, iOS has no performance issues with custom parameter(original solution for Android).\r\n", "updateAuthor": { "name": "max87", "key": "max87", "displayName": "Marian Kucharcik", "active": true, "timeZone": "Europe/Prague" }, "created": "2020-06-23T17:22:58.000+0000", "updated": "2020-06-23T17:22:58.000+0000" }, { "id": "455976", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed, waiting on Jenkins build. ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-01T14:17:23.000+0000", "updated": "2020-07-01T14:17:23.000+0000" }, { "id": "455978", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master for 9.1.0 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-07-01T14:57:02.000+0000", "updated": "2020-07-01T14:57:02.000+0000" }, { "id": "456360", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "Fix verified on build 9.1.0.v20200804082025. Ticket closed.", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2020-08-06T14:32:55.000+0000", "updated": "2020-08-06T14:32:55.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }