{"action":"created","comment":{"url":"https://api.github.com/repos/4ian/GD/pulls/comments/200504585","pull_request_review_id":134835605,"id":200504585,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDUwNDU4NQ==","diff_hunk":"@@ -386,7 +402,31 @@ export default class SceneEditor extends Component {\n     done(true);\n   };\n \n-  _onRenameObject = (objectWithContext, newName, done) => {\n+  //use this function to check if the new name can be used\n+  // on apply new name event\n+  _canObjectUseNewName = (objectWithContext, newName) => {\n+    const { project, layout } = this.props;\n+    const { object } = objectWithContext;\n+\n+    if (object.getName() === newName) {\n+      return true;\n+    } else if (\n+      layout.hasObjectNamed(newName) ||\n+      project.hasObjectNamed(newName)\n+    ) {\n+      showWarningBox('Another object with this name already exists.');\n+      return false;\n+    }\n+    return true;\n+  };\n+\n+  _onRenameEditedObject = newName => {\n+    if (newName !== null) {","path":"newIDE/app/src/SceneEditor/index.js","position":69,"original_position":69,"commit_id":"c3ff7bee301c167cdd7f2154be01ed7e657f96d5","original_commit_id":"c3ff7bee301c167cdd7f2154be01ed7e657f96d5","user":{"login":"blurymind","id":6495061,"node_id":"MDQ6VXNlcjY0OTUwNjE=","avatar_url":"https://avatars0.githubusercontent.com/u/6495061?v=4","gravatar_id":"","url":"https://api.github.com/users/blurymind","html_url":"https://github.com/blurymind","followers_url":"https://api.github.com/users/blurymind/followers","following_url":"https://api.github.com/users/blurymind/following{/other_user}","gists_url":"https://api.github.com/users/blurymind/gists{/gist_id}","starred_url":"https://api.github.com/users/blurymind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blurymind/subscriptions","organizations_url":"https://api.github.com/users/blurymind/orgs","repos_url":"https://api.github.com/users/blurymind/repos","events_url":"https://api.github.com/users/blurymind/events{/privacy}","received_events_url":"https://api.github.com/users/blurymind/received_events","type":"User","site_admin":false},"body":"Actually- if you dont pass an optional callback function (in my case I didnt need one), this line caused gdevelop to crash","created_at":"2018-07-05T22:15:42Z","updated_at":"2018-07-05T22:15:42Z","html_url":"https://github.com/4ian/GD/pull/547#discussion_r200504585","pull_request_url":"https://api.github.com/repos/4ian/GD/pulls/547","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/4ian/GD/pulls/comments/200504585"},"html":{"href":"https://github.com/4ian/GD/pull/547#discussion_r200504585"},"pull_request":{"href":"https://api.github.com/repos/4ian/GD/pulls/547"}},"in_reply_to_id":200466438},"pull_request":{"url":"https://api.github.com/repos/4ian/GD/pulls/547","id":199309084,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MzA5MDg0","html_url":"https://github.com/4ian/GD/pull/547","diff_url":"https://github.com/4ian/GD/pull/547.diff","patch_url":"https://github.com/4ian/GD/pull/547.patch","issue_url":"https://api.github.com/repos/4ian/GD/issues/547","number":547,"state":"open","locked":false,"title":"WIP - Add ability to rename object from object editor","user":{"login":"blurymind","id":6495061,"node_id":"MDQ6VXNlcjY0OTUwNjE=","avatar_url":"https://avatars0.githubusercontent.com/u/6495061?v=4","gravatar_id":"","url":"https://api.github.com/users/blurymind","html_url":"https://github.com/blurymind","followers_url":"https://api.github.com/users/blurymind/followers","following_url":"https://api.github.com/users/blurymind/following{/other_user}","gists_url":"https://api.github.com/users/blurymind/gists{/gist_id}","starred_url":"https://api.github.com/users/blurymind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blurymind/subscriptions","organizations_url":"https://api.github.com/users/blurymind/orgs","repos_url":"https://api.github.com/users/blurymind/repos","events_url":"https://api.github.com/users/blurymind/events{/privacy}","received_events_url":"https://api.github.com/users/blurymind/received_events","type":"User","site_admin":false},"body":"This addresses some usability problems:\r\n- Newly created objects can now be immediately named by user - creating a better rapid prototyping flow\r\nAddressing https://github.com/4ian/GD/issues/542\r\n![namenewobject](https://user-images.githubusercontent.com/6495061/42291409-52898148-7fc3-11e8-85dd-5509c9e761fa.gif)\r\n\r\n- Currently edited objects show their name in the object editor\r\n![renameoldobject](https://user-images.githubusercontent.com/6495061/42291413-574bb9d0-7fc3-11e8-93ec-d5bde6919580.gif)\r\n\r\nThis checks if the object can use the new name when the input box loses focus. It applies the new name when the user actually clicks the apply button\r\n\r\nTODO: \r\n- Possibly refactor the renaming of object  in the object list to use the checking function that I added to the index - should simplify code.\r\nWill do that after getting some feedback on the refactoring so far.\r\n\r\n- Better styling for the input box\r\n\r\n- Need feedback on placement: Should the object renaming input box be in both Properties and Behaviours tabs? Should it be Only in one of the two? Should it be above the tabs?\r\n\r\nMany thanks to @4ian for the guidance","created_at":"2018-07-04T18:41:29Z","updated_at":"2018-07-05T22:15:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38e10ea3ea2201f1369cfb2462a636bf5529b0bb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/4ian/GD/pulls/547/commits","review_comments_url":"https://api.github.com/repos/4ian/GD/pulls/547/comments","review_comment_url":"https://api.github.com/repos/4ian/GD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4ian/GD/issues/547/comments","statuses_url":"https://api.github.com/repos/4ian/GD/statuses/c3ff7bee301c167cdd7f2154be01ed7e657f96d5","head":{"label":"blurymind:master","ref":"master","sha":"c3ff7bee301c167cdd7f2154be01ed7e657f96d5","user":{"login":"blurymind","id":6495061,"node_id":"MDQ6VXNlcjY0OTUwNjE=","avatar_url":"https://avatars0.githubusercontent.com/u/6495061?v=4","gravatar_id":"","url":"https://api.github.com/users/blurymind","html_url":"https://github.com/blurymind","followers_url":"https://api.github.com/users/blurymind/followers","following_url":"https://api.github.com/users/blurymind/following{/other_user}","gists_url":"https://api.github.com/users/blurymind/gists{/gist_id}","starred_url":"https://api.github.com/users/blurymind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blurymind/subscriptions","organizations_url":"https://api.github.com/users/blurymind/orgs","repos_url":"https://api.github.com/users/blurymind/repos","events_url":"https://api.github.com/users/blurymind/events{/privacy}","received_events_url":"https://api.github.com/users/blurymind/received_events","type":"User","site_admin":false},"repo":{"id":139330762,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkzMzA3NjI=","name":"GD","full_name":"blurymind/GD","owner":{"login":"blurymind","id":6495061,"node_id":"MDQ6VXNlcjY0OTUwNjE=","avatar_url":"https://avatars0.githubusercontent.com/u/6495061?v=4","gravatar_id":"","url":"https://api.github.com/users/blurymind","html_url":"https://github.com/blurymind","followers_url":"https://api.github.com/users/blurymind/followers","following_url":"https://api.github.com/users/blurymind/following{/other_user}","gists_url":"https://api.github.com/users/blurymind/gists{/gist_id}","starred_url":"https://api.github.com/users/blurymind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blurymind/subscriptions","organizations_url":"https://api.github.com/users/blurymind/orgs","repos_url":"https://api.github.com/users/blurymind/repos","events_url":"https://api.github.com/users/blurymind/events{/privacy}","received_events_url":"https://api.github.com/users/blurymind/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blurymind/GD","description":":video_game: GDevelop is an open source HTML5 and native game creator requiring no coding skills.","fork":true,"url":"https://api.github.com/repos/blurymind/GD","forks_url":"https://api.github.com/repos/blurymind/GD/forks","keys_url":"https://api.github.com/repos/blurymind/GD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blurymind/GD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blurymind/GD/teams","hooks_url":"https://api.github.com/repos/blurymind/GD/hooks","issue_events_url":"https://api.github.com/repos/blurymind/GD/issues/events{/number}","events_url":"https://api.github.com/repos/blurymind/GD/events","assignees_url":"https://api.github.com/repos/blurymind/GD/assignees{/user}","branches_url":"https://api.github.com/repos/blurymind/GD/branches{/branch}","tags_url":"https://api.github.com/repos/blurymind/GD/tags","blobs_url":"https://api.github.com/repos/blurymind/GD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blurymind/GD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blurymind/GD/git/refs{/sha}","trees_url":"https://api.github.com/repos/blurymind/GD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blurymind/GD/statuses/{sha}","languages_url":"https://api.github.com/repos/blurymind/GD/languages","stargazers_url":"https://api.github.com/repos/blurymind/GD/stargazers","contributors_url":"https://api.github.com/repos/blurymind/GD/contributors","subscribers_url":"https://api.github.com/repos/blurymind/GD/subscribers","subscription_url":"https://api.github.com/repos/blurymind/GD/subscription","commits_url":"https://api.github.com/repos/blurymind/GD/commits{/sha}","git_commits_url":"https://api.github.com/repos/blurymind/GD/git/commits{/sha}","comments_url":"https://api.github.com/repos/blurymind/GD/comments{/number}","issue_comment_url":"https://api.github.com/repos/blurymind/GD/issues/comments{/number}","contents_url":"https://api.github.com/repos/blurymind/GD/contents/{+path}","compare_url":"https://api.github.com/repos/blurymind/GD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blurymind/GD/merges","archive_url":"https://api.github.com/repos/blurymind/GD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blurymind/GD/downloads","issues_url":"https://api.github.com/repos/blurymind/GD/issues{/number}","pulls_url":"https://api.github.com/repos/blurymind/GD/pulls{/number}","milestones_url":"https://api.github.com/repos/blurymind/GD/milestones{/number}","notifications_url":"https://api.github.com/repos/blurymind/GD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blurymind/GD/labels{/name}","releases_url":"https://api.github.com/repos/blurymind/GD/releases{/id}","deployments_url":"https://api.github.com/repos/blurymind/GD/deployments","created_at":"2018-07-01T13:19:31Z","updated_at":"2018-07-05T16:53:01Z","pushed_at":"2018-07-05T16:52:58Z","git_url":"git://github.com/blurymind/GD.git","ssh_url":"git@github.com:blurymind/GD.git","clone_url":"https://github.com/blurymind/GD.git","svn_url":"https://github.com/blurymind/GD","homepage":"https://gdevelop-app.com","size":223213,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"4ian:master","ref":"master","sha":"1d7f8958fc37e924cb790c441fea35fb0480e13f","user":{"login":"4ian","id":1280130,"node_id":"MDQ6VXNlcjEyODAxMzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1280130?v=4","gravatar_id":"","url":"https://api.github.com/users/4ian","html_url":"https://github.com/4ian","followers_url":"https://api.github.com/users/4ian/followers","following_url":"https://api.github.com/users/4ian/following{/other_user}","gists_url":"https://api.github.com/users/4ian/gists{/gist_id}","starred_url":"https://api.github.com/users/4ian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4ian/subscriptions","organizations_url":"https://api.github.com/users/4ian/orgs","repos_url":"https://api.github.com/users/4ian/repos","events_url":"https://api.github.com/users/4ian/events{/privacy}","received_events_url":"https://api.github.com/users/4ian/received_events","type":"User","site_admin":false},"repo":{"id":21331090,"node_id":"MDEwOlJlcG9zaXRvcnkyMTMzMTA5MA==","name":"GD","full_name":"4ian/GD","owner":{"login":"4ian","id":1280130,"node_id":"MDQ6VXNlcjEyODAxMzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1280130?v=4","gravatar_id":"","url":"https://api.github.com/users/4ian","html_url":"https://github.com/4ian","followers_url":"https://api.github.com/users/4ian/followers","following_url":"https://api.github.com/users/4ian/following{/other_user}","gists_url":"https://api.github.com/users/4ian/gists{/gist_id}","starred_url":"https://api.github.com/users/4ian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4ian/subscriptions","organizations_url":"https://api.github.com/users/4ian/orgs","repos_url":"https://api.github.com/users/4ian/repos","events_url":"https://api.github.com/users/4ian/events{/privacy}","received_events_url":"https://api.github.com/users/4ian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/4ian/GD","description":":video_game: GDevelop is an open source HTML5 and native game creator requiring no coding skills.","fork":false,"url":"https://api.github.com/repos/4ian/GD","forks_url":"https://api.github.com/repos/4ian/GD/forks","keys_url":"https://api.github.com/repos/4ian/GD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4ian/GD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4ian/GD/teams","hooks_url":"https://api.github.com/repos/4ian/GD/hooks","issue_events_url":"https://api.github.com/repos/4ian/GD/issues/events{/number}","events_url":"https://api.github.com/repos/4ian/GD/events","assignees_url":"https://api.github.com/repos/4ian/GD/assignees{/user}","branches_url":"https://api.github.com/repos/4ian/GD/branches{/branch}","tags_url":"https://api.github.com/repos/4ian/GD/tags","blobs_url":"https://api.github.com/repos/4ian/GD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4ian/GD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4ian/GD/git/refs{/sha}","trees_url":"https://api.github.com/repos/4ian/GD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4ian/GD/statuses/{sha}","languages_url":"https://api.github.com/repos/4ian/GD/languages","stargazers_url":"https://api.github.com/repos/4ian/GD/stargazers","contributors_url":"https://api.github.com/repos/4ian/GD/contributors","subscribers_url":"https://api.github.com/repos/4ian/GD/subscribers","subscription_url":"https://api.github.com/repos/4ian/GD/subscription","commits_url":"https://api.github.com/repos/4ian/GD/commits{/sha}","git_commits_url":"https://api.github.com/repos/4ian/GD/git/commits{/sha}","comments_url":"https://api.github.com/repos/4ian/GD/comments{/number}","issue_comment_url":"https://api.github.com/repos/4ian/GD/issues/comments{/number}","contents_url":"https://api.github.com/repos/4ian/GD/contents/{+path}","compare_url":"https://api.github.com/repos/4ian/GD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4ian/GD/merges","archive_url":"https://api.github.com/repos/4ian/GD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4ian/GD/downloads","issues_url":"https://api.github.com/repos/4ian/GD/issues{/number}","pulls_url":"https://api.github.com/repos/4ian/GD/pulls{/number}","milestones_url":"https://api.github.com/repos/4ian/GD/milestones{/number}","notifications_url":"https://api.github.com/repos/4ian/GD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4ian/GD/labels{/name}","releases_url":"https://api.github.com/repos/4ian/GD/releases{/id}","deployments_url":"https://api.github.com/repos/4ian/GD/deployments","created_at":"2014-06-29T19:58:38Z","updated_at":"2018-07-05T09:49:09Z","pushed_at":"2018-07-05T16:53:00Z","git_url":"git://github.com/4ian/GD.git","ssh_url":"git@github.com:4ian/GD.git","clone_url":"https://github.com/4ian/GD.git","svn_url":"https://github.com/4ian/GD","homepage":"https://gdevelop-app.com","size":223508,"stargazers_count":729,"watchers_count":729,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":134,"mirror_url":null,"archived":false,"open_issues_count":57,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":134,"open_issues":57,"watchers":729,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4ian/GD/pulls/547"},"html":{"href":"https://github.com/4ian/GD/pull/547"},"issue":{"href":"https://api.github.com/repos/4ian/GD/issues/547"},"comments":{"href":"https://api.github.com/repos/4ian/GD/issues/547/comments"},"review_comments":{"href":"https://api.github.com/repos/4ian/GD/pulls/547/comments"},"review_comment":{"href":"https://api.github.com/repos/4ian/GD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4ian/GD/pulls/547/commits"},"statuses":{"href":"https://api.github.com/repos/4ian/GD/statuses/c3ff7bee301c167cdd7f2154be01ed7e657f96d5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"blurymind"}}