The "Hide Details" function seems to fail for no reason


(Theo) #1

Hi,

We’ve just started using your forums for Drowned in Sound and the results are good, but there’s a maddening issue around the special feature to do ‘Hide Details’. Where you click to show stuff.

I mean using this:

Summary

Some stuff I’m hiding

It’ll look fine in the preview but when you post it’s not right. You can quote the post and the code is fine.

Examples:

and there’s a link in there from use Japes to a whole thread where he can’t seem to make the hide details work.

Anyway, has anyone else spotted this or know why it might be?

Thanks in advance


(Eli the Bearded) #2

Can you reproduce it here? I don’t have an account there, so I can’t “quote the post” to see the original formatting. Looking at HTML source I see the issue:

<details><summary>Summary</summary>

<p>Only four words here</p>

</details>

<p>Nine words<br><details><summary>Summary</summary></details></p>

<p>The quick brown fox jumps over the lazy dog</p>

The later ones do not have the content in the details container.


(Theo) #3

Thanks a lot. I’ll see if I can when I am next able. Maybe tomorrow but probably thursday. Cheers


(Jeff Atwood) #4

When I have seen this, it’s usually due to inappropriate or incorrect line breaks (returns) in the hidden part of the post. Try reformatting.


Details Tags Bold/Italics
(Jeff Atwood) #5

Yep confirmed

this works, please do this:

WORDS GO HERE

[details=I saw my dad recently? He looks like this guy]
<img src="/uploads/drownedinsound/original/2X/b/b4082d4b3b0c792eab8cbad8aed157988494d675.jpg" width="286" height="320">
[/details]

WORDS GO HERE

this does not work, please do not do this:

WORDS GO HERE
[details=I saw my dad recently? He looks like this guy]
<img src="/uploads/drownedinsound/original/2X/b/b4082d4b3b0c792eab8cbad8aed157988494d675.jpg" width="286" height="320">
[/details]
WORDS GO HERE

(Theo) #6

Okay thanks a lot, I’ll take a look.


(James North) #7

Thanks for posting this solution @codinghorror.

The one thing I’ve got that is weird is that when a post with hide details is quoted, the ‘hidden’ text is being revealed in the quote. Is that normal behaviour?

It renders correctly in the post preview when I ‘edit’ the post, but once the post is saved it just reveals the spoiler.


Can we try it here?

Spoiler

The Walking Dead has zombies.

I’m on latest.


(James North) #8

Hello there - you are very interesting.

Yeah - it actually gets stripped…


#9

It won’t be fixed, you have to manually correct it everytime


(James North) #10

Testing the quote function when propagating full post.

Using select and quote to reply seems to strip it


(James North) #11

So in the top case, I propagated the post with the quote button on the top left.

Even though it was formatted correctly in the original post so as to be hidden, and it was formatted correctly in my preview on the right when replying, it reveals when hitting ‘reply’.

Test by replying to this:

Summary

Hidden Text


(James North) #12

Sorry my screenshot was of when I was trying to test the line break thing.

But even when the break is there, it still fails in quote format.


(James North) #13

Right so, here’s a screenshot showing two situations with Hidden Details when quoted.

  1. Hidden Details at the end of the post contains no line break after the spoiler by default, but even when one is edited in, it still reveals the hidden content.
  2. Hidden details in the middle of a post contains a line break after the spoiler because of normal text formatting, and also reveals the hidden content.

It seems that no matter what is done, when the hidden details are propagated into a quote, the spoiler is exposed.

Sorry for the multi-post, just trying to be as clear as I can with the behaviour.


(Jeff Atwood) #14

It’s not good form to quote an entire spoiler anyway.


(Eli the Bearded) #15

Doesn’t details fail if you don’t have blank lines before and after?

But adding blank lines to the quoted text doesn’t help. :sadpanda:


(James North) #16

Details fails when it is within a quote even if the formatting is correct.

Try quoting this whole post and including the details:

Summary

THIS TEXT SHOULD NOT BE VISIBLE


(Jeff Atwood) #18

Let me see. Expand the above (click on the bar that says “jamesnorth”)

Nope works fine. No need to quote everything, just quote the specific words. Whoever wants to can expand that quote and see the spoiler, then expand the spoiler. Quoting the actual words of a spoiler seems like kind of a jerk move…


(James North) #19

Fair enough that’s your position, Jeff, I think it probably just behaves differently to how I’d expect it to personally.

It’s also odd that it appears to work fine in the preview and then fail when in it’s posted.

On one of the forums I run with Discourse some posts are very long and they can contain small spoilers in the middle, so one would have to pick around the details.

If the instruction is to just not quote spoilers, I’ll tell everyone that.


(Jeff Atwood) #20

It is really unclear to me why anyone would want to quote the actual spoiler words and the spoiler action itself.


(James North) #21

It’s probably more that someone wants to respond to several points in a whole post using the little quote button (especially on a mobile or something) and that the spoiler is kind of incidental in the post.

They’re obviously not replying to the spoiler (more to the greater content), but the spoiler gets propagated into the quote reply as part of the full quote and is revealed.