{"action":"created","comment":{"url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/comments/102296989","pull_request_review_id":23049943,"id":102296989,"diff_hunk":"@@ -8,20 +8,27 @@ path: form\n ---\n \n # Form\n+<p class=\"lead\">\n+  The form component is built as a jQuery plugin responsible for handling the state of input elements.\n+</p>\n \n ### How to use\n-As in right now, the `form` plugin is responsible to handle the `.active` state of the `.field`:\n-\n+By passing an object as a parameter to the `form` function, you can define the `event` that will trigger the component's action, as well as list the `selectors` attached to that event.\n ```js\n-// accepted options / default values:\n+// accepted options\n var options = {\n   events: 'change',\n   selectors: '.input, select, .select, .textarea'\n };\n \n $('[data-form]').form(options);\n ```\n+<p class=\"notification notification-warning\">\n+  Notice that the strings used in the example above are the default values.\n+</p>\n \n-The constructor will loop through each `selector` found on the element and check if it has either a `value` or `placeholder`, then add/remove the `.active` class on the `.field` molecule. If the `selector` does not have a `.field` and parent, the verification will be skipped, and no classes will be added.\n+With that, whenever a `change` event occurs in one of the selectors listed, the component will toggle the `.active` class, if needed.\n \n-The provided event listener will do the same verification process.\n+### How it works\n+The component constructor will loop through each `selector` found on the element and check if it has either a `value` or a `placeholder`, then add or remove the `.active` class on the `.field` molecule. If the `selector` does not have a `.field` as a parent, the verification will be skipped, and no classes will be added.","path":"docs/js/form.md","position":31,"original_position":31,"commit_id":"d2dd2fe931c0427a793214dbe845af97d2a8fc76","original_commit_id":"d2dd2fe931c0427a793214dbe845af97d2a8fc76","user":{"login":"felipesoares6","id":17216397,"avatar_url":"https://avatars.githubusercontent.com/u/17216397?v=3","gravatar_id":"","url":"https://api.github.com/users/felipesoares6","html_url":"https://github.com/felipesoares6","followers_url":"https://api.github.com/users/felipesoares6/followers","following_url":"https://api.github.com/users/felipesoares6/following{/other_user}","gists_url":"https://api.github.com/users/felipesoares6/gists{/gist_id}","starred_url":"https://api.github.com/users/felipesoares6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipesoares6/subscriptions","organizations_url":"https://api.github.com/users/felipesoares6/orgs","repos_url":"https://api.github.com/users/felipesoares6/repos","events_url":"https://api.github.com/users/felipesoares6/events{/privacy}","received_events_url":"https://api.github.com/users/felipesoares6/received_events","type":"User","site_admin":false},"body":"What do you think about `add  to or remove the `.active` class from the element`?","created_at":"2017-02-21T19:35:20Z","updated_at":"2017-02-21T19:35:20Z","html_url":"https://github.com/leroy-merlin-br/garden/pull/193#discussion_r102296989","pull_request_url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193","_links":{"self":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/comments/102296989"},"html":{"href":"https://github.com/leroy-merlin-br/garden/pull/193#discussion_r102296989"},"pull_request":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193"}}},"pull_request":{"url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193","id":107245965,"html_url":"https://github.com/leroy-merlin-br/garden/pull/193","diff_url":"https://github.com/leroy-merlin-br/garden/pull/193.diff","patch_url":"https://github.com/leroy-merlin-br/garden/pull/193.patch","issue_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues/193","number":193,"state":"open","locked":false,"title":"docs(js-form): Improve documentation for Form component","user":{"login":"willamesoares","id":6568078,"avatar_url":"https://avatars.githubusercontent.com/u/6568078?v=3","gravatar_id":"","url":"https://api.github.com/users/willamesoares","html_url":"https://github.com/willamesoares","followers_url":"https://api.github.com/users/willamesoares/followers","following_url":"https://api.github.com/users/willamesoares/following{/other_user}","gists_url":"https://api.github.com/users/willamesoares/gists{/gist_id}","starred_url":"https://api.github.com/users/willamesoares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willamesoares/subscriptions","organizations_url":"https://api.github.com/users/willamesoares/orgs","repos_url":"https://api.github.com/users/willamesoares/repos","events_url":"https://api.github.com/users/willamesoares/events{/privacy}","received_events_url":"https://api.github.com/users/willamesoares/received_events","type":"User","site_admin":false},"body":"Adjust sentences and structure for text paragraphs.","created_at":"2017-02-21T18:06:31Z","updated_at":"2017-02-21T19:35:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e77fcfdef0a0121cda5dc026075434f2eec6d364","assignee":{"login":"willamesoares","id":6568078,"avatar_url":"https://avatars.githubusercontent.com/u/6568078?v=3","gravatar_id":"","url":"https://api.github.com/users/willamesoares","html_url":"https://github.com/willamesoares","followers_url":"https://api.github.com/users/willamesoares/followers","following_url":"https://api.github.com/users/willamesoares/following{/other_user}","gists_url":"https://api.github.com/users/willamesoares/gists{/gist_id}","starred_url":"https://api.github.com/users/willamesoares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willamesoares/subscriptions","organizations_url":"https://api.github.com/users/willamesoares/orgs","repos_url":"https://api.github.com/users/willamesoares/repos","events_url":"https://api.github.com/users/willamesoares/events{/privacy}","received_events_url":"https://api.github.com/users/willamesoares/received_events","type":"User","site_admin":false},"assignees":[{"login":"willamesoares","id":6568078,"avatar_url":"https://avatars.githubusercontent.com/u/6568078?v=3","gravatar_id":"","url":"https://api.github.com/users/willamesoares","html_url":"https://github.com/willamesoares","followers_url":"https://api.github.com/users/willamesoares/followers","following_url":"https://api.github.com/users/willamesoares/following{/other_user}","gists_url":"https://api.github.com/users/willamesoares/gists{/gist_id}","starred_url":"https://api.github.com/users/willamesoares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willamesoares/subscriptions","organizations_url":"https://api.github.com/users/willamesoares/orgs","repos_url":"https://api.github.com/users/willamesoares/repos","events_url":"https://api.github.com/users/willamesoares/events{/privacy}","received_events_url":"https://api.github.com/users/willamesoares/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193/commits","review_comments_url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193/comments","review_comment_url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues/193/comments","statuses_url":"https://api.github.com/repos/leroy-merlin-br/garden/statuses/d2dd2fe931c0427a793214dbe845af97d2a8fc76","head":{"label":"leroy-merlin-br:docs/js/form","ref":"docs/js/form","sha":"d2dd2fe931c0427a793214dbe845af97d2a8fc76","user":{"login":"leroy-merlin-br","id":4422202,"avatar_url":"https://avatars.githubusercontent.com/u/4422202?v=3","gravatar_id":"","url":"https://api.github.com/users/leroy-merlin-br","html_url":"https://github.com/leroy-merlin-br","followers_url":"https://api.github.com/users/leroy-merlin-br/followers","following_url":"https://api.github.com/users/leroy-merlin-br/following{/other_user}","gists_url":"https://api.github.com/users/leroy-merlin-br/gists{/gist_id}","starred_url":"https://api.github.com/users/leroy-merlin-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leroy-merlin-br/subscriptions","organizations_url":"https://api.github.com/users/leroy-merlin-br/orgs","repos_url":"https://api.github.com/users/leroy-merlin-br/repos","events_url":"https://api.github.com/users/leroy-merlin-br/events{/privacy}","received_events_url":"https://api.github.com/users/leroy-merlin-br/received_events","type":"Organization","site_admin":false},"repo":{"id":48196975,"name":"garden","full_name":"leroy-merlin-br/garden","owner":{"login":"leroy-merlin-br","id":4422202,"avatar_url":"https://avatars.githubusercontent.com/u/4422202?v=3","gravatar_id":"","url":"https://api.github.com/users/leroy-merlin-br","html_url":"https://github.com/leroy-merlin-br","followers_url":"https://api.github.com/users/leroy-merlin-br/followers","following_url":"https://api.github.com/users/leroy-merlin-br/following{/other_user}","gists_url":"https://api.github.com/users/leroy-merlin-br/gists{/gist_id}","starred_url":"https://api.github.com/users/leroy-merlin-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leroy-merlin-br/subscriptions","organizations_url":"https://api.github.com/users/leroy-merlin-br/orgs","repos_url":"https://api.github.com/users/leroy-merlin-br/repos","events_url":"https://api.github.com/users/leroy-merlin-br/events{/privacy}","received_events_url":"https://api.github.com/users/leroy-merlin-br/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leroy-merlin-br/garden","description":"A styleguide based on Leroy Merlin needs","fork":false,"url":"https://api.github.com/repos/leroy-merlin-br/garden","forks_url":"https://api.github.com/repos/leroy-merlin-br/garden/forks","keys_url":"https://api.github.com/repos/leroy-merlin-br/garden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leroy-merlin-br/garden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leroy-merlin-br/garden/teams","hooks_url":"https://api.github.com/repos/leroy-merlin-br/garden/hooks","issue_events_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues/events{/number}","events_url":"https://api.github.com/repos/leroy-merlin-br/garden/events","assignees_url":"https://api.github.com/repos/leroy-merlin-br/garden/assignees{/user}","branches_url":"https://api.github.com/repos/leroy-merlin-br/garden/branches{/branch}","tags_url":"https://api.github.com/repos/leroy-merlin-br/garden/tags","blobs_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/refs{/sha}","trees_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leroy-merlin-br/garden/statuses/{sha}","languages_url":"https://api.github.com/repos/leroy-merlin-br/garden/languages","stargazers_url":"https://api.github.com/repos/leroy-merlin-br/garden/stargazers","contributors_url":"https://api.github.com/repos/leroy-merlin-br/garden/contributors","subscribers_url":"https://api.github.com/repos/leroy-merlin-br/garden/subscribers","subscription_url":"https://api.github.com/repos/leroy-merlin-br/garden/subscription","commits_url":"https://api.github.com/repos/leroy-merlin-br/garden/commits{/sha}","git_commits_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/commits{/sha}","comments_url":"https://api.github.com/repos/leroy-merlin-br/garden/comments{/number}","issue_comment_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues/comments{/number}","contents_url":"https://api.github.com/repos/leroy-merlin-br/garden/contents/{+path}","compare_url":"https://api.github.com/repos/leroy-merlin-br/garden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leroy-merlin-br/garden/merges","archive_url":"https://api.github.com/repos/leroy-merlin-br/garden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leroy-merlin-br/garden/downloads","issues_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues{/number}","pulls_url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls{/number}","milestones_url":"https://api.github.com/repos/leroy-merlin-br/garden/milestones{/number}","notifications_url":"https://api.github.com/repos/leroy-merlin-br/garden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leroy-merlin-br/garden/labels{/name}","releases_url":"https://api.github.com/repos/leroy-merlin-br/garden/releases{/id}","deployments_url":"https://api.github.com/repos/leroy-merlin-br/garden/deployments","created_at":"2015-12-17T20:36:16Z","updated_at":"2017-02-20T20:33:02Z","pushed_at":"2017-02-21T19:15:06Z","git_url":"git://github.com/leroy-merlin-br/garden.git","ssh_url":"git@github.com:leroy-merlin-br/garden.git","clone_url":"https://github.com/leroy-merlin-br/garden.git","svn_url":"https://github.com/leroy-merlin-br/garden","homepage":"http://styleguide.leroymerlin.com.br","size":1727,"stargazers_count":33,"watchers_count":33,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":33,"default_branch":"master"}},"base":{"label":"leroy-merlin-br:master","ref":"master","sha":"0df55fcff5e12b04accd049f9e42c1498f7fa211","user":{"login":"leroy-merlin-br","id":4422202,"avatar_url":"https://avatars.githubusercontent.com/u/4422202?v=3","gravatar_id":"","url":"https://api.github.com/users/leroy-merlin-br","html_url":"https://github.com/leroy-merlin-br","followers_url":"https://api.github.com/users/leroy-merlin-br/followers","following_url":"https://api.github.com/users/leroy-merlin-br/following{/other_user}","gists_url":"https://api.github.com/users/leroy-merlin-br/gists{/gist_id}","starred_url":"https://api.github.com/users/leroy-merlin-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leroy-merlin-br/subscriptions","organizations_url":"https://api.github.com/users/leroy-merlin-br/orgs","repos_url":"https://api.github.com/users/leroy-merlin-br/repos","events_url":"https://api.github.com/users/leroy-merlin-br/events{/privacy}","received_events_url":"https://api.github.com/users/leroy-merlin-br/received_events","type":"Organization","site_admin":false},"repo":{"id":48196975,"name":"garden","full_name":"leroy-merlin-br/garden","owner":{"login":"leroy-merlin-br","id":4422202,"avatar_url":"https://avatars.githubusercontent.com/u/4422202?v=3","gravatar_id":"","url":"https://api.github.com/users/leroy-merlin-br","html_url":"https://github.com/leroy-merlin-br","followers_url":"https://api.github.com/users/leroy-merlin-br/followers","following_url":"https://api.github.com/users/leroy-merlin-br/following{/other_user}","gists_url":"https://api.github.com/users/leroy-merlin-br/gists{/gist_id}","starred_url":"https://api.github.com/users/leroy-merlin-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leroy-merlin-br/subscriptions","organizations_url":"https://api.github.com/users/leroy-merlin-br/orgs","repos_url":"https://api.github.com/users/leroy-merlin-br/repos","events_url":"https://api.github.com/users/leroy-merlin-br/events{/privacy}","received_events_url":"https://api.github.com/users/leroy-merlin-br/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leroy-merlin-br/garden","description":"A styleguide based on Leroy Merlin needs","fork":false,"url":"https://api.github.com/repos/leroy-merlin-br/garden","forks_url":"https://api.github.com/repos/leroy-merlin-br/garden/forks","keys_url":"https://api.github.com/repos/leroy-merlin-br/garden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leroy-merlin-br/garden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leroy-merlin-br/garden/teams","hooks_url":"https://api.github.com/repos/leroy-merlin-br/garden/hooks","issue_events_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues/events{/number}","events_url":"https://api.github.com/repos/leroy-merlin-br/garden/events","assignees_url":"https://api.github.com/repos/leroy-merlin-br/garden/assignees{/user}","branches_url":"https://api.github.com/repos/leroy-merlin-br/garden/branches{/branch}","tags_url":"https://api.github.com/repos/leroy-merlin-br/garden/tags","blobs_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/refs{/sha}","trees_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leroy-merlin-br/garden/statuses/{sha}","languages_url":"https://api.github.com/repos/leroy-merlin-br/garden/languages","stargazers_url":"https://api.github.com/repos/leroy-merlin-br/garden/stargazers","contributors_url":"https://api.github.com/repos/leroy-merlin-br/garden/contributors","subscribers_url":"https://api.github.com/repos/leroy-merlin-br/garden/subscribers","subscription_url":"https://api.github.com/repos/leroy-merlin-br/garden/subscription","commits_url":"https://api.github.com/repos/leroy-merlin-br/garden/commits{/sha}","git_commits_url":"https://api.github.com/repos/leroy-merlin-br/garden/git/commits{/sha}","comments_url":"https://api.github.com/repos/leroy-merlin-br/garden/comments{/number}","issue_comment_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues/comments{/number}","contents_url":"https://api.github.com/repos/leroy-merlin-br/garden/contents/{+path}","compare_url":"https://api.github.com/repos/leroy-merlin-br/garden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leroy-merlin-br/garden/merges","archive_url":"https://api.github.com/repos/leroy-merlin-br/garden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leroy-merlin-br/garden/downloads","issues_url":"https://api.github.com/repos/leroy-merlin-br/garden/issues{/number}","pulls_url":"https://api.github.com/repos/leroy-merlin-br/garden/pulls{/number}","milestones_url":"https://api.github.com/repos/leroy-merlin-br/garden/milestones{/number}","notifications_url":"https://api.github.com/repos/leroy-merlin-br/garden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leroy-merlin-br/garden/labels{/name}","releases_url":"https://api.github.com/repos/leroy-merlin-br/garden/releases{/id}","deployments_url":"https://api.github.com/repos/leroy-merlin-br/garden/deployments","created_at":"2015-12-17T20:36:16Z","updated_at":"2017-02-20T20:33:02Z","pushed_at":"2017-02-21T19:15:06Z","git_url":"git://github.com/leroy-merlin-br/garden.git","ssh_url":"git@github.com:leroy-merlin-br/garden.git","clone_url":"https://github.com/leroy-merlin-br/garden.git","svn_url":"https://github.com/leroy-merlin-br/garden","homepage":"http://styleguide.leroymerlin.com.br","size":1727,"stargazers_count":33,"watchers_count":33,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193"},"html":{"href":"https://github.com/leroy-merlin-br/garden/pull/193"},"issue":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/issues/193"},"comments":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/issues/193/comments"},"review_comments":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193/comments"},"review_comment":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/pulls/193/commits"},"statuses":{"href":"https://api.github.com/repos/leroy-merlin-br/garden/statuses/d2dd2fe931c0427a793214dbe845af97d2a8fc76"}}}}
{"actor":{"display_login":"felipesoares6"}}