{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/7534","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/7534/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/7534/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/7534/events","html_url":"https://github.com/WordPress/gutenberg/issues/7534","id":335412927,"node_id":"MDU6SXNzdWUzMzU0MTI5Mjc=","number":7534,"title":"Components: Separate Button / Link components, eliminate ExternalLink, IconButton","user":{"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},"labels":[{"id":546517042,"node_id":"MDU6TGFiZWw1NDY1MTcwNDI=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Accessibility","name":"Accessibility","color":"655104","default":false},{"id":659839209,"node_id":"MDU6TGFiZWw2NTk4MzkyMDk=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/UI%20Components","name":"UI Components","color":"fbca04","default":false},{"id":813776657,"node_id":"MDU6TGFiZWw4MTM3NzY2NTc=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Component]%20Button","name":"[Component] Button","color":"fbca04","default":false},{"id":531680824,"node_id":"MDU6TGFiZWw1MzE2ODA4MjQ=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Task","name":"[Type] Task","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"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},"assignees":[{"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}],"milestone":null,"comments":9,"created_at":"2018-06-25T13:42:45Z","updated_at":"2018-09-07T21:13:21Z","closed_at":null,"author_association":"MEMBER","body":"Context: https://github.com/WordPress/gutenberg/pull/6786#issuecomment-392066144\r\n\r\nThe current behavior of the `Button` component encompasses too many responsibilities. Furthermore, this is confused by the addition of separate components `ExternalLink` and `IconButton` which behave as enhanced variants to be used in specific circumstances, though not clearly so.\r\n\r\nInstead, we should to create two components `Button` and `Link`:\r\n\r\nA `Button`...\r\n\r\n- Is semantically: an element with Click/Enter/Space behavior (`onClick`)\r\n- Default appearance of button (see below open question in `Link` requiring `href`)\r\n- Handles icon behavior by assumptions based on incoming props (`icon`)\r\n- ~May be navigable (by presence of `href`), in which case it defers its rendering to an underlying Link†~ See https://github.com/WordPress/gutenberg/issues/7534#issuecomment-399957514 , https://github.com/WordPress/gutenberg/issues/7534#issuecomment-399958079 , https://github.com/WordPress/gutenberg/pull/6786#issuecomment-392105036\r\n\r\nA `Link`...\r\n\r\n- Is semantically: a navigable element (`href`)\r\n- Default appearance of a link ~(`<Button href=\"...\">` may override)~\r\n- Handles `rel` behavior by assumptions based on incoming props (`href`, `target`)\r\n- Open question: Must receive `href` prop?\r\n  - Could warn about incorrect usage otherwise, encouraging use of Button instead (avoid `href=\"#\" onClick=\"...\"`). But this requires that `Button` can assume the _appearance_ of a link, which may be okay (as it does today with `isLink` prop).\r\n\r\nA few notable advantages here:\r\n\r\n- `Link` is more intuitive to use in place of `<a />`, helping promote consistency\r\n- `rel` behavior is more natural to occur in `Link` (navigable), not `Button`\r\n- Eliminate `IconButton` as a separate component\r\n\r\n† Per https://github.com/WordPress/gutenberg/pull/6786#issuecomment-392105036, it may be advisable for these components to be completely separated and share their own sets of consistent styling."},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/419567337","html_url":"https://github.com/WordPress/gutenberg/issues/7534#issuecomment-419567337","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/7534","id":419567337,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTU2NzMzNw==","user":{"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},"created_at":"2018-09-07T21:13:21Z","updated_at":"2018-09-07T21:13:21Z","author_association":"MEMBER","body":"Initial (unfinished) explorations started at #9702"}}
{"actor":{"display_login":"aduth"}}