15

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. ))

6
  • 4
    Like a spoiler tag?
    – random
    Oct 17, 2009 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, 2009 at 4:20
  • 1
    -1 I don't want to do this.
    – delete
    Oct 17, 2009 at 7:59
  • meta.stackexchange.com/questions/1191/…
    – mmx
    Oct 17, 2009 at 18:30
  • 1
    Would love the feature.
    – GSerg
    Jul 24, 2010 at 13:26
  • 2
    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, 2014 at 17:07

4 Answers 4

10

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.)

2
  • 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, 2010 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, 2013 at 4:00
4

+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.

-1

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.

-3

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

1
  • 2
    It seems to me Markdown is shorthand for HTML, not JS+HTML
    – bobobobo
    Apr 28, 2014 at 22:42

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