Collapsible Comment Blocks

As the title says, I wanted to ask if its possible to be allowed to Collapse blocks of single line comments, and/or multi-line comments?
(Sorry if it this already exists and I just couldn’t figure it out)

Sometimes some things just need larger more complex comments explaining it when working with others, or simply need to be there as a note for future implementation but with a bit more detail.
Or code that’s commented out may live there temporarily for some time due to testing or whatever other reason.

Sure this isn’t exactly a major issue, but would be a nice quality of life fix for me and possibly others.

Are you referring to here on Ask or the comments on repls?

I believe they mean collapsing comments on a Repl. I get this feature to if its that.

Yes, in the IDE or in a Repl.

For the IDE: Inline comment collapsing currently does not exist there. I think that might be hard to implement too.

I do agree with being able to collapse Repl comments (like updates, paragraph comments, etc).

I’m relatively new to this, so I’m not quite clear on the distinction.
To me a Repl is essentially a project within the online IDE.
Or is there more to it?

IDE (to me): To me this means inside of the Repl, the code and files you create and edit and the Repl editor is the IDE. (My idea is: what //comment goes here, //comment...

Repl: The comment section of a public Repl. I.e:

Hey, nice Repl you got here. You can improve it by doing thingy to stuff that makes thing go and do other stuff that may help with things that stuff does to the other thing needed to do stuff.
Hey, nice Repl you got here... (click to view comment)

Just to clarify.

When referring to the IDE section, most people use Workspace.
The repl refers to the workspace and cover page.

But yes, collapsing comments would be very nice!

1 Like

Ah I see, well I haven’t really experienced/used comments in a public Repl yet so I cant say much about it.
I essentially meant for the IDE for things like:

// Block
// of
// single line
if (...) 
{
   block of code
}

to

//...
if (...) 
{
   block of code
}

or

/*
   Some
   multi line
   comment
*/
if (...) 
{
   block of code
}

to

/*...*/
if (...) 
{
   block of code
}

Similar to this pre existing feature:


Yes, blocks of code (in my current case JS) can do this, but comments cannot.

I would love for this to happen for comments. It would have to look different for inline comments though.

Well for inline, at least from other IDE’s Im used to, I just started using Multi-Line comments instead.
Some of which allowed you to collaps it even if its not on multiple lines:

if (... /* Comment here for some reason*/) 
{
   block of code
}

could be collapsed to this

if (... /*...*/) 
{
   block of code
}

Interesting, this would be cool.

I’m pretty sure this already exists for JavaScript and some other languages.

Yes, the /* Multiline */ comments can be collapsed.
I would edit it in the example one above since it already exists but cant anymore.

What I am revering to is comment blocks of // singleline comments. And potentially allow us to collapse multi line comments that are use in-line, meaning that its not actually on multiple lines but stuck between code somewhere as the example of the IF statement I have given.

1 Like