Collapsible text section suggestion

Announcements, comments, ideas, feedback, and "How do I... ?" questions
Post Reply
philiplu
Posts: 31
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Collapsible text section suggestion

Post by philiplu »

I'd like to post something fairly involved in a problem forum, but want it to be normally collapsed in the same way as code blocks. Unlike a code block, though, I'd like to post with the normal formatting available. In particular, I'd like MathJAX to work.

The use case is when I want to include a lengthy sequence in a post, but don't want to make everyone scroll through that when they're not interested, or just trying to get to the later posts on the page. It would also allow hiding some computation that might give away too much to people who'd rather see the main idea, then go off and derive the particulars themselves.

Is something like that possible? I notice a pinned post from 2007 about hiding text with [ s ], but that's about this chat forum, not the problem forums. Also, this forum's [ s ] doesn't collapse anything, just hides the text until you click Reveal, so it only does half of what I'm after.
Image

MuthuVeerappanR
Posts: 472
Joined: Sun Mar 22, 2015 2:30 pm
Location: India
Contact:

Re: Collapsible text section suggestion

Post by MuthuVeerappanR »

Kudos to the collapse idea. Thanks euler.
Image
It is not knowledge, but the act of learning, not possession but the act of getting there, which grants the greatest enjoyment.

philiplu
Posts: 31
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Re: Collapsible text section suggestion

Post by philiplu »

Whoa, I hadn't noticed my suggestion had been implemented. Very nice - and I like the ability to title the collapsed block. Thanks indeed, euler.
Image

traxex
Posts: 66
Joined: Thu Oct 19, 2017 1:30 pm

Re: Collapsible text section suggestion

Post by traxex »

This will be useful. In the past I've omitted some details from my posts just to preserve space.

I noted that the about page contains "never discuss other problems" in the first Collapse example. While it is just an example of formatting and not an official guideline, it is a bit odd, since the News entry explicitly suggests using Collapse for well meaning comments about other problems.
Technically, everyone is full of himself.

User avatar
euler
Administrator
Posts: 3371
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Collapsible text section suggestion

Post by euler »

@traxex: I've reworded it to match the News feed. Sorry to cause confusion.

@philiplu: You're welcome. It was a very good suggestion and one which I think a lot of people will appreciate.
Image
impudens simia et macrologus profundus fabulae

philiplu
Posts: 31
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Re: Collapsible text section suggestion

Post by philiplu »

You can see the use case I had in mind in my reworked 31 Jan 2018 post in Problem 209 (View Problem). The new BBCode reduces my post from way too long to just wordy. Brevity, alas, may be beyond me. :)
Image

User avatar
euler
Administrator
Posts: 3371
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Collapsible text section suggestion

Post by euler »

Thanks for sharing. It was good to see it in action, and being used so well. Great post. Worthy of being made permanent. 8-)
Image
impudens simia et macrologus profundus fabulae

philiplu
Posts: 31
Joined: Wed Aug 02, 2017 8:51 pm
Location: Redmond, WA, USA

Re: Collapsible text section suggestion

Post by philiplu »

Thanks again for implementing the collapse BBCode. Don't want to sound ungrateful, but I'm seeing behavior which might be intentional or just a bug. I can't nest other BBCodes inside a collapse block. I wanted to use collapse around an image, so the image wouldn't take excessive space, but it didn't work - looks like expanding a collapsed block doesn't re-process any BBCodes within the block.

Is this an intentional (or unintentional) limitation, or a bug in the implementation?

And completely off-topic, I just noticed my solved count (in my auto-signature) is a Fermat prime. Only 65,280 more solutions until that happens again! :D
Image

User avatar
euler
Administrator
Posts: 3371
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Collapsible text section suggestion

Post by euler »

It was entirely unintentional. I thought I'd tested it, but in testing the tests I seem to have inadvertently disabled nested BBCodes. It should be working an intended now. Thanks for reporting it.
philiplu wrote:
Wed Feb 14, 2018 6:18 am
I just noticed my solved count (in my auto-signature) is a Fermat prime. Only 65,280 more solutions until that happens again! :D
This is one of the great things about being part of a community like Project Euler. There aren't many other places in the world you could share something as cool as that and see it appreciated. Congratulations! 8-)
Image
impudens simia et macrologus profundus fabulae

Post Reply