{"action":"closed","number":6577,"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/6577","id":185905093,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg1OTA1MDkz","html_url":"https://github.com/WordPress/gutenberg/pull/6577","diff_url":"https://github.com/WordPress/gutenberg/pull/6577.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/6577.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/6577","number":6577,"state":"closed","locked":false,"title":"Treat autocompletions as tokens with editing boundaries","user":{"login":"brandonpayton","id":530877,"node_id":"MDQ6VXNlcjUzMDg3Nw==","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},"body":"## Description\r\nThis PR updates the `<Autocomplete>` component to insert autocompletions as tokens.\r\n\r\nCompletions consisting entirely of text are inserted as styled, editable tokens. This satisfies the common completer use cases of user mentions (@-user), tags (#-tag), and cross posting site mentions (+site).\r\n\r\nHere's an example of editable tokens:\r\n![first-completer-type-example](https://user-images.githubusercontent.com/530877/42016409-44b5550a-7a60-11e8-91ec-f0e61745324a.gif)\r\n\r\nCompletions containing HTML are inserted as non-editable tokens. This supports the creation of completers that insert arbitrary HTML content.\r\n\r\nHere's an example of a non-editable token created from [this completer](https://gist.github.com/brandonpayton/01b75c55ce4d329d534b1d3a68dc728f):\r\n![second-completer-type-example](https://user-images.githubusercontent.com/530877/41986081-f3685830-79e9-11e8-833e-009499a51aed.gif)\r\n\r\nCloses #6573.\r\n\r\n## How has this been tested?\r\nTested manually in Chrome, Firefox, and Safari on macOS and in IE11 and Edge on Windows.\r\n\r\nI also added an e2e test for basic token insertion.\r\n\r\n## Checklist:\r\n- [x] My code is tested.\r\n- [x] My code follows the WordPress code style. <!-- Check code: `npm run lint`, Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/ -->\r\n- [x] My code follows the accessibility standards. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->\r\n- [x] My code has proper inline documentation. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->\r\n","created_at":"2018-05-04T06:58:49Z","updated_at":"2018-10-19T18:55:53Z","closed_at":"2018-10-19T18:55:52Z","merged_at":null,"merge_commit_sha":"2585fa9224f6a266220a1a4004c94904ef35d580","assignee":{"login":"brandonpayton","id":530877,"node_id":"MDQ6VXNlcjUzMDg3Nw==","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,"node_id":"MDQ6VXNlcjUzMDg3Nw==","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}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":598548627,"node_id":"MDU6TGFiZWw1OTg1NDg2Mjc=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Component]%20Rich%20Text","name":"[Component] Rich Text","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/6577/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/6577/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/6577/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/23d2d93b76d0f4b745cf0a09bef53cde348e9b53","head":{"label":"WordPress:add/autocompletion-tokens","ref":"add/autocompletion-tokens","sha":"23d2d93b76d0f4b745cf0a09bef53cde348e9b53","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","private":false,"owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-10-19T18:37:30Z","pushed_at":"2018-10-19T18:54:35Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/","size":28779,"stargazers_count":3571,"watchers_count":3571,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":969,"mirror_url":null,"archived":false,"open_issues_count":1452,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":969,"open_issues":1452,"watchers":3571,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"248697a5fc95b92bd7d2fc08fdaf8de1d44fd492","user":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"repo":{"id":80862584,"node_id":"MDEwOlJlcG9zaXRvcnk4MDg2MjU4NA==","name":"gutenberg","full_name":"WordPress/gutenberg","private":false,"owner":{"login":"WordPress","id":276006,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NjAwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/276006?v=4","gravatar_id":"","url":"https://api.github.com/users/WordPress","html_url":"https://github.com/WordPress","followers_url":"https://api.github.com/users/WordPress/followers","following_url":"https://api.github.com/users/WordPress/following{/other_user}","gists_url":"https://api.github.com/users/WordPress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordPress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordPress/subscriptions","organizations_url":"https://api.github.com/users/WordPress/orgs","repos_url":"https://api.github.com/users/WordPress/repos","events_url":"https://api.github.com/users/WordPress/events{/privacy}","received_events_url":"https://api.github.com/users/WordPress/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/WordPress/gutenberg","description":"Printing since 1440. Development hub for the editor focus in core. Plugin is available from the official WordPress repository.","fork":false,"url":"https://api.github.com/repos/WordPress/gutenberg","forks_url":"https://api.github.com/repos/WordPress/gutenberg/forks","keys_url":"https://api.github.com/repos/WordPress/gutenberg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordPress/gutenberg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordPress/gutenberg/teams","hooks_url":"https://api.github.com/repos/WordPress/gutenberg/hooks","issue_events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/events{/number}","events_url":"https://api.github.com/repos/WordPress/gutenberg/events","assignees_url":"https://api.github.com/repos/WordPress/gutenberg/assignees{/user}","branches_url":"https://api.github.com/repos/WordPress/gutenberg/branches{/branch}","tags_url":"https://api.github.com/repos/WordPress/gutenberg/tags","blobs_url":"https://api.github.com/repos/WordPress/gutenberg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordPress/gutenberg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordPress/gutenberg/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordPress/gutenberg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/{sha}","languages_url":"https://api.github.com/repos/WordPress/gutenberg/languages","stargazers_url":"https://api.github.com/repos/WordPress/gutenberg/stargazers","contributors_url":"https://api.github.com/repos/WordPress/gutenberg/contributors","subscribers_url":"https://api.github.com/repos/WordPress/gutenberg/subscribers","subscription_url":"https://api.github.com/repos/WordPress/gutenberg/subscription","commits_url":"https://api.github.com/repos/WordPress/gutenberg/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordPress/gutenberg/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordPress/gutenberg/contents/{+path}","compare_url":"https://api.github.com/repos/WordPress/gutenberg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordPress/gutenberg/merges","archive_url":"https://api.github.com/repos/WordPress/gutenberg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordPress/gutenberg/downloads","issues_url":"https://api.github.com/repos/WordPress/gutenberg/issues{/number}","pulls_url":"https://api.github.com/repos/WordPress/gutenberg/pulls{/number}","milestones_url":"https://api.github.com/repos/WordPress/gutenberg/milestones{/number}","notifications_url":"https://api.github.com/repos/WordPress/gutenberg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordPress/gutenberg/labels{/name}","releases_url":"https://api.github.com/repos/WordPress/gutenberg/releases{/id}","deployments_url":"https://api.github.com/repos/WordPress/gutenberg/deployments","created_at":"2017-02-03T19:34:19Z","updated_at":"2018-10-19T18:37:30Z","pushed_at":"2018-10-19T18:54:35Z","git_url":"git://github.com/WordPress/gutenberg.git","ssh_url":"git@github.com:WordPress/gutenberg.git","clone_url":"https://github.com/WordPress/gutenberg.git","svn_url":"https://github.com/WordPress/gutenberg","homepage":"https://wordpress.org/plugins/gutenberg/","size":28779,"stargazers_count":3571,"watchers_count":3571,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":969,"mirror_url":null,"archived":false,"open_issues_count":1452,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":969,"open_issues":1452,"watchers":3571,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/6577"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/6577"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/6577"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/6577/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/6577/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/6577/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/23d2d93b76d0f4b745cf0a09bef53cde348e9b53"}},"author_association":"MEMBER","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":52,"review_comments":28,"maintainer_can_modify":false,"commits":16,"additions":440,"deletions":28,"changed_files":7}}
{"actor":{"display_login":"brandonpayton"}}