What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

This question already has an answer here:

I'd like to be able to add collapsible #regions within my post.

For example

Blah blah blah I am very smart and I will tell you how its done. Blah blah blah blah, if you're interested, that's like THIS:

#region explaining how to DO IT BABY


int main()
{
  puts( "DO IT BABY" ) ;
}

#endregion

Blah blah blah, more explanation.

(( the #region and #endregion pairs become invisible, and they basically look how #regions look in visual studio. ))

share|improve this question

marked as duplicate by ben is uǝq backwards, Azik, Aziz Shaikh, Martijn Pieters, James Dec 24 '13 at 12:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4  
Like a spoiler tag? –  random Oct 17 '09 at 1:48
4  
Good suggestion, but the rendered markup must make the collapsed region looks VERY clickable, else the content will be hidden in eternity. –  o.k.w Oct 17 '09 at 4:20
1  
-1 I don't want to do this. –  delete Oct 17 '09 at 7:59
    
    
Would love the feature. –  GSerg Jul 24 '10 at 13:26
1  
This is necessary. For example, I need to post the headers of an email to a question on WebApps, but I hate how it sits there, taking up a lot of vertical space by default. I have already stripped it down to the minimum and it still looks hideously bloated. –  Synetech Apr 21 at 17:07
add comment

5 Answers 5

up vote 7 down vote accepted

I actually like this idea, if only because there are other SE sites where the ability to hide a portion of one's answer (until the user elects to see it) would be beneficial. (I'm specifically thinking of SmarterGamer, where the ability to hide spoilers would make a lot of sense.)

On StackOverflow, I'm not so certain that people want to hide portions of answers, nor that users want portions of answers hidden. Thus, I'm less certain of its utility. (The one use case that really does spring to mind is when you have to post tons of code for some reason -- the ability to hide everything except the error lines might make sense; those who need the rest to debug can still get to it ... Er, I still don't know.)

That said, I can tell you that one of the owners of the Trilogy happens to be very much against code folding in general, the #region/#endregion pair, and posting large amounts of code to SO. So I wouldn't exactly hold my breath on this one. Indeed, you'll notice on link #2 there that this very same request is ... [status-declined]. (Yes, your rationale is different, but the underlying tech is identical.)

share|improve this answer
    
I believe there are some benefits. When I open a question that goes like 5 screens down, I sometimes tend to get scared away, which is not always reasonable because the actual question is small, and it's those three huge pieces of code that make it look big (which are not necessarily essential). It'd be great to be able to make such huge areas collapsible so the question body looks neat and small, and I can can read it as a whole piece of text. Take MSDN, for instance, they do exactly that in the topics' body. –  GSerg Jul 24 '10 at 13:30
    
I think it's useful to be able to include a summarised to-the-point answer followed by a collapsible section demonstrating your working. This way users who want quick answers can get them easily, while users who care about the working also have access to it. –  Sam May 29 '13 at 4:00
add comment

i don't like this, because that will encourage long-winded articles instead of concise precise answers.

If what you're saying isn't important enough to be read, don't put it in a collabsible section, just omit it - saves bandwidth, pixels, and reading time.

share|improve this answer
add comment

+1 great suggestion!

I would have loved this feature when asking this question.

While a question will often need a lot of supporting information for completeness, this can be to the detriment of readability.

share|improve this answer
add comment

I like this idea. Occasionally someone has a question where the only answer is a long-winded explanation/walk-through their code. Or in those times when someone has a problem that manifests itself over repeated iterations of improvement, and your answer grows larger and larger.

I'd like to give a paraphrase and then post a collapsible code block so the entire page isn't molested by my answer. I'm usually concise, but sometimes you just need a long answer.

share|improve this answer
add comment

You should file a feature request with Markdown, since that's what we use for markup.

share|improve this answer
    
It seems to me Markdown is shorthand for HTML, not JS+HTML –  bobobobo Apr 28 at 22:42
add comment

Not the answer you're looking for? Browse other questions tagged .