{"action":"created","issue":{"url":"https://api.github.com/repos/ElementalCode/Elemental/issues/44","labels_url":"https://api.github.com/repos/ElementalCode/Elemental/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/ElementalCode/Elemental/issues/44/comments","events_url":"https://api.github.com/repos/ElementalCode/Elemental/issues/44/events","html_url":"https://github.com/ElementalCode/Elemental/issues/44","id":97229175,"number":44,"title":"Available Blocks","user":{"login":"robinp7720","id":10325589,"avatar_url":"https://avatars.githubusercontent.com/u/10325589?v=3","gravatar_id":"","url":"https://api.github.com/users/robinp7720","html_url":"https://github.com/robinp7720","followers_url":"https://api.github.com/users/robinp7720/followers","following_url":"https://api.github.com/users/robinp7720/following{/other_user}","gists_url":"https://api.github.com/users/robinp7720/gists{/gist_id}","starred_url":"https://api.github.com/users/robinp7720/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robinp7720/subscriptions","organizations_url":"https://api.github.com/users/robinp7720/orgs","repos_url":"https://api.github.com/users/robinp7720/repos","events_url":"https://api.github.com/users/robinp7720/events{/privacy}","received_events_url":"https://api.github.com/users/robinp7720/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-25T14:12:39Z","updated_at":"2015-07-25T15:46:12Z","closed_at":null,"body":"So, we have discussed how we should implement blocks and how they should approximately look but not what type and the function of each. Yes I know, this already has been done in the forums but I have another Idea which in my opinion is easier and cleaner to implement.\r\n\r\nSo, I have to ideas for blocks:\r\n\r\n# First option\r\nWe have two main blocks, a container block and a text entry block.\r\nThe container block would be a c block with a drop down of all available tags, then a byob expandable list where another type of block would go into, this block would be an attribute block (more on this later). The colour of the C block should change according to what tag has been selected.\r\n\r\nThe next entry block would be a very simple block with a textbox inside. This is to allow text to be entered. for example, you could have a paragraph tag as the C block and then inside of that C block, you would have a multi-line text entry block.\r\n\r\nThe third type is like an operator block inside of scratch, but they would only fit inside of C tag blocks. They would have a drop down of all possible attributes and a textbox for the attribute value. We could implement a separate class block but this would complicate things.\r\n\r\nOn another tab somewhere in the editor we could have a create a block and create an attribute button. Similar to creating a variable in scratch. They new attribute or tag would become available in the drop down in the respected area.\r\n\r\nThis would look somthing like this:\r\n ```\r\n---------------------------------------------\r\n|   [dropdown]  ( [Attribtute]='      ') +|\r\n|   |-----------------------------------------\r\n|   |\r\n|   |\r\n|   |\r\n|   |-----------------------------------------\r\n|   Automagicly insert end tag here |\r\n---------------------------------------------\r\n ```\r\n\r\nInstead of having a drop down, you can have a tag block. This would fit into the first slot of the C block where the drop down would be. The tag blocks would then be sorted in the palettes. When we do this, you would need to choose which category a tag belongs to when creating it.\r\n\r\nUsing scratch blocks: https://scratch.mit.edu/discuss/topic/134554/?page=17#post-1242024\r\n\r\n# Second option\r\n\r\nThe other option would be to have one block per tag. and have the same attribute creation system. This would fill up the block selection thing much quicker though and it would be much simpler to just have a smaller  ```(<div>) ``` block instead of having\r\n\r\n ```\r\n---------------------------------------------\r\n| <div>                                             |\r\n|   |-----------------------------------------\r\n|   |\r\n|   |\r\n|   |\r\n|   |-----------------------------------------\r\n| </div>                                             |\r\n---------------------------------------------\r\n ```\r\nfor every single block.\r\n\r\nAs we are going to be saving the files as json anyways, Id also recommend custom blocks. These would allow users to create snippets they use often and use those as custom blocks instead of having to create the same part over and over again\r\n\r\nI think I should get a reward for making these beautiful ascii art c blocks!  :D\r\n"},"comment":{"url":"https://api.github.com/repos/ElementalCode/Elemental/issues/comments/124854179","html_url":"https://github.com/ElementalCode/Elemental/issues/44#issuecomment-124854179","issue_url":"https://api.github.com/repos/ElementalCode/Elemental/issues/44","id":124854179,"user":{"login":"quat1024","id":2068021,"avatar_url":"https://avatars.githubusercontent.com/u/2068021?v=3","gravatar_id":"","url":"https://api.github.com/users/quat1024","html_url":"https://github.com/quat1024","followers_url":"https://api.github.com/users/quat1024/followers","following_url":"https://api.github.com/users/quat1024/following{/other_user}","gists_url":"https://api.github.com/users/quat1024/gists{/gist_id}","starred_url":"https://api.github.com/users/quat1024/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quat1024/subscriptions","organizations_url":"https://api.github.com/users/quat1024/orgs","repos_url":"https://api.github.com/users/quat1024/repos","events_url":"https://api.github.com/users/quat1024/events{/privacy}","received_events_url":"https://api.github.com/users/quat1024/received_events","type":"User","site_admin":false},"created_at":"2015-07-25T15:46:12Z","updated_at":"2015-07-25T15:46:12Z","body":"@robinp7720 [I'm a Scratchblocks2 ninja so is this what you mean?](http://scratchblocks.github.io/#Option%20A%20%3A%3Ahat%0A%0A%5Bdiv%20v%5D%20%E2%97%80%20%E2%96%B6%20%3A%3Acontrol%20cstart%0A%20%20.%20.%20.%0A%3A%3Acend%0A%0A%5Bspan%20v%5D%20()%20%E2%97%80%20%E2%96%B6%20%3A%3Acontrol%20cstart%0A%20%20.%20.%20.%0A%3A%3Acend%0A%0A%5Bdiv%20v%5D%20(%5Bclass%20v%5D%20%5Bcontainer%5D%20%3A%3Aoperators)%20%E2%97%80%20%E2%96%B6%20%3A%3Acontrol%20cstart%0A%20%20.%20.%20.%0A%3A%3Acend%0A%0A%5Bdiv%20v%5D%20(%5Bclass%20v%5D%20%5Bcontainer%5D%20%3A%3Aoperators)%20(%5Bid%20v%5D%20%5Basdf%5D%20%3A%3Aoperators)%E2%97%80%20%E2%96%B6%20%3A%3Acontrol%20cstart%0A%20%20.%20.%20.%0A%3A%3Acend%0A%0AOption%20B%20%3A%3A%20hat%0A%0A%2F%2FNote%20that%20angle%20brackets%20have%20been%20removed%20from%20the%20blocks%20in%20this%20example.%0A%2F%2FIt%20causes%20issues%20with%20the%20scratchblocks2%20formatter.%0A%2F%2FThe%20%22real%20blocks%22%20will%20likely%20have%20angle%20brackets%2C%0A%2F%2Fif%20only%20in%20%22advanced%20mode%22.%0A%0Adiv%20%E2%97%80%20%E2%96%B6%20%3A%3Acontrol%20cstart%0A%0A%2Fdiv%20%3A%3Acend%0A%0Aspan%20%E2%97%80%20%E2%96%B6%20%3A%3Acontrol%20cstart%0A%0A%2Fspan%20%3A%3Acend)"}}