{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments/34925602","id":34925602,"diff_hunk":"@@ -0,0 +1,89 @@\n+define(function(require) {\n+  var $ = require(\"jquery\");\n+  var InputField = require(\"fc/bramble-input-field\");\n+\n+  function toggleComponents(context, isSave) {\n+    context.saveButton[isSave ? \"hide\" : \"show\"]();\n+    context.renameButton[isSave ? \"show\" : \"hide\"]();\n+    context.titleBar[isSave ? \"save\" : \"edit\"]();\n+    context.titleBar[isSave ? \"removeClass\" : \"addClass\"](\"text-input\");\n+    context.container[isSave ? \"addClass\" : \"removeClass\"](\"shadow\");\n+  }\n+\n+  function persist(title, callback) {\n+    var appUrl = this.appUrl;\n+    var csrfToken = this.csrfToken;\n+\n+    if(!this.authenticated) {","path":"public/scripts/editor/js/fc/project-rename.js","position":17,"original_position":17,"commit_id":"a80aa2a9f4ad8872fe349bcf38f76e8a7a1d9d48","original_commit_id":"a80aa2a9f4ad8872fe349bcf38f76e8a7a1d9d48","user":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"body":"Yeah probably, we'll have to think more about the unauthenticated-->authenticated transition coz there's a lot to consider (this being one of them)","created_at":"2015-07-17T19:59:59Z","updated_at":"2015-07-17T19:59:59Z","html_url":"https://github.com/mozilla/thimble.webmaker.org/pull/709#discussion_r34925602","pull_request_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709","_links":{"self":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments/34925602"},"html":{"href":"https://github.com/mozilla/thimble.webmaker.org/pull/709#discussion_r34925602"},"pull_request":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709","id":40261645,"html_url":"https://github.com/mozilla/thimble.webmaker.org/pull/709","diff_url":"https://github.com/mozilla/thimble.webmaker.org/pull/709.diff","patch_url":"https://github.com/mozilla/thimble.webmaker.org/pull/709.patch","issue_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/709","number":709,"state":"open","locked":false,"title":"Rename + Default project name + Project file loading fixes","user":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"body":"This patch does a couple of things:\r\n* Instead of prompting the user to enter a **unique** project name when creating a new project, it directly takes the user to the editor when \"New Project\" is clicked and uses the title \"Untitled Project\"\r\n* Allows a user to rename an existing or new project and saves this change to publish.webmaker.org if the user is authenticated\r\n* Fixes a couple of loading bugs in terms of when files were loaded/persisted for different cases such as an unauthenticated user, an authenticated user creating a new project and an authenticated user opening an existing project","created_at":"2015-07-17T19:04:54Z","updated_at":"2015-07-17T19:59:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c05a747d9c28559b87f6d7a32ba079cae6162864","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709/commits","review_comments_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709/comments","review_comment_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/709/comments","statuses_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/statuses/a80aa2a9f4ad8872fe349bcf38f76e8a7a1d9d48","head":{"label":"gideonthomas:rename","ref":"rename","sha":"a80aa2a9f4ad8872fe349bcf38f76e8a7a1d9d48","user":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"repo":{"id":31554137,"name":"thimble.webmaker.org","full_name":"gideonthomas/thimble.webmaker.org","owner":{"login":"gideonthomas","id":5816130,"avatar_url":"https://avatars.githubusercontent.com/u/5816130?v=3","gravatar_id":"","url":"https://api.github.com/users/gideonthomas","html_url":"https://github.com/gideonthomas","followers_url":"https://api.github.com/users/gideonthomas/followers","following_url":"https://api.github.com/users/gideonthomas/following{/other_user}","gists_url":"https://api.github.com/users/gideonthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/gideonthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gideonthomas/subscriptions","organizations_url":"https://api.github.com/users/gideonthomas/orgs","repos_url":"https://api.github.com/users/gideonthomas/repos","events_url":"https://api.github.com/users/gideonthomas/events{/privacy}","received_events_url":"https://api.github.com/users/gideonthomas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gideonthomas/thimble.webmaker.org","description":"a minimal thimble on node.js POC","fork":true,"url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org","forks_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/forks","keys_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/teams","hooks_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/hooks","issue_events_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/issues/events{/number}","events_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/events","assignees_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/assignees{/user}","branches_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/branches{/branch}","tags_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/tags","blobs_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/statuses/{sha}","languages_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/languages","stargazers_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/stargazers","contributors_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/contributors","subscribers_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/subscribers","subscription_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/subscription","commits_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/contents/{+path}","compare_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/merges","archive_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/downloads","issues_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/issues{/number}","pulls_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/pulls{/number}","milestones_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/milestones{/number}","notifications_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/labels{/name}","releases_url":"https://api.github.com/repos/gideonthomas/thimble.webmaker.org/releases{/id}","created_at":"2015-03-02T17:51:20Z","updated_at":"2015-03-02T17:51:21Z","pushed_at":"2015-07-17T19:00:10Z","git_url":"git://github.com/gideonthomas/thimble.webmaker.org.git","ssh_url":"git@github.com:gideonthomas/thimble.webmaker.org.git","clone_url":"https://github.com/gideonthomas/thimble.webmaker.org.git","svn_url":"https://github.com/gideonthomas/thimble.webmaker.org","homepage":null,"size":17172,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"mvpIntegration"}},"base":{"label":"mozilla:bramble","ref":"bramble","sha":"6f9f0200e19de754d3009cf615867639db6983c6","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":9349840,"name":"thimble.webmaker.org","full_name":"mozilla/thimble.webmaker.org","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/thimble.webmaker.org","description":"Thimble coding editor","fork":false,"url":"https://api.github.com/repos/mozilla/thimble.webmaker.org","forks_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/forks","keys_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/teams","hooks_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/hooks","issue_events_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/events","assignees_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/tags","blobs_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/languages","stargazers_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/stargazers","contributors_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/contributors","subscribers_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/subscribers","subscription_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/subscription","commits_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/merges","archive_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/downloads","issues_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/thimble.webmaker.org/releases{/id}","created_at":"2013-04-10T15:54:34Z","updated_at":"2015-07-13T15:50:17Z","pushed_at":"2015-07-17T19:04:54Z","git_url":"git://github.com/mozilla/thimble.webmaker.org.git","ssh_url":"git@github.com:mozilla/thimble.webmaker.org.git","clone_url":"https://github.com/mozilla/thimble.webmaker.org.git","svn_url":"https://github.com/mozilla/thimble.webmaker.org","homepage":"thimble.webmaker.org","size":21226,"stargazers_count":70,"watchers_count":70,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":115,"forks":70,"open_issues":115,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709"},"html":{"href":"https://github.com/mozilla/thimble.webmaker.org/pull/709"},"issue":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/709"},"comments":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/issues/709/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/pulls/709/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/thimble.webmaker.org/statuses/a80aa2a9f4ad8872fe349bcf38f76e8a7a1d9d48"}}}}