{"action":"created","issue":{"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/172","repository_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react","labels_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/172/comments","events_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/172/events","html_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/172","id":172355887,"number":172,"title":"SelectionZone: adding a ton of unit tests and fine tuning all the edge cases","user":{"login":"dzearing","id":1110944,"avatar_url":"https://avatars.githubusercontent.com/u/1110944?v=3","gravatar_id":"","url":"https://api.github.com/users/dzearing","html_url":"https://github.com/dzearing","followers_url":"https://api.github.com/users/dzearing/followers","following_url":"https://api.github.com/users/dzearing/following{/other_user}","gists_url":"https://api.github.com/users/dzearing/gists{/gist_id}","starred_url":"https://api.github.com/users/dzearing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzearing/subscriptions","organizations_url":"https://api.github.com/users/dzearing/orgs","repos_url":"https://api.github.com/users/dzearing/repos","events_url":"https://api.github.com/users/dzearing/events{/privacy}","received_events_url":"https://api.github.com/users/dzearing/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/labels/cla-not-required","name":"cla-not-required","color":"C8C8C8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-22T01:52:53Z","updated_at":"2016-08-22T01:53:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/pulls/172","html_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/172","diff_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/172.diff","patch_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/172.patch"},"body":"SelectionZone now allows the caller to sprinkle specific data-selection attributes on tiles/rows to abstract the selection behavior at a higher level. In the tiles/rows, rather than manually handling all of the click/keyboard eventing for selection, you simply add data-attributes to the right elements within each row/tile:\r\n\r\ndata-selection-index: the index of the item being represented. This would go on the root of the tile/row.\r\n\r\ndata-selection-invoke: this boolean flag would be set on the element which should immediately invoke the item on click. There is also a nuanced behavior where we will clear selection and select the item if mousedown occurs on an unselected item.\r\n\r\ndata-selection-toggle: this boolean flag would be set on the element which should handle toggles. This could be a checkbox or a div.\r\n\r\ndata-selection-toggle-all: this boolean flag indicates that clicking it should toggle all selection.\r\n"},"comment":{"url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/comments/241298688","html_url":"https://github.com/OfficeDev/office-ui-fabric-react/pull/172#issuecomment-241298688","issue_url":"https://api.github.com/repos/OfficeDev/office-ui-fabric-react/issues/172","id":241298688,"user":{"login":"dzearing","id":1110944,"avatar_url":"https://avatars.githubusercontent.com/u/1110944?v=3","gravatar_id":"","url":"https://api.github.com/users/dzearing","html_url":"https://github.com/dzearing","followers_url":"https://api.github.com/users/dzearing/followers","following_url":"https://api.github.com/users/dzearing/following{/other_user}","gists_url":"https://api.github.com/users/dzearing/gists{/gist_id}","starred_url":"https://api.github.com/users/dzearing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzearing/subscriptions","organizations_url":"https://api.github.com/users/dzearing/orgs","repos_url":"https://api.github.com/users/dzearing/repos","events_url":"https://api.github.com/users/dzearing/events{/privacy}","received_events_url":"https://api.github.com/users/dzearing/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T01:53:16Z","updated_at":"2016-08-22T01:53:16Z","body":"Added the following tests:\r\n\r\nSelectionZone\r\n    ✔ toggles an item on click of toggle element\r\n    ✔ toggles an item on dblclick of toggle element\r\n    ✔ does not toggle an item on mousedown of toggle element\r\n    ✔ selects an unselected item on mousedown of invoke without modifiers pressed\r\n    ✔ does nothing with mousedown of invoke when item is selected already\r\n    ✔ calls the invoke callback on click of invoke area\r\n    ✔ selects an unselected item on click of item surface element\r\n    ✔ does not unselect a selected item on click of item surface element\r\n    ✔ does not select an unselected item on mousedown of item surface element\r\n    ✔ invokes an item on double clicking the surface element\r\n    ✔ toggles all on toggle-all clicks\r\n    ✔ suports mouse shift click range select scenarios\r\n    ✔ toggles by ctrl clicking a surface\r\n    ✔ selects all on ctrl-a\r\n    ✔ unselects all on escape\r\n    ✔ selects item on focus\r\n    ✔ does not select an item on focus if ctrl/meta is pressed\r\n    ✔ does not select an item on focus when ignoreNextFocus is called\r\n    ✔ toggles an item when pressing space\r\n    ✔ does not select the row when clicking on a toggle within an invoke element"}}
{"actor":{"display_login":"dzearing"}}