Collapsible text section suggestion

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

Collapsible text section suggestion

Post by philiplu » Tue Jan 30, 2018 9:31 am

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: 320
Joined: Sun Mar 22, 2015 2:30 pm
Location: India
Contact:

Re: Collapsible text section suggestion

Post by MuthuVeerappanR » Sun Feb 11, 2018 4:33 am

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: 13
Joined: Wed Aug 02, 2017 7:51 pm
Location: Redmond, WA, USA

Re: Collapsible text section suggestion

Post by philiplu » Sun Feb 11, 2018 8:09 am

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: 77
Joined: Thu Oct 19, 2017 12:30 pm

Re: Collapsible text section suggestion

Post by traxex » Sun Feb 11, 2018 9:06 am

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: 2993
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Collapsible text section suggestion

Post by euler » Sun Feb 11, 2018 10:23 am

@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: 13
Joined: Wed Aug 02, 2017 7:51 pm
Location: Redmond, WA, USA

Re: Collapsible text section suggestion

Post by philiplu » Sun Feb 11, 2018 10:31 pm

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: 2993
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Collapsible text section suggestion

Post by euler » Mon Feb 12, 2018 8:45 am

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: 13
Joined: Wed Aug 02, 2017 7:51 pm
Location: Redmond, WA, USA

Re: Collapsible text section suggestion

Post by philiplu » Wed Feb 14, 2018 6:18 am

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: 2993
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Collapsible text section suggestion

Post by euler » Wed Feb 14, 2018 8:54 am

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