{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/5921","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5921/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5921/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5921/events","html_url":"https://github.com/WordPress/gutenberg/pull/5921","id":310344113,"number":5921,"title":"Post author dropdown: enable search","user":{"login":"adamsilverstein","id":2676022,"avatar_url":"https://avatars0.githubusercontent.com/u/2676022?v=4","gravatar_id":"","url":"https://api.github.com/users/adamsilverstein","html_url":"https://github.com/adamsilverstein","followers_url":"https://api.github.com/users/adamsilverstein/followers","following_url":"https://api.github.com/users/adamsilverstein/following{/other_user}","gists_url":"https://api.github.com/users/adamsilverstein/gists{/gist_id}","starred_url":"https://api.github.com/users/adamsilverstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamsilverstein/subscriptions","organizations_url":"https://api.github.com/users/adamsilverstein/orgs","repos_url":"https://api.github.com/users/adamsilverstein/repos","events_url":"https://api.github.com/users/adamsilverstein/events{/privacy}","received_events_url":"https://api.github.com/users/adamsilverstein/received_events","type":"User","site_admin":false},"labels":[{"id":546517042,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/Accessibility","name":"Accessibility","color":"655104","default":false},{"id":816933178,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/Needs%20Testing","name":"Needs Testing","color":"67dff7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2018-04-01T18:35:43Z","updated_at":"2018-05-25T13:51:02Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/5921","html_url":"https://github.com/WordPress/gutenberg/pull/5921","diff_url":"https://github.com/WordPress/gutenberg/pull/5921.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/5921.patch"},"body":"## Description\r\nChange the post author component into a searchable react-select component.\r\n\r\nFixes https://github.com/WordPress/gutenberg/issues/4622\r\n\r\n* Leverage react-select to create a dynamic select/dropdown for the author picker component: http://jedwatson.github.io/react-select/. I didn’t find an existing component like this in Gutenberg, did I miss one? This component seems solid, open to other suggestions.\r\n* initially, shows the first 100 users and dropdown works like existing dropdown - current user is the initial post author.\r\n* additionally, you can type into the field which begins a (debounced/cached) search, filling the list with available matches\r\n* when the post loads, checks if the post author is in the dropdown (one of the default, first 100 users), if not, calls the api to add that user to the dropdown (maybe this could be localized/done in php?)\r\n\r\n## How Has This Been Tested?\r\n* Tested creating new posts.\r\n* Tested basic keyboard functionality, could use a more complete a11y review.\r\n* Tested editing existing posts.\r\n* Tested on system with hundreds of users (leveraging `wp user generate` to generate test users)\r\n\r\n## Screenshots (jpeg or gifs if applicable):\r\n\r\nThis could use some design feedback. Currently uses the default CSS styles provided by react-select, with the control set to fill the full width\r\n\r\n![](https://cl.ly/3k231C1O2E1E/Screen%20Recording%202018-04-01%20at%2001.44%20PM.gif)\r\n\r\n\r\n## Types of changes\r\nSwitches the post author selector from a regular dropdown choosing from the to a searchable react component to select the author from all possible users.\r\n\r\n## Checklist:\r\n- [X] My code is tested. \r\n- [X] My code follows the WordPress code style.\r\n- [X] My code has proper inline documentation.\r\n"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/392064134","html_url":"https://github.com/WordPress/gutenberg/pull/5921#issuecomment-392064134","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5921","id":392064134,"user":{"login":"afercia","id":1682452,"avatar_url":"https://avatars1.githubusercontent.com/u/1682452?v=4","gravatar_id":"","url":"https://api.github.com/users/afercia","html_url":"https://github.com/afercia","followers_url":"https://api.github.com/users/afercia/followers","following_url":"https://api.github.com/users/afercia/following{/other_user}","gists_url":"https://api.github.com/users/afercia/gists{/gist_id}","starred_url":"https://api.github.com/users/afercia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afercia/subscriptions","organizations_url":"https://api.github.com/users/afercia/orgs","repos_url":"https://api.github.com/users/afercia/repos","events_url":"https://api.github.com/users/afercia/events{/privacy}","received_events_url":"https://api.github.com/users/afercia/received_events","type":"User","site_admin":false},"created_at":"2018-05-25T13:51:02Z","updated_at":"2018-05-25T13:51:02Z","author_association":"CONTRIBUTOR","body":"Yep I know, they've also promptly helped in giving some feedback on https://github.com/WordPress/gutenberg/issues/5468#issuecomment-391870958 ❤️ "}}
{"actor":{"display_login":"afercia"}}