{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/6529","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/6529/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/6529/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/6529/events","html_url":"https://github.com/WordPress/gutenberg/pull/6529","id":319340434,"number":6529,"title":"Use `targetSchema` of JSON Hyper Schema to communicate sticky action","user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars1.githubusercontent.com/u/36432?v=4","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/WordPress/gutenberg/milestones/53","html_url":"https://github.com/WordPress/gutenberg/milestone/53","labels_url":"https://api.github.com/repos/WordPress/gutenberg/milestones/53/labels","id":3317760,"number":53,"title":"2.9","description":null,"creator":{"login":"iseulde","id":4710635,"avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":5,"state":"open","created_at":"2018-05-03T14:08:08Z","updated_at":"2018-05-05T13:33:01Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2018-05-01T21:49:27Z","updated_at":"2018-05-05T16:55:29Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/6529","html_url":"https://github.com/WordPress/gutenberg/pull/6529","diff_url":"https://github.com/WordPress/gutenberg/pull/6529.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/6529.patch"},"body":"## Description\r\n\r\nUpdates the `post-sticky` check to use presence of `wp:action-sticky` in `_links` to determine whether the sticky UI should display. This system is called `targetSchema`. It allows us to compute whether a user can perform an action server-side, and then communicate it to the client.\r\n\r\nSee https://github.com/WordPress/gutenberg/issues/6361#issuecomment-385769046\r\n\r\n## How has this been tested?\r\n\r\nFor editors and above, the \"Stick to the Front Page\" UI should display:\r\n\r\n<img width=\"1113\" alt=\"image\" src=\"https://user-images.githubusercontent.com/36432/39495245-61c11f24-4d4e-11e8-8553-e05d357c2e33.png\">\r\n\r\nFor authors and below, it should not:\r\n\r\n<img width=\"1163\" alt=\"image\" src=\"https://user-images.githubusercontent.com/36432/39495280-7c4a7a7a-4d4e-11e8-9c43-e4acab457ad7.png\">\r\n\r\n[User Switching](https://wordpress.org/plugins/user-switching/) is a helpful plugin for quickly testing this.\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"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/386819388","html_url":"https://github.com/WordPress/gutenberg/pull/6529#issuecomment-386819388","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/6529","id":386819388,"user":{"login":"TimothyBJacobs","id":3460448,"avatar_url":"https://avatars2.githubusercontent.com/u/3460448?v=4","gravatar_id":"","url":"https://api.github.com/users/TimothyBJacobs","html_url":"https://github.com/TimothyBJacobs","followers_url":"https://api.github.com/users/TimothyBJacobs/followers","following_url":"https://api.github.com/users/TimothyBJacobs/following{/other_user}","gists_url":"https://api.github.com/users/TimothyBJacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyBJacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyBJacobs/subscriptions","organizations_url":"https://api.github.com/users/TimothyBJacobs/orgs","repos_url":"https://api.github.com/users/TimothyBJacobs/repos","events_url":"https://api.github.com/users/TimothyBJacobs/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyBJacobs/received_events","type":"User","site_admin":false},"created_at":"2018-05-05T16:55:29Z","updated_at":"2018-05-05T16:55:29Z","author_association":"NONE","body":"I disagree. If you understand what `targetSchema` means, then it is immediately obvious what is going on. Gutenberg is filled with dozens of these technical hurdles that aren't immediately obvious to WordPress developers until you understand what a HoC is, or Slot & Fill, etc... The same thing is true with a number of patterns in WordPress core as well. \r\n\r\nI also disagree that it is super complex. Its a fairly pattern of representing what the target resource looks like and is certainly no more complex than many other G7g patterns that are necessary to fulfill a complex requirement."}}
{"actor":{"display_login":"TimothyBJacobs"}}