{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/16002","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/16002/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/16002/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/16002/events","html_url":"https://github.com/Automattic/wp-calypso/pull/16002","id":241345611,"number":16002,"title":"Add a Share a Draft feature","user":{"login":"brandonpayton","id":530877,"avatar_url":"https://avatars1.githubusercontent.com/u/530877?v=4","gravatar_id":"","url":"https://api.github.com/users/brandonpayton","html_url":"https://github.com/brandonpayton","followers_url":"https://api.github.com/users/brandonpayton/followers","following_url":"https://api.github.com/users/brandonpayton/following{/other_user}","gists_url":"https://api.github.com/users/brandonpayton/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonpayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonpayton/subscriptions","organizations_url":"https://api.github.com/users/brandonpayton/orgs","repos_url":"https://api.github.com/users/brandonpayton/repos","events_url":"https://api.github.com/users/brandonpayton/events{/privacy}","received_events_url":"https://api.github.com/users/brandonpayton/received_events","type":"User","site_admin":false},"labels":[{"id":301697869,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/OSS%20Citizen","name":"OSS Citizen","color":"5319e7","default":false},{"id":285009978,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Pages","name":"Pages","color":"006b75","default":false},{"id":285009979,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Posts","name":"Posts","color":"006b75","default":false},{"id":542883719,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Size]%20XL","name":"[Size] XL","color":"390036","default":false},{"id":285010017,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20In%20Progress","name":"[Status] In Progress","color":"207de5","default":false},{"id":285009976,"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Enhancement","name":"[Type] Enhancement","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":{"login":"brandonpayton","id":530877,"avatar_url":"https://avatars1.githubusercontent.com/u/530877?v=4","gravatar_id":"","url":"https://api.github.com/users/brandonpayton","html_url":"https://github.com/brandonpayton","followers_url":"https://api.github.com/users/brandonpayton/followers","following_url":"https://api.github.com/users/brandonpayton/following{/other_user}","gists_url":"https://api.github.com/users/brandonpayton/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonpayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonpayton/subscriptions","organizations_url":"https://api.github.com/users/brandonpayton/orgs","repos_url":"https://api.github.com/users/brandonpayton/repos","events_url":"https://api.github.com/users/brandonpayton/events{/privacy}","received_events_url":"https://api.github.com/users/brandonpayton/received_events","type":"User","site_admin":false},"assignees":[{"login":"brandonpayton","id":530877,"avatar_url":"https://avatars1.githubusercontent.com/u/530877?v=4","gravatar_id":"","url":"https://api.github.com/users/brandonpayton","html_url":"https://github.com/brandonpayton","followers_url":"https://api.github.com/users/brandonpayton/followers","following_url":"https://api.github.com/users/brandonpayton/following{/other_user}","gists_url":"https://api.github.com/users/brandonpayton/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonpayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonpayton/subscriptions","organizations_url":"https://api.github.com/users/brandonpayton/orgs","repos_url":"https://api.github.com/users/brandonpayton/repos","events_url":"https://api.github.com/users/brandonpayton/events{/privacy}","received_events_url":"https://api.github.com/users/brandonpayton/received_events","type":"User","site_admin":false}],"milestone":null,"comments":48,"created_at":"2017-07-07T18:35:59Z","updated_at":"2017-07-25T05:45:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/16002","html_url":"https://github.com/Automattic/wp-calypso/pull/16002","diff_url":"https://github.com/Automattic/wp-calypso/pull/16002.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/16002.patch"},"body":"# Share a Draft\r\n\r\nThis is a WIP PR to add a Share a Draft feature to Calypso so users may request feedback on drafts prior to publishing. This is the main PR for the feature UI in the post settings sidebar. We may need smaller, supporting PRs, including a separate PR for the share-related nag banner in the editor.\r\n\r\nA live branch with these changes is here:\r\nhttps://calypso.live/?branch=add/share-a-draft\r\n\r\nThe plan is to prototype with a mock data layer, share with design, and iterate.\r\n\r\nI'm maintaining the following checklists as a personal reminder and to reflect general progress.\r\n\r\n**NOTE:** We are discussing first shipping a simpler version 1 without feedback comments, so I've broken the lists into version 1 and version 2 categories. There are some items in version 2 which are desirable for version 1, but I am placing them with version 2 to increase the chance we ship something sooner rather than later.\r\n\r\n## Version 1 - Without feedback comments\r\n\r\n### Development\r\n\r\nThese are necessary items for a simpler version 1 without comments.\r\n\r\n- [x] Create invitation to open feedback view\r\n- [x] Create form for requesting feedback\r\n- [x] Create component to view a share with comments\r\n- [x] Create unit-tested action types and creators\r\n- [x] Update `keyedReducer` to support explicit key removal -- supporting share removal\r\n- [x] Create unit-tested reducer for draft feedback state\r\n- [x] Create unit-tested selector to list draft feedback for a given site and post\r\n- [x] Integrate existing UI with redux\r\n- [x] Add UI for revoke/restore share access\r\n- [x] Validate email input\r\n- [ ] Update Gravatar component to support mutually exclusive `email` and `url` props instead of a `user` prop\r\n- [ ] Add query component for requesting feedback for a draft\r\n- [ ] Add necessary actions and data-layer support for connecting this with a real REST API\r\n- [ ] Error reporting via `createNotice` in data-layer\r\n- [x] Document initial vision for the REST API and include it in a README with the draft feedback data-layer provider\r\n- [ ] Component unit tests\r\n- [ ] Refine styles\r\n- [ ] Review accessibility -- the settings sidebar doesn't appear accessible to me, but I need to confirm with the team.\r\n- [ ] Review RTL support\r\n- [ ] Review `translate` calls and improve communication for translators\r\n- [ ] Consider usage stats\r\n- [ ] Address and remove remaining inline TODOs\r\n\r\n### Bugs\r\n\r\n- [ ] The settings sidebar generates setState errors when navigating to feedback view before settings view fully loads\r\n- [ ] The feedback view disappears when resized to narrow window dimensions (and probably for many mobile devices in portrait orientation)\r\n\r\n## Version 2 - With comments\r\n\r\n### Development\r\n\r\n- [ ] Support submitting more than one email address at a time\r\n- [ ] Add confirmation dialog for revoke share access\r\n- [ ] Create or update Accordion component that can be driven via props rather than state -- this depends on whether UX continues to require only one section to be expanded at a time.\r\n- [ ] Show collapsed accordion-like header when feedback-request-form is collapsed so the user knows how to expand it.\r\n- [ ] Timestamp feedback comments\r\n- [ ] Highlight unread feedback in the feedback sidebar\r\n\r\n\r\n## Questions for design\r\n\r\n- [ ] How should the UI change after a post is published? The feedback UI is launched through an invitation to request feedback, but the invitation no longer makes sense after publishing.\r\n- [ ] Should a share be able to be expanded when there are no comments, and if so, what should be shown?\r\n\r\n\r\ncc @nb @dmsnell"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/317635699","html_url":"https://github.com/Automattic/wp-calypso/pull/16002#issuecomment-317635699","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/16002","id":317635699,"user":{"login":"brandonpayton","id":530877,"avatar_url":"https://avatars1.githubusercontent.com/u/530877?v=4","gravatar_id":"","url":"https://api.github.com/users/brandonpayton","html_url":"https://github.com/brandonpayton","followers_url":"https://api.github.com/users/brandonpayton/followers","following_url":"https://api.github.com/users/brandonpayton/following{/other_user}","gists_url":"https://api.github.com/users/brandonpayton/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonpayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonpayton/subscriptions","organizations_url":"https://api.github.com/users/brandonpayton/orgs","repos_url":"https://api.github.com/users/brandonpayton/repos","events_url":"https://api.github.com/users/brandonpayton/events{/privacy}","received_events_url":"https://api.github.com/users/brandonpayton/received_events","type":"User","site_admin":false},"created_at":"2017-07-25T05:45:28Z","updated_at":"2017-07-25T05:45:28Z","body":"I added email validation to `feedback-request-form` and think the implementation is reasonable. But I'm concerned that it might be better to use `client/lib/form-state` and related components for the sake of consistency (e.g., consistent validation debounce times). I didn't use`form-state` initially because I didn't know about it and because it looked more complicated than I wanted for a single-field form component. Any thoughts on this?\r\n\r\nIt may be that I just need to learn how to use it.\r\n\r\nI also have concerns about the accessibility of the form. The validation error message is not currently tied to the email input. There appears to be friction using attributes like `aria-describedby` because those attributes require the use of DOM IDs, and AFAIK, React doesn't naturally generate unique DOM IDs for components' elements. I see [one Calypso component](https://github.com/Automattic/wp-calypso/blob/6f4a5ee5741beaa1e000bc2d0bf0d5a737df7bd9/client/components/select-dropdown/index.jsx#L271) that works around this by generating a component-specific `instanceId`, but I think we should find an approach that requires less work at a component level. If each component gets a unique ID, IDs for child elements can be generated like `` `${id}-email-input` ``. Do you have any thoughts on this? Do we have a solution that I am missing? \r\n"}}
{"actor":{"display_login":"brandonpayton"}}