{"action":"created","comment":{"url":"https://api.github.com/repos/yldio/yld.io/pulls/comments/303783977","pull_request_review_id":262258162,"id":303783977,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMzc4Mzk3Nw==","diff_hunk":"@@ -0,0 +1,118 @@\n+import React, { Fragment } from 'react'\n+import Ajv from 'ajv'\n+\n+import {\n+  communitySchema,\n+  projectsSchema,\n+  clientSchema\n+} from './speciality/schemas'\n+\n+import {\n+  getExternalType,\n+  getSpecialityEvents,\n+  flattenSpeciality\n+} from './speciality/methods'\n+\n+import IntroSection from '../components/Speciality/Intro'\n+import ProjectsSection from '../components/Speciality/Projects'\n+import TrainingSection from '../components/Speciality/Training'\n+import CommunitySection from '../components/Speciality/Community'\n+import EventSection from '../components/Common/Events'\n+import TalksSection from '../components/Speciality/Talks'\n+import GetInTouch from '../components/Common/GetInTouch'\n+import TutorialsSection from '../components/Speciality/Tutorials'\n+import BooksSection from '../components/Speciality/Books'\n+import BlogListing from '../components/Common/BlogListing'\n+import GreyBackground from '../components/Common/GreyBackground'\n+\n+const ajv = new Ajv({ allErrors: true })\n+\n+export const SpecialityView = props => {\n+  const {\n+    data: {\n+      contentfulSpeciality: speciality,\n+      allContentfulMeetupEvent: { edges: events },\n+      videoIcon,\n+      filteredPosts = []\n+    }\n+  } = props\n+\n+  const flattenedSpeciality = flattenSpeciality(speciality)\n+\n+  const validateCommunity = ajv.compile(communitySchema)\n+  const validateProjects = ajv.compile(projectsSchema)\n+  const validateClients = ajv.compile(clientSchema)\n+\n+  const {\n+    title,\n+    contactText,\n+    eventIcon,\n+    relatedProjects,\n+    clients\n+  } = flattenedSpeciality\n+\n+  const { edges: postEdges = [] } = filteredPosts\n+  const posts = postEdges.map(({ node }) => node)\n+  const talks = getExternalType(flattenedSpeciality, `Talk`)\n+  const tutorials = getExternalType(flattenedSpeciality, `Tutorial`)\n+  const books = getExternalType(flattenedSpeciality, `Book`)\n+  const specialityEvents =\n+    events && events.length > 0 ? getSpecialityEvents(title, events) : []\n+\n+  const renderProjectsSection =\n+    validateProjects(relatedProjects) || validateClients(clients)\n+  const renderCommunitySection = validateCommunity(flattenedSpeciality)\n+\n+  const renderTalksSection = talks && talks.length > 0","path":"src/templates/speciality-component.js","position":66,"original_position":66,"commit_id":"b11c542c16c9249ed18610cf6adaa10a645fa7b9","original_commit_id":"b11c542c16c9249ed18610cf6adaa10a645fa7b9","user":{"login":"GBouffard","id":10553003,"node_id":"MDQ6VXNlcjEwNTUzMDAz","avatar_url":"https://avatars3.githubusercontent.com/u/10553003?v=4","gravatar_id":"","url":"https://api.github.com/users/GBouffard","html_url":"https://github.com/GBouffard","followers_url":"https://api.github.com/users/GBouffard/followers","following_url":"https://api.github.com/users/GBouffard/following{/other_user}","gists_url":"https://api.github.com/users/GBouffard/gists{/gist_id}","starred_url":"https://api.github.com/users/GBouffard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GBouffard/subscriptions","organizations_url":"https://api.github.com/users/GBouffard/orgs","repos_url":"https://api.github.com/users/GBouffard/repos","events_url":"https://api.github.com/users/GBouffard/events{/privacy}","received_events_url":"https://api.github.com/users/GBouffard/received_events","type":"User","site_admin":false},"body":"I would have called all these sections `hasTalks`, `hasBooks` and `hasBlogs` even if it's pretty easy to understand what it does.","created_at":"2019-07-16T08:27:03Z","updated_at":"2019-07-16T08:27:04Z","html_url":"https://github.com/yldio/yld.io/pull/294#discussion_r303783977","pull_request_url":"https://api.github.com/repos/yldio/yld.io/pulls/294","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/yldio/yld.io/pulls/comments/303783977"},"html":{"href":"https://github.com/yldio/yld.io/pull/294#discussion_r303783977"},"pull_request":{"href":"https://api.github.com/repos/yldio/yld.io/pulls/294"}}},"pull_request":{"url":"https://api.github.com/repos/yldio/yld.io/pulls/294","id":297909205,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk3OTA5MjA1","html_url":"https://github.com/yldio/yld.io/pull/294","diff_url":"https://github.com/yldio/yld.io/pull/294.diff","patch_url":"https://github.com/yldio/yld.io/pull/294.patch","issue_url":"https://api.github.com/repos/yldio/yld.io/issues/294","number":294,"state":"open","locked":false,"title":"Speciality Page Story with toggle","user":{"login":"omonk","id":7108120,"node_id":"MDQ6VXNlcjcxMDgxMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/7108120?v=4","gravatar_id":"","url":"https://api.github.com/users/omonk","html_url":"https://github.com/omonk","followers_url":"https://api.github.com/users/omonk/followers","following_url":"https://api.github.com/users/omonk/following{/other_user}","gists_url":"https://api.github.com/users/omonk/gists{/gist_id}","starred_url":"https://api.github.com/users/omonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omonk/subscriptions","organizations_url":"https://api.github.com/users/omonk/orgs","repos_url":"https://api.github.com/users/omonk/repos","events_url":"https://api.github.com/users/omonk/events{/privacy}","received_events_url":"https://api.github.com/users/omonk/received_events","type":"User","site_admin":false},"body":"## Description - [Trello ticket](https://trello.com/c/5Rd8fBwJ/542-speciality-update-create-story-for-speciality-component)\r\n\r\n- Adds story for the entire speciality page\r\n- Adds toggle functionality so we can hide and show specific sections of the template\r\n","created_at":"2019-07-16T07:25:08Z","updated_at":"2019-07-16T08:27:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2f747fe266eac1338ba9d9ffd27818fe29837f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yldio/yld.io/pulls/294/commits","review_comments_url":"https://api.github.com/repos/yldio/yld.io/pulls/294/comments","review_comment_url":"https://api.github.com/repos/yldio/yld.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yldio/yld.io/issues/294/comments","statuses_url":"https://api.github.com/repos/yldio/yld.io/statuses/b11c542c16c9249ed18610cf6adaa10a645fa7b9","head":{"label":"yldio:seo-speciality-template-2","ref":"seo-speciality-template-2","sha":"b11c542c16c9249ed18610cf6adaa10a645fa7b9","user":{"login":"yldio","id":6999859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5OTk4NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/6999859?v=4","gravatar_id":"","url":"https://api.github.com/users/yldio","html_url":"https://github.com/yldio","followers_url":"https://api.github.com/users/yldio/followers","following_url":"https://api.github.com/users/yldio/following{/other_user}","gists_url":"https://api.github.com/users/yldio/gists{/gist_id}","starred_url":"https://api.github.com/users/yldio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yldio/subscriptions","organizations_url":"https://api.github.com/users/yldio/orgs","repos_url":"https://api.github.com/users/yldio/repos","events_url":"https://api.github.com/users/yldio/events{/privacy}","received_events_url":"https://api.github.com/users/yldio/received_events","type":"Organization","site_admin":false},"repo":{"id":155368032,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUzNjgwMzI=","name":"yld.io","full_name":"yldio/yld.io","private":false,"owner":{"login":"yldio","id":6999859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5OTk4NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/6999859?v=4","gravatar_id":"","url":"https://api.github.com/users/yldio","html_url":"https://github.com/yldio","followers_url":"https://api.github.com/users/yldio/followers","following_url":"https://api.github.com/users/yldio/following{/other_user}","gists_url":"https://api.github.com/users/yldio/gists{/gist_id}","starred_url":"https://api.github.com/users/yldio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yldio/subscriptions","organizations_url":"https://api.github.com/users/yldio/orgs","repos_url":"https://api.github.com/users/yldio/repos","events_url":"https://api.github.com/users/yldio/events{/privacy}","received_events_url":"https://api.github.com/users/yldio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/yldio/yld.io","description":"YLD Website","fork":false,"url":"https://api.github.com/repos/yldio/yld.io","forks_url":"https://api.github.com/repos/yldio/yld.io/forks","keys_url":"https://api.github.com/repos/yldio/yld.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yldio/yld.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yldio/yld.io/teams","hooks_url":"https://api.github.com/repos/yldio/yld.io/hooks","issue_events_url":"https://api.github.com/repos/yldio/yld.io/issues/events{/number}","events_url":"https://api.github.com/repos/yldio/yld.io/events","assignees_url":"https://api.github.com/repos/yldio/yld.io/assignees{/user}","branches_url":"https://api.github.com/repos/yldio/yld.io/branches{/branch}","tags_url":"https://api.github.com/repos/yldio/yld.io/tags","blobs_url":"https://api.github.com/repos/yldio/yld.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yldio/yld.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yldio/yld.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/yldio/yld.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yldio/yld.io/statuses/{sha}","languages_url":"https://api.github.com/repos/yldio/yld.io/languages","stargazers_url":"https://api.github.com/repos/yldio/yld.io/stargazers","contributors_url":"https://api.github.com/repos/yldio/yld.io/contributors","subscribers_url":"https://api.github.com/repos/yldio/yld.io/subscribers","subscription_url":"https://api.github.com/repos/yldio/yld.io/subscription","commits_url":"https://api.github.com/repos/yldio/yld.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/yldio/yld.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/yldio/yld.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/yldio/yld.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/yldio/yld.io/contents/{+path}","compare_url":"https://api.github.com/repos/yldio/yld.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yldio/yld.io/merges","archive_url":"https://api.github.com/repos/yldio/yld.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yldio/yld.io/downloads","issues_url":"https://api.github.com/repos/yldio/yld.io/issues{/number}","pulls_url":"https://api.github.com/repos/yldio/yld.io/pulls{/number}","milestones_url":"https://api.github.com/repos/yldio/yld.io/milestones{/number}","notifications_url":"https://api.github.com/repos/yldio/yld.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yldio/yld.io/labels{/name}","releases_url":"https://api.github.com/repos/yldio/yld.io/releases{/id}","deployments_url":"https://api.github.com/repos/yldio/yld.io/deployments","created_at":"2018-10-30T10:42:29Z","updated_at":"2019-07-16T02:37:36Z","pushed_at":"2019-07-16T07:29:59Z","git_url":"git://github.com/yldio/yld.io.git","ssh_url":"git@github.com:yldio/yld.io.git","clone_url":"https://github.com/yldio/yld.io.git","svn_url":"https://github.com/yldio/yld.io","homepage":"https://yld.io/","size":20310,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":3,"open_issues":4,"watchers":13,"default_branch":"master"}},"base":{"label":"yldio:master","ref":"master","sha":"806df206ec30981d1bca372e32a87bf090a58a53","user":{"login":"yldio","id":6999859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5OTk4NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/6999859?v=4","gravatar_id":"","url":"https://api.github.com/users/yldio","html_url":"https://github.com/yldio","followers_url":"https://api.github.com/users/yldio/followers","following_url":"https://api.github.com/users/yldio/following{/other_user}","gists_url":"https://api.github.com/users/yldio/gists{/gist_id}","starred_url":"https://api.github.com/users/yldio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yldio/subscriptions","organizations_url":"https://api.github.com/users/yldio/orgs","repos_url":"https://api.github.com/users/yldio/repos","events_url":"https://api.github.com/users/yldio/events{/privacy}","received_events_url":"https://api.github.com/users/yldio/received_events","type":"Organization","site_admin":false},"repo":{"id":155368032,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUzNjgwMzI=","name":"yld.io","full_name":"yldio/yld.io","private":false,"owner":{"login":"yldio","id":6999859,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5OTk4NTk=","avatar_url":"https://avatars3.githubusercontent.com/u/6999859?v=4","gravatar_id":"","url":"https://api.github.com/users/yldio","html_url":"https://github.com/yldio","followers_url":"https://api.github.com/users/yldio/followers","following_url":"https://api.github.com/users/yldio/following{/other_user}","gists_url":"https://api.github.com/users/yldio/gists{/gist_id}","starred_url":"https://api.github.com/users/yldio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yldio/subscriptions","organizations_url":"https://api.github.com/users/yldio/orgs","repos_url":"https://api.github.com/users/yldio/repos","events_url":"https://api.github.com/users/yldio/events{/privacy}","received_events_url":"https://api.github.com/users/yldio/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/yldio/yld.io","description":"YLD Website","fork":false,"url":"https://api.github.com/repos/yldio/yld.io","forks_url":"https://api.github.com/repos/yldio/yld.io/forks","keys_url":"https://api.github.com/repos/yldio/yld.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yldio/yld.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yldio/yld.io/teams","hooks_url":"https://api.github.com/repos/yldio/yld.io/hooks","issue_events_url":"https://api.github.com/repos/yldio/yld.io/issues/events{/number}","events_url":"https://api.github.com/repos/yldio/yld.io/events","assignees_url":"https://api.github.com/repos/yldio/yld.io/assignees{/user}","branches_url":"https://api.github.com/repos/yldio/yld.io/branches{/branch}","tags_url":"https://api.github.com/repos/yldio/yld.io/tags","blobs_url":"https://api.github.com/repos/yldio/yld.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yldio/yld.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yldio/yld.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/yldio/yld.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yldio/yld.io/statuses/{sha}","languages_url":"https://api.github.com/repos/yldio/yld.io/languages","stargazers_url":"https://api.github.com/repos/yldio/yld.io/stargazers","contributors_url":"https://api.github.com/repos/yldio/yld.io/contributors","subscribers_url":"https://api.github.com/repos/yldio/yld.io/subscribers","subscription_url":"https://api.github.com/repos/yldio/yld.io/subscription","commits_url":"https://api.github.com/repos/yldio/yld.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/yldio/yld.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/yldio/yld.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/yldio/yld.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/yldio/yld.io/contents/{+path}","compare_url":"https://api.github.com/repos/yldio/yld.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yldio/yld.io/merges","archive_url":"https://api.github.com/repos/yldio/yld.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yldio/yld.io/downloads","issues_url":"https://api.github.com/repos/yldio/yld.io/issues{/number}","pulls_url":"https://api.github.com/repos/yldio/yld.io/pulls{/number}","milestones_url":"https://api.github.com/repos/yldio/yld.io/milestones{/number}","notifications_url":"https://api.github.com/repos/yldio/yld.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yldio/yld.io/labels{/name}","releases_url":"https://api.github.com/repos/yldio/yld.io/releases{/id}","deployments_url":"https://api.github.com/repos/yldio/yld.io/deployments","created_at":"2018-10-30T10:42:29Z","updated_at":"2019-07-16T02:37:36Z","pushed_at":"2019-07-16T07:29:59Z","git_url":"git://github.com/yldio/yld.io.git","ssh_url":"git@github.com:yldio/yld.io.git","clone_url":"https://github.com/yldio/yld.io.git","svn_url":"https://github.com/yldio/yld.io","homepage":"https://yld.io/","size":20310,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":3,"open_issues":4,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yldio/yld.io/pulls/294"},"html":{"href":"https://github.com/yldio/yld.io/pull/294"},"issue":{"href":"https://api.github.com/repos/yldio/yld.io/issues/294"},"comments":{"href":"https://api.github.com/repos/yldio/yld.io/issues/294/comments"},"review_comments":{"href":"https://api.github.com/repos/yldio/yld.io/pulls/294/comments"},"review_comment":{"href":"https://api.github.com/repos/yldio/yld.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yldio/yld.io/pulls/294/commits"},"statuses":{"href":"https://api.github.com/repos/yldio/yld.io/statuses/b11c542c16c9249ed18610cf6adaa10a645fa7b9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"GBouffard"}}