{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/h/issues/2550","labels_url":"https://api.github.com/repos/hypothesis/h/issues/2550/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/2550/comments","events_url":"https://api.github.com/repos/hypothesis/h/issues/2550/events","html_url":"https://github.com/hypothesis/h/pull/2550","id":108454616,"number":2550,"title":"T89 combined scope save btn","user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-09-26T10:36:49Z","updated_at":"2015-10-01T19:08:13Z","closed_at":"2015-10-01T11:23:58Z","pull_request":{"url":"https://api.github.com/repos/hypothesis/h/pulls/2550","html_url":"https://github.com/hypothesis/h/pull/2550","diff_url":"https://github.com/hypothesis/h/pull/2550.diff","patch_url":"https://github.com/hypothesis/h/pull/2550.patch"},"body":"This implements the combined privacy scope selector and post\r\nbutton from the [mocks](https://trello.com/c/hkmaJW4t/89-combined-scope-selection-save-button).\r\n\r\n- [X] Investigate the case of the missing group icons (`h-icon-group`, `h-icon-group-add` `h-icon-expand-less`, `h-icon-expand-more`) which were added in 873f1930653605939217d6946bbec93935ab662a . _Update: Of these icons only `h-icon-group` was actually used and that has been replaced with an updated design from Conor_\r\n- [x] Fix spacing between Post and Cancel buttons\r\n- [x] Fix bug where clicking visibility drop-down arrow in Chrome saves annotation changes instead of showing dropdown menu\r\n\r\n**Initial disabled state**\r\n![t89-disabled-state](https://cloud.githubusercontent.com/assets/2458/10135874/217874e8-65e9-11e5-96c2-753a5bfd5a55.png)\r\n\r\n**Enabled state**\r\n![t89-enabled-state](https://cloud.githubusercontent.com/assets/2458/10135875/25b988f8-65e9-11e5-8b22-f900a6aa3752.png)\r\n\r\n**Dropdown state**\r\n![t89-dropdown-state](https://cloud.githubusercontent.com/assets/2458/10135878/28d4a6ee-65e9-11e5-8f37-1e28bec53370.png)\r\n\r\n\r\nThe high level change is that the `<privacy>` directive and 'Save' buttons have been removed and replaced with a combined post/scope button implemented by `<publish-annotation-btn>`. The dropdown button itself is implemented in `<dropdown-menu-btn>`.\r\n\r\nThe dropdown menu is implemented using a newer version of the Angular UI Bootstrap dropdown component that we were previously using. The newer version adds keyboard accessibility and the ability to control the dropdown state via bindings. The ui.bootstrap module is a custom build from the Angular UI Bootstrap website with a couple of minor changes for Angular 1.2 compatibility.\r\n\r\nCouple of other things to note:\r\n\r\n * Rather than passing the entire annotation to the `<publish-annotation-btn>` directive, I pass\r\n   in just the state needed to render it and callbacks to save the annotation and set the privacy level.\r\n   This is the 'props/attributes down, events up' pattern.\r\n\r\n * Each of the new directives has its own CSS file for styling - this will make it easier\r\n   to group all the files that make up a component together in future as part of\r\n   the larger effort to separate out the different frontends.\r\n\r\n * I added some helpers to reduce the boilerplate when testing directives.\r\n"},"comment":{"url":"https://api.github.com/repos/hypothesis/h/issues/comments/144819029","html_url":"https://github.com/hypothesis/h/pull/2550#issuecomment-144819029","issue_url":"https://api.github.com/repos/hypothesis/h/issues/2550","id":144819029,"user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"created_at":"2015-10-01T19:08:13Z","updated_at":"2015-10-01T19:08:13Z","body":"Nice, @robertknight"}}