{"action":"created","comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/232209087","pull_request_review_id":173355466,"id":232209087,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjIwOTA4Nw==","diff_hunk":"@@ -0,0 +1,15 @@\n+# Annotations\n+\n+","path":"packages/annotations/README.md","position":3,"original_position":3,"commit_id":"399f9bc9e5d5a4b00c6aae4f398a7b557eb493e8","original_commit_id":"64acd0c40ffb298c38829388f17d84834bb97139","user":{"login":"youknowriad","id":272444,"node_id":"MDQ6VXNlcjI3MjQ0NA==","avatar_url":"https://avatars3.githubusercontent.com/u/272444?v=4","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"body":"Minor: some extra space here","created_at":"2018-11-09T10:36:54Z","updated_at":"2018-11-09T10:42:09Z","html_url":"https://github.com/WordPress/gutenberg/pull/7718#discussion_r232209087","pull_request_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments/232209087"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/7718#discussion_r232209087"},"pull_request":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718"}}},"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718","id":199411230,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NDExMjMw","html_url":"https://github.com/WordPress/gutenberg/pull/7718","diff_url":"https://github.com/WordPress/gutenberg/pull/7718.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/7718.patch","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/7718","number":7718,"state":"open","locked":false,"title":"Annotation API","user":{"login":"atimmer","id":584693,"node_id":"MDQ6VXNlcjU4NDY5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/584693?v=4","gravatar_id":"","url":"https://api.github.com/users/atimmer","html_url":"https://github.com/atimmer","followers_url":"https://api.github.com/users/atimmer/followers","following_url":"https://api.github.com/users/atimmer/following{/other_user}","gists_url":"https://api.github.com/users/atimmer/gists{/gist_id}","starred_url":"https://api.github.com/users/atimmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atimmer/subscriptions","organizations_url":"https://api.github.com/users/atimmer/orgs","repos_url":"https://api.github.com/users/atimmer/repos","events_url":"https://api.github.com/users/atimmer/events{/privacy}","received_events_url":"https://api.github.com/users/atimmer/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nThis PR includes an API to annotation text inside blocks. This PR on its own is mostly useful to plugin authors. This would make it possible for a feature plugin to build #3026. It also allows plugins like Jetpack or Yoast SEO to highlight certain parts of the text to make their feedback more contextual and actionable.\r\n\r\nThe best way to see this in action is combine it with this Yoast SEO PR: https://github.com/Yoast/wordpress-seo/pull/10265\r\n\r\nXPath has been chosen because it is a format that is compatible with the W3C annotation standard. This will give it future compatibility with front-end annotations. Partial XPaths can really easily be combined into a fully qualified XPath that works globally on a certain page. XPath is also the only format in the W3C annotation standard that can refer to text node. This is in contrast to the CSS selector which can't refer to text nodes.\r\n\r\nAll annotations in the editor get an `annotation-text` and an `annotation-text-[source]` class to they can be styled by the source of the annotation. \r\n\r\n### Browser compatibility\r\n\r\n`document.evaluate` is not supported in all browsers, but for this version of the PR I don't use `document.evaluate`. I parse the XPath myself to result in a position within the data structure for `rich-text`.\r\n\r\n### Doesn't include, but should be added in a later iteration\r\n\r\n* A custom block should be able to track which `RichText` an annotation is for. Currently this implementation only works for block with a single `RichText`.\r\n* More data can be added to an annotation such as `comment`, `author`, etc.\r\n\r\n## How has this been tested?\r\n\r\n* Using the annotations tester plugin: https://github.com/atimmer/gutenberg-annotations-tester. The plugin also shows which annotations are currently in the state, this makes it a bit easier to debug what is happening.\r\n* Running this in combination with https://github.com/Yoast/wordpress-seo/pull/10265.\r\n\r\n## Screenshots\r\n\r\n![annotation poc](https://user-images.githubusercontent.com/584693/43644105-d76a8ec6-972d-11e8-83ed-4aca88d6121f.gif)\r\n\r\n## Related\r\n\r\nCommenting API: #3026.\r\nREST API for annotations (required for Commenting API): #4685\r\n\r\n## Checklist:\r\n- [ ] My code is tested.\r\n- [ ] 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- [ ] My code follows the accessibility standards. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->\r\n- [ ] My code has proper inline documentation. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->","created_at":"2018-07-05T09:33:05Z","updated_at":"2018-11-09T10:42:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cef8fcdcf4cd26bc6d081e9458bbcec332c9081b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"aduth","id":1779930,"node_id":"MDQ6VXNlcjE3Nzk5MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1779930?v=4","gravatar_id":"","url":"https://api.github.com/users/aduth","html_url":"https://github.com/aduth","followers_url":"https://api.github.com/users/aduth/followers","following_url":"https://api.github.com/users/aduth/following{/other_user}","gists_url":"https://api.github.com/users/aduth/gists{/gist_id}","starred_url":"https://api.github.com/users/aduth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduth/subscriptions","organizations_url":"https://api.github.com/users/aduth/orgs","repos_url":"https://api.github.com/users/aduth/repos","events_url":"https://api.github.com/users/aduth/events{/privacy}","received_events_url":"https://api.github.com/users/aduth/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":631490822,"node_id":"MDU6TGFiZWw2MzE0OTA4MjI=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Extensibility","name":"Extensibility","color":"655104","default":false},{"id":555100643,"node_id":"MDU6TGFiZWw1NTUxMDA2NDM=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Technical%20Prototype","name":"Technical Prototype","color":"5319e7","default":false},{"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":{"url":"https://api.github.com/repos/WordPress/gutenberg/milestones/72","html_url":"https://github.com/WordPress/gutenberg/milestone/72","labels_url":"https://api.github.com/repos/WordPress/gutenberg/milestones/72/labels","id":3784280,"node_id":"MDk6TWlsZXN0b25lMzc4NDI4MA==","number":72,"title":"4.3","description":"","creator":{"login":"gziolo","id":699132,"node_id":"MDQ6VXNlcjY5OTEzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/699132?v=4","gravatar_id":"","url":"https://api.github.com/users/gziolo","html_url":"https://github.com/gziolo","followers_url":"https://api.github.com/users/gziolo/followers","following_url":"https://api.github.com/users/gziolo/following{/other_user}","gists_url":"https://api.github.com/users/gziolo/gists{/gist_id}","starred_url":"https://api.github.com/users/gziolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gziolo/subscriptions","organizations_url":"https://api.github.com/users/gziolo/orgs","repos_url":"https://api.github.com/users/gziolo/repos","events_url":"https://api.github.com/users/gziolo/events{/privacy}","received_events_url":"https://api.github.com/users/gziolo/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":104,"state":"open","created_at":"2018-10-31T07:05:04Z","updated_at":"2018-11-09T09:57:56Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718/commits","review_comments_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718/comments","review_comment_url":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/7718/comments","statuses_url":"https://api.github.com/repos/WordPress/gutenberg/statuses/399f9bc9e5d5a4b00c6aae4f398a7b557eb493e8","head":{"label":"WordPress:try/annotations","ref":"try/annotations","sha":"399f9bc9e5d5a4b00c6aae4f398a7b557eb493e8","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-11-09T09:57:35Z","pushed_at":"2018-11-09T10:36:49Z","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":33772,"stargazers_count":3695,"watchers_count":3695,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1019,"mirror_url":null,"archived":false,"open_issues_count":1533,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1019,"open_issues":1533,"watchers":3695,"default_branch":"master"}},"base":{"label":"WordPress:master","ref":"master","sha":"ca67e13fc5e5df67c1619076bfd83e73271b7c41","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-11-09T09:57:35Z","pushed_at":"2018-11-09T10:36:49Z","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":33772,"stargazers_count":3695,"watchers_count":3695,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1019,"mirror_url":null,"archived":false,"open_issues_count":1533,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1019,"open_issues":1533,"watchers":3695,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718"},"html":{"href":"https://github.com/WordPress/gutenberg/pull/7718"},"issue":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/7718"},"comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/issues/7718/comments"},"review_comments":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718/comments"},"review_comment":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordPress/gutenberg/pulls/7718/commits"},"statuses":{"href":"https://api.github.com/repos/WordPress/gutenberg/statuses/399f9bc9e5d5a4b00c6aae4f398a7b557eb493e8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"youknowriad"}}