New Web IDE - testers?

Posted on
  • Hi,

    I've just made some quite big changes to the Web IDE, and I was wondering if some of you would be willing to test it out for me?

    What changed?

    A year or so ago, I made Espruino so that if it detected a special character (code 16) right at the start of a line, it'd turn off 'echo' (like the echo(0) commands you often see) - but only for that one command.

    I've just modified the Web IDE to use that instead of echo. Now, when uploading, it adds that character to the start of each new command, and also strips out whitespace and comments between commands, which would have been ignored by Espruino anyway.

    It should make the uploads much faster and a bit more reliable. It's far less likely you'll get stuck in a mode with echo off, and if you do, a simple Ctrl+C then Enter will get you out of it.

    I also had to change the way the terminal receives keypresses, so it can be used on Android devices when used with Web Bluetooth. You shouldn't notice much difference - but it's a big change so I'd like to check I haven't broken anything when working on normal computers.

    There's also:

    • Just clicking on the terminal is now much less likely to select and copy text (you need to click and drag for >0.2 seconds)
    • Clicking somewhere on a line (or multiple lines) you're editing will now move the cursor to where you clicked
    • Copying from the console will automatically remove the annoying : and > characters from the start of each line.
    • Some extra VT100 commands are supported, so when these go into Espruino it'll be way faster to use the command history, especially over slow links (9600 baud serial, BLE, etc)
    • Fixed a bug in 'projects' that caused modules to upload twice sometimes
    • Fixed some problems where pasting from Google Docs or the Forum would add dodgy characters

    How to test

    • Download the attached file, and unzip it somewhere
    • Click the Chrome Settings icon -> More Tools -> Extensions
    • Click Developer Mode
    • Click Load Unpacked extension and then choose the zip
    • You should now be able to click Launch. It'll also appear as a normal app (it's got the same icon as the normal Web IDE, but with a green banner saying 'Unpacked'

    Or, if you were already using the IDE from GitHub, you can just git pull

    Thanks! It'd be a great help to get some testing done on different boards/computers - I'd hate to push an update that might break for some people :)

    1 Attachment

  • Anyone able to give this a try?

  • I've got it and will be using sometime today

  • Had it up running yesterday on my Linux Mint 18 with a ESP32, seem to work ok.

  • Great, thanks!

  • Copying from the console will automatically remove the annoying : and > characters from the start of each line.

    Tested on Mac 10.11. Both serial and telnet comms works fine for me but I couldn't see the impact/benefit of the above. It seems to leave the chars in still, and behaviour seems identical to the to released 0.62 IDE.

  • Hmm, are you sure you're using the new version? One way to check is to hit the up-arrow after an upload and to see if there's an echo(0) in there. If there isn't it's the new version.

    (Also, the icon in the taskbar should have the green stripe on it).

    Having said that, when copying it'll only remove the :s if they're on every new line - so if you copy downwards and get a blank new line in afterwards then it won't remove anything.

    It also won't remove the first :, only a > - but I'll fix that now :)

  • It was a fresh clone this morning, didn't have it on this Mac previously.
    No echo(0) on cursor up and has the green unpacked stripe. Maybe I copied as you said. No big deal though.

    One idea for future development maybe? As I found recently minifying and concatenating the html for a webpage into a variable is a considerable pain in the backside, especially when you have to subsequently edit it. Could you support heredocs in the IDE - even though JS does not? And strip all the whitespace at upload?

    Just a thought.

  • Ahh, that's probably it - if you pull again (EspruinoTools, not just the WebIDE) then it'll be fixed.

    Actually you're in luck! See the 1v88 release thread

    You can use template literals, which are part of ES6 JavaScript and which can do multiline.

    Only thing that doesn't work right now (I just realised) is the console doesn't understand - so you need to wrap them in brackets if you're defining them on the root scope.

    edit: and if you grab a cutting edge build that'll be fixed too :)

  • Pulled again, yes - that's better - now all the : and > stripped when copy/pasting. Will get hold of v1.88 soon.

    Also you probably know git clone --recursive takes care of the submodule dependency so that git pull is sufficient to update that too (certainly in 2.7.4) which is much easier than cloning separately and pulling separately, but the README on the IDE repo does not reflect this. Maybe I will update, if ok?

  • Actually I didn't :)

    Yes, it'd be great if you could update it - same for any other things that I might have missed there. Generally once I've got something set up for development I stick with it, so often the Getting Started guides for developers aren't great or are a bit out of date.

  • Is everyone who tried it pretty happy with it now? I've been using it for over a week now and I'm pretty happy with it, so I'll probably push it soon

  • Worked well enough for me too. I haven't had any chance to look at Espruino this week yet, but certainly everything I did last week worked as expected. Ship it!

  • Seems to be good.

  • No problems encountered.

  • Great! Just published - It should auto-update over the next hour or so.

    I've also published a 'native' version of the Web IDE for Windows:

    I'll be able to publish other versions for Mac OS and Linux too (for when Google kill their web store next year) but this one can handle BLE UART devices - which is needed because Windows doesn't support Web Bluetooth yet

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

New Web IDE - testers?

Posted by Avatar for Gordon @Gordon