{"action":"created","issue":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/2602","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/2602/labels{/name}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/2602/comments","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/2602/events","html_url":"https://github.com/code-dot-org/code-dot-org/pull/2602","id":83750729,"number":2602,"title":"Design mode screen","user":{"login":"Bjvanminnen","id":1767466,"avatar_url":"https://avatars.githubusercontent.com/u/1767466?v=3","gravatar_id":"","url":"https://api.github.com/users/Bjvanminnen","html_url":"https://github.com/Bjvanminnen","followers_url":"https://api.github.com/users/Bjvanminnen/followers","following_url":"https://api.github.com/users/Bjvanminnen/following{/other_user}","gists_url":"https://api.github.com/users/Bjvanminnen/gists{/gist_id}","starred_url":"https://api.github.com/users/Bjvanminnen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bjvanminnen/subscriptions","organizations_url":"https://api.github.com/users/Bjvanminnen/orgs","repos_url":"https://api.github.com/users/Bjvanminnen/repos","events_url":"https://api.github.com/users/Bjvanminnen/events{/privacy}","received_events_url":"https://api.github.com/users/Bjvanminnen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-01T23:54:15Z","updated_at":"2015-06-02T18:01:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/2602","html_url":"https://github.com/code-dot-org/code-dot-org/pull/2602","diff_url":"https://github.com/code-dot-org/code-dot-org/pull/2602.diff","patch_url":"https://github.com/code-dot-org/code-dot-org/pull/2602.patch"},"body":"\r\n![Uploading screens.gif…]()\r\n\r\n\r\nBy default, all apps get a single screen. You can get a new screen(s) by dragging a screen from the element tray. Once you have multiple screens, you can use the dropdown to change between them in design mode.\r\n\r\nIn code mode, we have a new setScreen api that toggles between screens. All screens remain in the DOM at all times, with the active screen visible and the others hidden.\r\n\r\nWhen we add elements in code mode, they get placed on to the active screen instead of the root div.\r\n\r\nWhen loading old levels (in which the elements are direct children of the root div), we'll add a screen div and place the children in the div.\r\n\r\nAlso added some tests. These tests work by calling code both before and after our run button click (before for design mode changes, after for other changes). They use react test utils in a couple places to simulate clicks on react elements.\r\n\r\nMissing:\r\nHandling screen deleting - we want a confirmation experience. We should also be unable to delete screen1, or fix up places that assume we always have a screen1."},"comment":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments/108034365","html_url":"https://github.com/code-dot-org/code-dot-org/pull/2602#issuecomment-108034365","issue_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/2602","id":108034365,"user":{"login":"joshlory","id":413693,"avatar_url":"https://avatars.githubusercontent.com/u/413693?v=3","gravatar_id":"","url":"https://api.github.com/users/joshlory","html_url":"https://github.com/joshlory","followers_url":"https://api.github.com/users/joshlory/followers","following_url":"https://api.github.com/users/joshlory/following{/other_user}","gists_url":"https://api.github.com/users/joshlory/gists{/gist_id}","starred_url":"https://api.github.com/users/joshlory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshlory/subscriptions","organizations_url":"https://api.github.com/users/joshlory/orgs","repos_url":"https://api.github.com/users/joshlory/repos","events_url":"https://api.github.com/users/joshlory/events{/privacy}","received_events_url":"https://api.github.com/users/joshlory/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T18:01:18Z","updated_at":"2015-06-02T18:01:18Z","body":"Cool, that makes sense!"}}