{"action":"created","comment":{"url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/comments/119420234","pull_request_review_id":41292550,"id":119420234,"diff_hunk":"@@ -0,0 +1,42 @@\n+{##\n+ # @param {string} action - Search forms action attribute value\n+ # @param {string} method - Search forms method attribute value\n+ # @param {string} label  - Search forms label text\n+ # @param {string} searchTerm  - Search term used for search forms input value\n+ # @param {string} placeHolder  - Text used for Search inputs placeholder, defaults to label\n+ # @param {string} submitText  - Text used for Search submit, defaults to \"Search\"\n+ #\n+ # @return {string} HTML for search bar\n+ #\n+ # @example\n+ #   {% component 'search-bar', {\n+ #    action: '/search/company',\n+ #    method: 'get',\n+ #    label: 'Search...',\n+ #    searchTerm: searchTerm\n+ #   } %}\n+ #}\n+\n+{% set placeHolder = placeHolder | default(label) %}\n+{% set submitText = submitText | default('Search') %}\n+\n+<form class=\"search-bar\"\n+      action=\"{{ action }}\"\n+      method=\"{{ method }}\"\n+      role=\"search\">\n+  <div class=\"search-bar__wrapper\">\n+    <label class=\"visually-hidden\" for=\"search\">\n+      {{ label }}\n+    </label>\n+    <div class=\"search-bar__input-wrapper\">\n+      <input class=\"search-bar__input\"\n+             id=\"search\"\n+             type=\"search\"\n+             name=\"term\"\n+             value=\"{{ searchTerm }}\"\n+             placeholder=\"{{ placeHolder }}\"","path":"src/views/_components/search-bar.njk","position":37,"original_position":37,"commit_id":"20345f867a81fc9b2b9ec2daf04e5ddb5c94e80e","original_commit_id":"20345f867a81fc9b2b9ec2daf04e5ddb5c94e80e","user":{"login":"teneightfive","id":3327997,"avatar_url":"https://avatars2.githubusercontent.com/u/3327997?v=3","gravatar_id":"","url":"https://api.github.com/users/teneightfive","html_url":"https://github.com/teneightfive","followers_url":"https://api.github.com/users/teneightfive/followers","following_url":"https://api.github.com/users/teneightfive/following{/other_user}","gists_url":"https://api.github.com/users/teneightfive/gists{/gist_id}","starred_url":"https://api.github.com/users/teneightfive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teneightfive/subscriptions","organizations_url":"https://api.github.com/users/teneightfive/orgs","repos_url":"https://api.github.com/users/teneightfive/repos","events_url":"https://api.github.com/users/teneightfive/events{/privacy}","received_events_url":"https://api.github.com/users/teneightfive/received_events","type":"User","site_admin":false},"body":"Does it always have to include a placeholder? Might be better to make this completely optional and when calling it can be set to the same value of label if that's the desire.\r\n\r\nMight also be worth considering if the label should always be hidden of if that could be a property on the component.","created_at":"2017-05-31T17:23:42Z","updated_at":"2017-05-31T17:38:28Z","html_url":"https://github.com/uktrade/data-hub-fe-beta2/pull/139#discussion_r119420234","pull_request_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/comments/119420234"},"html":{"href":"https://github.com/uktrade/data-hub-fe-beta2/pull/139#discussion_r119420234"},"pull_request":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139","id":123273295,"html_url":"https://github.com/uktrade/data-hub-fe-beta2/pull/139","diff_url":"https://github.com/uktrade/data-hub-fe-beta2/pull/139.diff","patch_url":"https://github.com/uktrade/data-hub-fe-beta2/pull/139.patch","issue_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/139","number":139,"state":"open","locked":false,"title":"Search results Header and v3 api work","user":{"login":"feedmypixel","id":2305016,"avatar_url":"https://avatars3.githubusercontent.com/u/2305016?v=3","gravatar_id":"","url":"https://api.github.com/users/feedmypixel","html_url":"https://github.com/feedmypixel","followers_url":"https://api.github.com/users/feedmypixel/followers","following_url":"https://api.github.com/users/feedmypixel/following{/other_user}","gists_url":"https://api.github.com/users/feedmypixel/gists{/gist_id}","starred_url":"https://api.github.com/users/feedmypixel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedmypixel/subscriptions","organizations_url":"https://api.github.com/users/feedmypixel/orgs","repos_url":"https://api.github.com/users/feedmypixel/repos","events_url":"https://api.github.com/users/feedmypixel/events{/privacy}","received_events_url":"https://api.github.com/users/feedmypixel/received_events","type":"User","site_admin":false},"body":"Fundamentally this works is for `Jira > DH-242` **Create faceted search results header**. But due to [yak shaving](https://en.wiktionary.org/wiki/yak_shaving) it has encompassed a lot more.\r\n\r\n- Create faceted search results header\r\n- Update Search to work with `v3/search` endpoint and response\r\n- Refactor Search, pagination components and bring them over from Trade Elements\r\n- Create Search Nav, Results Summary components\r\n- Refactor associated nunjucks filter and bring over from Trade Elements\r\n- Refactor, modularise and BEM associated styles\r\n- Add [Joi validation](https://github.com/hapijs/joi/tree/v10.5.2) with [Celebrate Joi Validation middleware](https://github.com/continuationlabs/celebrate) for query, params, headers, body validation (potential for validation schemas becoming separate files if we move folder structure to being about features not concerns)\r\n\r\n### Of Note\r\n- This has been ran against a local checkout of [data-hub-leeloo/pull/212](https://github.com/uktrade/data-hub-leeloo/pull/212) and works as expected\r\n- I have removed the display of **Incorportation Date** as this is now not available directly from `/v3/search`\r\n\r\n![searchresults](https://cloud.githubusercontent.com/assets/2305016/26639488/ddf80cfe-461c-11e7-93e2-3c7ea2d18e85.gif)\r\n\r\n","created_at":"2017-05-31T13:29:45Z","updated_at":"2017-05-31T17:38:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6bc28fff1672eb00e27cb809d51e4dcfe8e171d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ztolley","id":56056,"avatar_url":"https://avatars2.githubusercontent.com/u/56056?v=3","gravatar_id":"","url":"https://api.github.com/users/ztolley","html_url":"https://github.com/ztolley","followers_url":"https://api.github.com/users/ztolley/followers","following_url":"https://api.github.com/users/ztolley/following{/other_user}","gists_url":"https://api.github.com/users/ztolley/gists{/gist_id}","starred_url":"https://api.github.com/users/ztolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ztolley/subscriptions","organizations_url":"https://api.github.com/users/ztolley/orgs","repos_url":"https://api.github.com/users/ztolley/repos","events_url":"https://api.github.com/users/ztolley/events{/privacy}","received_events_url":"https://api.github.com/users/ztolley/received_events","type":"User","site_admin":false},{"login":"jim68000","id":161962,"avatar_url":"https://avatars0.githubusercontent.com/u/161962?v=3","gravatar_id":"","url":"https://api.github.com/users/jim68000","html_url":"https://github.com/jim68000","followers_url":"https://api.github.com/users/jim68000/followers","following_url":"https://api.github.com/users/jim68000/following{/other_user}","gists_url":"https://api.github.com/users/jim68000/gists{/gist_id}","starred_url":"https://api.github.com/users/jim68000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jim68000/subscriptions","organizations_url":"https://api.github.com/users/jim68000/orgs","repos_url":"https://api.github.com/users/jim68000/repos","events_url":"https://api.github.com/users/jim68000/events{/privacy}","received_events_url":"https://api.github.com/users/jim68000/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139/commits","review_comments_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139/comments","review_comment_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/139/comments","statuses_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/statuses/20345f867a81fc9b2b9ec2daf04e5ddb5c94e80e","head":{"label":"uktrade:feature/DH-242-search-results-nav","ref":"feature/DH-242-search-results-nav","sha":"20345f867a81fc9b2b9ec2daf04e5ddb5c94e80e","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars1.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":83823675,"name":"data-hub-fe-beta2","full_name":"uktrade/data-hub-fe-beta2","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars1.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/data-hub-fe-beta2","description":null,"fork":false,"url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2","forks_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/forks","keys_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/teams","hooks_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/hooks","issue_events_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/events","assignees_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/tags","blobs_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/languages","stargazers_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/stargazers","contributors_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/contributors","subscribers_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/subscribers","subscription_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/subscription","commits_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/merges","archive_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/downloads","issues_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/deployments","created_at":"2017-03-03T17:26:35Z","updated_at":"2017-03-03T17:29:13Z","pushed_at":"2017-05-31T16:55:10Z","git_url":"git://github.com/uktrade/data-hub-fe-beta2.git","ssh_url":"git@github.com:uktrade/data-hub-fe-beta2.git","clone_url":"https://github.com/uktrade/data-hub-fe-beta2.git","svn_url":"https://github.com/uktrade/data-hub-fe-beta2","homepage":null,"size":869,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"develop"}},"base":{"label":"uktrade:develop","ref":"develop","sha":"fd281ea82c7cca07491fc0d22d34abbd27ce7b9f","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars1.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":83823675,"name":"data-hub-fe-beta2","full_name":"uktrade/data-hub-fe-beta2","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars1.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/data-hub-fe-beta2","description":null,"fork":false,"url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2","forks_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/forks","keys_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/teams","hooks_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/hooks","issue_events_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/events","assignees_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/tags","blobs_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/languages","stargazers_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/stargazers","contributors_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/contributors","subscribers_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/subscribers","subscription_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/subscription","commits_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/merges","archive_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/downloads","issues_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/deployments","created_at":"2017-03-03T17:26:35Z","updated_at":"2017-03-03T17:29:13Z","pushed_at":"2017-05-31T16:55:10Z","git_url":"git://github.com/uktrade/data-hub-fe-beta2.git","ssh_url":"git@github.com:uktrade/data-hub-fe-beta2.git","clone_url":"https://github.com/uktrade/data-hub-fe-beta2.git","svn_url":"https://github.com/uktrade/data-hub-fe-beta2","homepage":null,"size":869,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139"},"html":{"href":"https://github.com/uktrade/data-hub-fe-beta2/pull/139"},"issue":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/139"},"comments":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/uktrade/data-hub-fe-beta2/statuses/20345f867a81fc9b2b9ec2daf04e5ddb5c94e80e"}}}}
{"actor":{"display_login":"teneightfive"}}