Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Post History

50%
+0 −0
Meta Thoughts on hiding challenge sections with expandable details tags

Since the examples I've given in the question are deliberately brief, they don't demonstrate the benefit of hiding a large block of text. I'm giving an example in this answer of one of my own chall...

posted 1y ago by trichoplax‭

Answer
#1: Initial revision by user avatar trichoplax‭ · 2022-10-19T22:10:32Z (over 1 year ago)
Since the examples I've given in the question are deliberately brief, they don't demonstrate the benefit of hiding a large block of text. I'm giving an example in this answer of one of my own challenges where I have used expandable `<details>` sections to hide parts of the challenge wording that might be seen as optional. I'd be interested to hear where you would draw the line between what is worth hiding and what is not (or that you would hide everything/nothing).

The challenge is [Balanced quinary quasiquine](https://codegolf.codidact.com/posts/287173) and I treated the sections as follows:

## Hidden sections
I have hidden two subsections in the Terminology section. My reasoning was that these are both established terms ("Quinary" and "Balanced Quinary") independent of this challenge, so for anyone already familiar with a term, that subsection does not need to be read.

I also hid a later subsection called "Detailed justification" that explains why I chose the threshold I did for what counts as a trivial case. The statement of ***what*** counts as a trivial case is displayed, but the explanation of ***why*** is hidden. My reasoning was that everyone needs to know what is excluded as too trivial, but anyone who is happy to simply accept that decision doesn't need to see the reason why. The section is there for anyone who needs to know that the decision wasn't arbitrary.

## Displayed sections
I have left visible the sections "Input", "Output", and "Test cases" because these are challenge specific, unlike the established terms in the terminology section. Everyone taking part in this challenge will have to read all of these sections to know what counts as a valid answer.

## Reasons I considered hiding more
More recently I have tried to think about who I'm optimising for. For a person reading the challenge for the first time ready to write an answer, the decisions described above are what made sense to me personally at the time. For a person who has already posted an answer and just wants to check one specific thing (perhaps whether an alternative input format is permitted) maybe it would be easier to just expand the relevant section rather than be presented with the entire text of the challenge. There is also the perspective of someone who has already read the text of the challenge and is regularly revisiting it to see new answers. Perhaps it would be easier for them to have everything hidden so they don't have to scroll down to the answers section.

However, as [Olin Lathrop's answer](https://codegolf.codidact.com/posts/287280/287283#answer-287283) points out, the section headings are already there. These serve the purpose of making specific information easier to find without needing to hide their content, and scrolling is easy.

Perhaps part of my incentive for making expandable sections is that I tend to write quite long input and output specifications. I try to reduce these as much as possible before posting, but I still usually feel like the challenge wording is too long. Maybe instead of making a challenge artificially shorter by hiding some sections, I should try to get better at spec golfing.