This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Keith Lang
Posted Nov 17 - Read on Facebook

Feature request: Code folding and/or some ability to visually group code blocks.

I'm loving the depth I can work at in Framer—having had years of experience in Quartz Composer, loving being able to extend a sketch into very featured prototype without tying oneself in noodles.

Maybe it's just me, or maybe the designer-mind, but I find my eyes glazing over when I look at my own code after a few days.

Request 1: Code folding (or better). I imagine I might select a block of code, click a disclosure triangle and have the entire block fold into a single line… would be nice if it picked up the first comment line as the 'title' of the block.

Request 2: Perhaps the ability to remember these blocks, so even if the code is 'unfurled' then the visual 'blocks' are visible.

Request 3: If nothing else, some general advice on best practice would be wonderful! For example, I've taken to drawing 'lines' with #'s to achieve some 'blocking', see image.


Jordan Robert Dobson

I have been asking for this for a while as well. Coda does this really well IMO. Also, the ability to list variables and functions.

Jordan Robert Dobson

I do the ######## for lines as well. Nothing wrong with that.

Koen Bok

We have ideas for this, and are experimenting with better organization for large projects around code folding. Send your engineers our way :-)

Jordan Robert Dobson

That said... I think the best thing you can do is start to move your work into modules and begin to simplify your main file.

Jordan Robert Dobson

That's awesome. You can only do so many things. We still don't hear this a lot but it's awesome you're thinking through some of this.

Keith Lang

Thanks for listening! In my wild imagination, I could click a code block, click the 'modularize' button and everything else would happen for me…creation of module, including it, and changes code to reference that instead of function. :-)

Ed Chao

This! I initially thought modules would solve this problem for me, but since most of my framer code is rapidly written, it feels a bit of an overcompensation to break it out into modules.

Read the entire post on Facebook