Ok. So now the code section is back in the PNG (new uploads only). We still need to do some server configuration changes to support drag and drop from here to ai2, but I think we will be able to make it a reality.
Wow that’s great news.
The for each number block was pasteable, in two steps:
right click save image to disk,
drag from disk to workspace.
The downloaded file name was an unfortunate hash, though.
@ABG Yes, I’m not sure we can do much about the hash filename. I think that is how Discourse is storing it on disk to prevent collisions. The thing that we need to do is add CORS support to the Discourse server so that the browser will allow cross-origin requests from ai2 to community.appinventor.mit.edu. Once that happens, then the drag and drop should work between browser windows.
The hash filename is not a showstopper, given CORS.
Decent names can be recovered from procedure names and global variables
by copy and paste from the Blocks Editor for tool collectors.
@jis enabled CORS headers on the site, so you should now be able to drag-and-drop blocks images with the embedded blocks code (e.g., my for loop above) from here into App Inventor.
Excellent ! Tested and working here (Linux Chromium Version 76.0.3809.100 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)
FWIW, if you didn’t know, you can just drag the block image up to the AI2 tab (which needs to be open in the Blocks Editor), Chrome/Chromium will switch to the AI2 tab, then you can plonk it on the page (goes green)
I tested this on Google Chrome V 76.0.3809.132 64 bit, Windows 10 using your for each block and it worked great…
however it did not work for ABG’s ETX procedure nor for the hexCSV procedure…
Taifun
Here is a new one to try
This works for me, so ABG’s files must have been degraded by previous settings ?
Dragging new files from this board into ai2 works on the Brave browser.
Thanks!
very good! both new procedures work for me!
this is an awesome feature!
Taifun
For @admins
I just found a Discourse setting which allows keeping the XML inside the PNG files
Unchecking this setting allows to upload “Blocks as PNG Image” to Discourse and making them importable back to AI:
I have just enabled it in our community, and it works
Test the following image which was uploaded through Discourse: https://kodular-community.s3.dualstack.eu-west-1.amazonaws.com/original/3X/e/d/ed0b78b6abe0fec636cb60e56760e1862f60164b.png
By now, it only works when downloading the image
It would be interesting adding a CORS header to AI2 so that it can be dragged directly from community without having to download it
NOTE: We use S3 as CDN, so that maybe CORS rejected it because we use amazonaws.com and not kodular.io. Maybe it will work in your community as you may be using the same domain for both assets storage and platform
Sorry, the topic did not load properly. I thought it did, and I posted my comment without reading the rest of the comments…
Consequence: unuseful comment…
Testing upload code with extension and extension.
trying_upload.aia (192.7 KB)
I can upload .aia file with extension, but not extension file.
International characters (test):
El Ñandú corrió por Cádiz
ASCII code 131 = â ( letter a with circumflex accent or a-circumflex )
ASCII code 132 = ä ( letter a with umlaut or diaeresis , a-umlaut )
ASCII code 133 = à ( letter a with grave accent )
ASCII code 134 = å ( letter a with a ring )
ASCII code 135 = ç ( Minuscule c-cedilla )
ASCII code 136 = ê ( letter e with circumflex accent or e-circumflex )
ASCII code 137 = ë ( letter e with umlaut or diaeresis ; e-umlauts )
ASCII code 138 = è ( letter e with grave accent )
ASCII code 139 = ï ( letter i with umlaut or diaeresis ; i-umlaut )
ASCII code 140 = î ( letter i with circumflex accent or i-circumflex )
ASCII code 141 = ì ( letter i with grave accent )
ASCII code 142 = Ä ( letter A with umlaut or diaeresis ; A-umlaut )
ASCII code 143 = Å ( Capital letter A with a ring )
ASCII code 144 = É ( Capital letter E with acute accent or E-acute )
ASCII code 145 = æ ( Latin diphthong ae in lowercase )
ASCII code 146 = Æ ( Latin diphthong AE in uppercase )
ASCII code 147 = ô ( letter o with circumflex accent or o-circumflex )
ASCII code 148 = ö ( letter o with umlaut or diaeresis ; o-umlaut )
ASCII code 149 = ò ( letter o with grave accent )
ASCII code 150 = û ( letter u with circumflex accent or u-circumflex )
ASCII code 151 = ù ( letter u with grave accent )
ASCII code 152 = ÿ ( Lowercase letter y with diaeresis )
ASCII code 153 = Ö ( Letter O with umlaut or diaeresis ; O-umlaut )
ASCII code 154 = Ü ( Letter U with umlaut or diaeresis ; U-umlaut )
ASCII code 155 = ø ( Lowercase slashed zero or empty set )
ASCII code 156 = £ ( Pound sign ; symbol for the pound sterling )
ASCII code 157 = Ø ( Uppercase slashed zero or empty set )
ASCII code 158 = × ( Multiplication sign )
ASCII code 159 = ƒ ( Function sign ; f with hook sign ; florin sign )
ASCII code 160 = á ( Lowercase letter a with acute accent or a-acute )
ASCII code 161 = í ( Lowercase letter i with acute accent or i-acute )
ASCII code 162 = ó ( Lowercase letter o with acute accent or o-acute )
ASCII code 163 = ú ( Lowercase letter u with acute accent or u-acute )
ASCII code 164 = ñ ( eñe, enie, spanish letter enye, lowercase n with tilde )
ASCII code 165 = Ñ ( Spanish letter enye, uppercase N with tilde, EÑE, enie )
ASCII code 166 = ª ( feminine ordinal indicator )
ASCII code 167 = º ( masculine ordinal indicator )
ASCII code 168 = ¿ ( Inverted question marks )
We’ll have to think about this. One of the reasons we don’t allow apps with extensions in the gallery is because we want the contents of the projects to be auditable. This is easy to do with projects sans extensions because the behavior is entirely defined by the blocks. However, because extensions contained compiled bytecode, we don’t have a way to validate and say that they can be shared and not malicious. My guess is that we would want to apply the same logic to posting extensions to the community board.
On other forums we had sometimes the problem of users posting aia with paid extensions inside or posting paid extensions directly. The only way to know that, is to sometimes look inside the aia. This is something the PUs have to watch. I guess we have a lot of PUs hanging around that could do that. On the Kodular forum aia, aix and apks are able to be posted and like i said before in another post in 99,99999% of the cases nothing strange happens with it.