{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/95967475","pull_request_review_id":16537595,"id":95967475,"diff_hunk":"@@ -216,3 +216,53 @@ combineTours( {\n   thirdTour: ThirdTour,\n } );\n ```\n+\n+## Targeting elements in Calypso\n+\n+In few places in GT you need to target a DOM elements in Calypso. There are currently two ways to do this:\n+\n+- `data-tip-target` attribute on the target element\n+- using any css selector\n+\n+To find the DOM node, `document.querySelector` is used. By default, the query used is `[data-tip-target=\"${target}\"]`. However, if `target` starts with a dot or a space character, it will be treated like a standard selector and be passed directly to the function, thereby allowing you to target elements that do no set a `data-tip-target` attribute.\n+\n+### [data-tip-target]\n+\n+You mark a target by adding `data-tip-target=\"some-name\"` attribute to it with your value. Please be specific to avoid conflicts and use dash-case.\n+\n+In your tour, just put a value of your desired `[data-tip-target]` into the `target` prop.\n+\n+Example: you want to position a step of your tour to point to some input element.","path":"client/layout/guided-tours/docs/API.md","position":69,"original_position":69,"commit_id":"ace459d648b040384b6fe6a9203b1e334e21791b","original_commit_id":"ace459d648b040384b6fe6a9203b1e334e21791b","user":{"login":"mcsf","id":150562,"avatar_url":"https://avatars.githubusercontent.com/u/150562?v=3","gravatar_id":"","url":"https://api.github.com/users/mcsf","html_url":"https://github.com/mcsf","followers_url":"https://api.github.com/users/mcsf/followers","following_url":"https://api.github.com/users/mcsf/following{/other_user}","gists_url":"https://api.github.com/users/mcsf/gists{/gist_id}","starred_url":"https://api.github.com/users/mcsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcsf/subscriptions","organizations_url":"https://api.github.com/users/mcsf/orgs","repos_url":"https://api.github.com/users/mcsf/repos","events_url":"https://api.github.com/users/mcsf/events{/privacy}","received_events_url":"https://api.github.com/users/mcsf/received_events","type":"User","site_admin":false},"body":"Realizing that we don't discuss the benefits of using `data-tip-target`. It almost feels like it's a legacy thing, when really there are advantages to it, or at least there are according to our premises:\r\n\r\n- more unique than classes?\r\n- less likely to be changed by someone else? (*)\r\n\r\nShould we cover that? If so, what would you say about one method vs. the other?\r\n\r\n(*): because it's a _weird_ attribute, it's also more greppable, leading developers to Guided Tours","created_at":"2017-01-13T10:06:00Z","updated_at":"2017-01-13T10:09:37Z","html_url":"https://github.com/Automattic/wp-calypso/pull/10587#discussion_r95967475","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/95967475"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/10587#discussion_r95967475"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587","id":101275071,"html_url":"https://github.com/Automattic/wp-calypso/pull/10587","diff_url":"https://github.com/Automattic/wp-calypso/pull/10587.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/10587.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/10587","number":10587,"state":"open","locked":false,"title":"Guided Tours: Improvements for API docs","user":{"login":"marekhrabe","id":156676,"avatar_url":"https://avatars.githubusercontent.com/u/156676?v=3","gravatar_id":"","url":"https://api.github.com/users/marekhrabe","html_url":"https://github.com/marekhrabe","followers_url":"https://api.github.com/users/marekhrabe/followers","following_url":"https://api.github.com/users/marekhrabe/following{/other_user}","gists_url":"https://api.github.com/users/marekhrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marekhrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekhrabe/subscriptions","organizations_url":"https://api.github.com/users/marekhrabe/orgs","repos_url":"https://api.github.com/users/marekhrabe/repos","events_url":"https://api.github.com/users/marekhrabe/events{/privacy}","received_events_url":"https://api.github.com/users/marekhrabe/received_events","type":"User","site_admin":false},"body":"I had some things stashed that didn't make it to our first PR, so I'm adding those now.\r\n\r\nIt addresses few comments from the original PR and extracts documentation about element targeting into its own section and adds links to it.","created_at":"2017-01-12T15:00:44Z","updated_at":"2017-01-13T10:09:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1ec27e4e93f42e60048b9ab8ae01bddbe351723","assignee":{"login":"marekhrabe","id":156676,"avatar_url":"https://avatars.githubusercontent.com/u/156676?v=3","gravatar_id":"","url":"https://api.github.com/users/marekhrabe","html_url":"https://github.com/marekhrabe","followers_url":"https://api.github.com/users/marekhrabe/followers","following_url":"https://api.github.com/users/marekhrabe/following{/other_user}","gists_url":"https://api.github.com/users/marekhrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marekhrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekhrabe/subscriptions","organizations_url":"https://api.github.com/users/marekhrabe/orgs","repos_url":"https://api.github.com/users/marekhrabe/repos","events_url":"https://api.github.com/users/marekhrabe/events{/privacy}","received_events_url":"https://api.github.com/users/marekhrabe/received_events","type":"User","site_admin":false},"assignees":[{"login":"marekhrabe","id":156676,"avatar_url":"https://avatars.githubusercontent.com/u/156676?v=3","gravatar_id":"","url":"https://api.github.com/users/marekhrabe","html_url":"https://github.com/marekhrabe","followers_url":"https://api.github.com/users/marekhrabe/followers","following_url":"https://api.github.com/users/marekhrabe/following{/other_user}","gists_url":"https://api.github.com/users/marekhrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/marekhrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekhrabe/subscriptions","organizations_url":"https://api.github.com/users/marekhrabe/orgs","repos_url":"https://api.github.com/users/marekhrabe/repos","events_url":"https://api.github.com/users/marekhrabe/events{/privacy}","received_events_url":"https://api.github.com/users/marekhrabe/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/10587/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/ace459d648b040384b6fe6a9203b1e334e21791b","head":{"label":"Automattic:add/gt-api-docs-more-details","ref":"add/gt-api-docs-more-details","sha":"ace459d648b040384b6fe6a9203b1e334e21791b","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2017-01-13T07:47:04Z","pushed_at":"2017-01-13T10:07:17Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":41442,"stargazers_count":8323,"watchers_count":8323,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1062,"mirror_url":null,"open_issues_count":1615,"forks":1062,"open_issues":1615,"watchers":8323,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"717d027bba850cd681e0b61b27832a4ebf504ebe","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2017-01-13T07:47:04Z","pushed_at":"2017-01-13T10:07:17Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":41442,"stargazers_count":8323,"watchers_count":8323,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1062,"mirror_url":null,"open_issues_count":1615,"forks":1062,"open_issues":1615,"watchers":8323,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/10587"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/10587"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/10587/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/10587/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/ace459d648b040384b6fe6a9203b1e334e21791b"}}}}
{"actor":{"display_login":"mcsf"}}