{"action":"created","comment":{"url":"https://api.github.com/repos/ndlib/honeycomb/pulls/comments/30351765","id":30351765,"diff_hunk":"@@ -0,0 +1,50 @@\n+//app/assets/javascripts/components/modal/Modal.jsx\n+\n+var MetaDataForm = React.createClass({\n+  displayName: 'Form',\n+\n+  propTypes: {\n+    authenticityToken: React.PropTypes.string.isRequired,\n+    method: React.PropTypes.string.isRequired,\n+    data: React.PropTypes.object.isRequired,\n+    fields: React.PropTypes.object,\n+    url: React.PropTypes.string.isRequired,\n+  },\n+\n+  getDefaultProps: function() {\n+    return {\n+      method: \"post\",\n+    };\n+  },\n+\n+  getInitialState: function() {\n+    return {\n+      formValues: this.props.data\n+    }\n+  },\n+\n+  handleFieldChange: function(field, value) {\n+    this.state.formValues[field] = value;\n+    this.setState({\n+      formValues: this.state.formValues\n+    })\n+  },\n+\n+  render: function () {\n+    return (\n+      <Panel PanelTitle=\"Meta Data\">\n+        <Form id=\"meta_data_form\" url={this.props.url} authenticityToken={this.props.authenticityToken} method={this.props.method}>\n+          <StringField name=\"item[name]\" id=\"item_title\" required=\"true\" title=\"Title\" value={this.state.formValues['item_title']} handleFieldChange={this.handleFieldChange} />\n+          <TextField  name=\"item[description]\" id=\"item_description\" required=\"\" title=\"Description\" value={this.state.formValues['item_description']} handleFieldChange={this.handleFieldChange} />\n+          <TextField  name=\"item[transcription]\" id=\"item_transcription\" required=\"\" title=\"Transcription\" value={this.state.formValues['item_transcription']} handleFieldChange={this.handleFieldChange} />\n+          <StringField  name=\"item[manuscript_url]\" id=\"item_manuscript_url\" required=\"\" title=\"Digitized Manuscript URL\" value={this.state.formValues['item_manuscript_url']} handleFieldChange={this.handleFieldChange} placeholder=\"http://\" help=\"Link to externally hosted manuscript viewer.\" />\n+\n+\n+","path":"app/assets/javascripts/components/meta_data_form/MetaDataForm.js.jsx","position":43,"original_position":43,"commit_id":"9c90ab6584eadbcd8ef11027726a625b5d54c831","original_commit_id":"9c90ab6584eadbcd8ef11027726a625b5d54c831","user":{"login":"rfox2","id":9285578,"avatar_url":"https://avatars.githubusercontent.com/u/9285578?v=3","gravatar_id":"","url":"https://api.github.com/users/rfox2","html_url":"https://github.com/rfox2","followers_url":"https://api.github.com/users/rfox2/followers","following_url":"https://api.github.com/users/rfox2/following{/other_user}","gists_url":"https://api.github.com/users/rfox2/gists{/gist_id}","starred_url":"https://api.github.com/users/rfox2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfox2/subscriptions","organizations_url":"https://api.github.com/users/rfox2/orgs","repos_url":"https://api.github.com/users/rfox2/repos","events_url":"https://api.github.com/users/rfox2/events{/privacy}","received_events_url":"https://api.github.com/users/rfox2/received_events","type":"User","site_admin":false},"body":"Lots 'o' white space here. Necessary?","created_at":"2015-05-14T19:03:38Z","updated_at":"2015-05-14T19:03:38Z","html_url":"https://github.com/ndlib/honeycomb/pull/117#discussion_r30351765","pull_request_url":"https://api.github.com/repos/ndlib/honeycomb/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/ndlib/honeycomb/pulls/comments/30351765"},"html":{"href":"https://github.com/ndlib/honeycomb/pull/117#discussion_r30351765"},"pull_request":{"href":"https://api.github.com/repos/ndlib/honeycomb/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/ndlib/honeycomb/pulls/117","id":35423305,"html_url":"https://github.com/ndlib/honeycomb/pull/117","diff_url":"https://github.com/ndlib/honeycomb/pull/117.diff","patch_url":"https://github.com/ndlib/honeycomb/pull/117.patch","issue_url":"https://api.github.com/repos/ndlib/honeycomb/issues/117","number":117,"state":"open","locked":false,"title":"Dec 273 add 5 metadata fields","user":{"login":"jonhartzler","id":124502,"avatar_url":"https://avatars.githubusercontent.com/u/124502?v=3","gravatar_id":"","url":"https://api.github.com/users/jonhartzler","html_url":"https://github.com/jonhartzler","followers_url":"https://api.github.com/users/jonhartzler/followers","following_url":"https://api.github.com/users/jonhartzler/following{/other_user}","gists_url":"https://api.github.com/users/jonhartzler/gists{/gist_id}","starred_url":"https://api.github.com/users/jonhartzler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonhartzler/subscriptions","organizations_url":"https://api.github.com/users/jonhartzler/orgs","repos_url":"https://api.github.com/users/jonhartzler/repos","events_url":"https://api.github.com/users/jonhartzler/events{/privacy}","received_events_url":"https://api.github.com/users/jonhartzler/received_events","type":"User","site_admin":false},"body":"This is the first step in the metadata refactor.  I needed to update the meta data form to be more dynamic.  This change moves the form from rails to react.   The next step is to update the api to allow updating of items and for the react forms to show errors.  \r\n\r\nI added a couple new generic components\r\n1.  Form for a form\r\n2.  FormRow\r\nI also added StringField and TextField which are currently not in a generic space but attached to the MetaDataForm in the meta_data_form directory.  They may however be more generic then their current file placement suggests.  \r\n\r\nLastly and most important this pull request is going to go back into the phase2 branch not master.  \r\n","created_at":"2015-05-14T13:56:32Z","updated_at":"2015-05-14T19:03:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89a5a503495492761a07286e0da15ea28d3cd0e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ndlib/honeycomb/pulls/117/commits","review_comments_url":"https://api.github.com/repos/ndlib/honeycomb/pulls/117/comments","review_comment_url":"https://api.github.com/repos/ndlib/honeycomb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ndlib/honeycomb/issues/117/comments","statuses_url":"https://api.github.com/repos/ndlib/honeycomb/statuses/9c90ab6584eadbcd8ef11027726a625b5d54c831","head":{"label":"ndlib:dec-273-add-5-metadata-fields","ref":"dec-273-add-5-metadata-fields","sha":"9c90ab6584eadbcd8ef11027726a625b5d54c831","user":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"repo":{"id":25221636,"name":"honeycomb","full_name":"ndlib/honeycomb","owner":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ndlib/honeycomb","description":"Honeycomb provides basic collection and item administration, as well as serialization of your collections so they can be used by external applications.","fork":false,"url":"https://api.github.com/repos/ndlib/honeycomb","forks_url":"https://api.github.com/repos/ndlib/honeycomb/forks","keys_url":"https://api.github.com/repos/ndlib/honeycomb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndlib/honeycomb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndlib/honeycomb/teams","hooks_url":"https://api.github.com/repos/ndlib/honeycomb/hooks","issue_events_url":"https://api.github.com/repos/ndlib/honeycomb/issues/events{/number}","events_url":"https://api.github.com/repos/ndlib/honeycomb/events","assignees_url":"https://api.github.com/repos/ndlib/honeycomb/assignees{/user}","branches_url":"https://api.github.com/repos/ndlib/honeycomb/branches{/branch}","tags_url":"https://api.github.com/repos/ndlib/honeycomb/tags","blobs_url":"https://api.github.com/repos/ndlib/honeycomb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndlib/honeycomb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndlib/honeycomb/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndlib/honeycomb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndlib/honeycomb/statuses/{sha}","languages_url":"https://api.github.com/repos/ndlib/honeycomb/languages","stargazers_url":"https://api.github.com/repos/ndlib/honeycomb/stargazers","contributors_url":"https://api.github.com/repos/ndlib/honeycomb/contributors","subscribers_url":"https://api.github.com/repos/ndlib/honeycomb/subscribers","subscription_url":"https://api.github.com/repos/ndlib/honeycomb/subscription","commits_url":"https://api.github.com/repos/ndlib/honeycomb/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndlib/honeycomb/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndlib/honeycomb/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndlib/honeycomb/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndlib/honeycomb/contents/{+path}","compare_url":"https://api.github.com/repos/ndlib/honeycomb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndlib/honeycomb/merges","archive_url":"https://api.github.com/repos/ndlib/honeycomb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndlib/honeycomb/downloads","issues_url":"https://api.github.com/repos/ndlib/honeycomb/issues{/number}","pulls_url":"https://api.github.com/repos/ndlib/honeycomb/pulls{/number}","milestones_url":"https://api.github.com/repos/ndlib/honeycomb/milestones{/number}","notifications_url":"https://api.github.com/repos/ndlib/honeycomb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndlib/honeycomb/labels{/name}","releases_url":"https://api.github.com/repos/ndlib/honeycomb/releases{/id}","created_at":"2014-10-14T18:55:34Z","updated_at":"2015-05-08T12:21:27Z","pushed_at":"2015-05-14T18:58:28Z","git_url":"git://github.com/ndlib/honeycomb.git","ssh_url":"git@github.com:ndlib/honeycomb.git","clone_url":"https://github.com/ndlib/honeycomb.git","svn_url":"https://github.com/ndlib/honeycomb","homepage":"","size":91844,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"ndlib:phase2","ref":"phase2","sha":"0aab6ae93de9113817e2e5d05b8b7e0a384c5962","user":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"repo":{"id":25221636,"name":"honeycomb","full_name":"ndlib/honeycomb","owner":{"login":"ndlib","id":160943,"avatar_url":"https://avatars.githubusercontent.com/u/160943?v=3","gravatar_id":"","url":"https://api.github.com/users/ndlib","html_url":"https://github.com/ndlib","followers_url":"https://api.github.com/users/ndlib/followers","following_url":"https://api.github.com/users/ndlib/following{/other_user}","gists_url":"https://api.github.com/users/ndlib/gists{/gist_id}","starred_url":"https://api.github.com/users/ndlib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndlib/subscriptions","organizations_url":"https://api.github.com/users/ndlib/orgs","repos_url":"https://api.github.com/users/ndlib/repos","events_url":"https://api.github.com/users/ndlib/events{/privacy}","received_events_url":"https://api.github.com/users/ndlib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ndlib/honeycomb","description":"Honeycomb provides basic collection and item administration, as well as serialization of your collections so they can be used by external applications.","fork":false,"url":"https://api.github.com/repos/ndlib/honeycomb","forks_url":"https://api.github.com/repos/ndlib/honeycomb/forks","keys_url":"https://api.github.com/repos/ndlib/honeycomb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndlib/honeycomb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndlib/honeycomb/teams","hooks_url":"https://api.github.com/repos/ndlib/honeycomb/hooks","issue_events_url":"https://api.github.com/repos/ndlib/honeycomb/issues/events{/number}","events_url":"https://api.github.com/repos/ndlib/honeycomb/events","assignees_url":"https://api.github.com/repos/ndlib/honeycomb/assignees{/user}","branches_url":"https://api.github.com/repos/ndlib/honeycomb/branches{/branch}","tags_url":"https://api.github.com/repos/ndlib/honeycomb/tags","blobs_url":"https://api.github.com/repos/ndlib/honeycomb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndlib/honeycomb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndlib/honeycomb/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndlib/honeycomb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndlib/honeycomb/statuses/{sha}","languages_url":"https://api.github.com/repos/ndlib/honeycomb/languages","stargazers_url":"https://api.github.com/repos/ndlib/honeycomb/stargazers","contributors_url":"https://api.github.com/repos/ndlib/honeycomb/contributors","subscribers_url":"https://api.github.com/repos/ndlib/honeycomb/subscribers","subscription_url":"https://api.github.com/repos/ndlib/honeycomb/subscription","commits_url":"https://api.github.com/repos/ndlib/honeycomb/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndlib/honeycomb/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndlib/honeycomb/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndlib/honeycomb/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndlib/honeycomb/contents/{+path}","compare_url":"https://api.github.com/repos/ndlib/honeycomb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndlib/honeycomb/merges","archive_url":"https://api.github.com/repos/ndlib/honeycomb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndlib/honeycomb/downloads","issues_url":"https://api.github.com/repos/ndlib/honeycomb/issues{/number}","pulls_url":"https://api.github.com/repos/ndlib/honeycomb/pulls{/number}","milestones_url":"https://api.github.com/repos/ndlib/honeycomb/milestones{/number}","notifications_url":"https://api.github.com/repos/ndlib/honeycomb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndlib/honeycomb/labels{/name}","releases_url":"https://api.github.com/repos/ndlib/honeycomb/releases{/id}","created_at":"2014-10-14T18:55:34Z","updated_at":"2015-05-08T12:21:27Z","pushed_at":"2015-05-14T18:58:28Z","git_url":"git://github.com/ndlib/honeycomb.git","ssh_url":"git@github.com:ndlib/honeycomb.git","clone_url":"https://github.com/ndlib/honeycomb.git","svn_url":"https://github.com/ndlib/honeycomb","homepage":"","size":91844,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ndlib/honeycomb/pulls/117"},"html":{"href":"https://github.com/ndlib/honeycomb/pull/117"},"issue":{"href":"https://api.github.com/repos/ndlib/honeycomb/issues/117"},"comments":{"href":"https://api.github.com/repos/ndlib/honeycomb/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/ndlib/honeycomb/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/ndlib/honeycomb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ndlib/honeycomb/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/ndlib/honeycomb/statuses/9c90ab6584eadbcd8ef11027726a625b5d54c831"}}}}