Code Rollups

spencergs requested a very useful feature at the bottom of his post about 6 months ago.

Is there any likelihood of this materialising? I’ve got over 2K lines in both agent and device and I’m always grateful for painless ways to hide code away that I’m not focused on. I am familiar with Alt-0 and Alt-Shift-0, but it would be great if I could encode something in comments that would force stuff to be rolled up by default. Alternately, could the editor simply remember what is folded up or expanded?

I have multiple dev devices that I’m tracking. Every time I swap devices by clicking on the left hand column, I lose my folds. Additionally, server.log() still has update issues where I need to reload the page every now and again to see updates. All the folds are lost when I do this.

BTW, it’s a shame that Squirrel constants have to be placed at root level. I have a lot of them that are particular to classes, but AFAICS I can’t declare them inside the class. Thus, even if the class is folded-up, I still see a page full of const declarations.

This will mainly be addressed by the HTTP API that allows you to develop locally and push code to the server for compilation. You can then concatenate your modules together with scripts before pushing.

I don’t know anymore who posted this, but I use it all the time
`
// *************** Blank**************** if{
//here your parts of code

//}
`

@ammaree - We are currently implementing a feature to preserve the state of rollups across refreshes, etc (although it’s going to use local storage, which means it won’t preserve state across multiple browsers/machines).

Hi Dolf,

I posted it, but unfortunately it still does not solve the main problem highlighted by @coverdriven which is the fact that the state of rollup vs expanded is lost on a refresh (regularly) of device change

So, +10 for the HTTP API & scripts!!

Andre

@ammaree

anyway, your trick works for arduino as well…

@beardedinventor
for this, we have Google drive…

@beardedinventor
Even as a local feature, this would be great.