-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add collapsable answers #1422
Comments
This would look like it fits my purpose... as a user, this would just require me adding some tags around the part that needs to be concealed? |
Yup, you would write it |
For me, this would work, if it works for larger blocks of text too. |
To support more use cases, I'd prefer a more generic approach like github's like thisThis was made with the following markdown: <details>
<summary>like this</summary>
This was made with the following markdown:
[...]
</details> |
Darthcoin gave an interesting suggestion about having to pay to view the answer. Not fully convinced yet as I was just thinking of adding an extra click before one sees the answer, but in the case this suggestion makes sense, it would be best then to have the sats go to the stacker who posted the hidden answer. This might add a layer of complexity though to this issue. EDIT: on second thought, I don't think I'd want to get people to pay. If people want to see the answer, they should always be free to do so. It's also instructive and possibly entertaining to see answers from smarter people than oneself. One should not have to pay to do that. In the end, it's just about not spoiling the people who want to give the puzzle a genuine try. |
Should have some time this weekend to give this another try. What bothers me about this is it seems to get behavior consistent with github's, with the An alternative could be to use custom syntax that looks something like:
The drawback I see here is some loss of consistency. There would be support for some tags as expected and familiar for Markdown & HTML, and also some other tags using a custom syntax that users may not be aware of. Besides that, I'm wondering if it'd be possible to create a react component to emulate the collapsible section behavior as closely as possible and render that in posts instead. Typing To be continued |
It should be able to be done without rehype-raw. I highly recommend asking claude or chatgpt with the context of |
You are correct! PR coming shortly. |
Is your feature request related to a problem? Please describe.
Nothing important, nothing frustrating. Just thought that if I want to keep posting puzzles like this one, it'd be nice to have a way to collapse an answer to hide spoilers. But then again, unlikely this will ever be the primary use of SN, so I won't care much if it does not get implemented :)
Describe the solution you'd like
Something like what is illustrated here: https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab
Describe alternatives you've considered
Alternative: just ask people not to look at the answers before replying.
The text was updated successfully, but these errors were encountered: