RolePlay onLine RPoL Logo

, welcome to RPoL Development

12:22, 20th April 2024 (GMT+0)

Suggestion: Collapsible sections in posts.

Posted by Ashwolf
Ashwolf
member, 5 posts
Tue 12 May 2015
at 14:32
  • msg #1

Suggestion: Collapsible sections in posts

Hi,

I've been using the site for one of my games, and it's very distracting when people are posting dice rolls into an in character thread.
While it's possible to get them posting in a separate thread, it would be easier if there was a tag that allowed client-side collapsing/expansion of the view so that the dice rolls and OOC comments can be read when desired and are otherwise hidden.

This is different to what is currently being done for spoilers.

Here's an example I've used elsewhere, this post has collapsible text. I've spoilered it because of the external link:

Spoiler text: (Highlight or hover over the text to view)
http://www.myth-weavers.com/showthread.php?p=5711626#post5711626

bigbadron
moderator, 14841 posts
He's big, he's bad,
but mostly he's Ron.
Tue 12 May 2015
at 14:41

Re: Suggestion: Collapsible sections in posts

This has been requested before, mostly for the purpose of collapsing spoilers.  Unfortunately it would require the use of javascript, which would mean it wouldn't work for people who do not have javascript enabled.

link to a message in this forum
link to a message in this forum
LoreGuard
member, 601 posts
Tue 12 May 2015
at 19:19
  • msg #3

Re: Suggestion: Collapsible sections in posts

I liked the idea as well... and the hover trick works on most newer browsers at the time I tried it, but there was at least one of the major browsers that wouldn't have worked on a version that at the time wouldn't have been surprising to see.

I had contemplated, rather than having it display off... perhaps having it shrink the font-size of text by a lot.  However, Jase has an excellent point that HOVER might be difficult to achieve properly on tablets that are using touch.

The question I might have would be, would it be possible to have the base spoiler as is... but have a spoiler_shrink method that gets called at pageload if javascript is enabled, that changes the class to jsEnabledSpoiler or something like that, which would shrink the box at load.  Then as you know JS is enabled, because it only comes into play if the load JS got triggered, you have a JS handle designed to reveal the spoiler when it is clicked on?

It would be an idea... would work for browsers that have JS enable (with increased functionality) as well as non-JS browsers, which would get the original behavior.

Just a thought.  I like the idea of JS not being required, but admit it would be nice to have the enhanced functionality if you do have JS turn on.
cruinne
moderator, 6621 posts
I'm not as dumb
as your parents.
Tue 12 May 2015
at 19:23

Re: Suggestion: Collapsible sections in posts

I think perhaps.  If I were maintaining the code (for free), though, I wouldn't two methods of achieving the same thing to maintain.  (If I were maintaining it for hourly pay, sure, add as many complications as you like! The more the merrier! heehee.)
LoreGuard
member, 602 posts
Tue 12 May 2015
at 19:47
  • msg #5

Re: Suggestion: Collapsible sections in posts

My point is there already is Javascript in place to make it more convenient for those who have it on, if there is a way to improve it without breaking the non-JS method of display... it would be something Jase could consider.  I imagine he does other coding, so the exercise might prove useful.
<span class='hide' onmouseover="vis(this,1);" onmouseout="vis(this,0);">

I'm fairly certain that I saw code that would step you through all the elements of a particular class, so your load script could check for 'hide' class objects.  Am I saying it should be a priority... no.  But we've also been told to present ideas and let Jase decide if it would be worth it.  If creating a pageload function, and minor tweak to the existing vis fuction, would improve the spoilers usefulness, maybe he might look into it?

I would guess those two threads probably aren't the only ones that have brought it up in the past.  So it is a frequent thought on people's mind.  On the other hand this spoiler is unique... and kind of clever.  Jase may feel it is sort of a 'trademark' of sorts.  That might be enough reason for him to want to keep it as it is.
Ashwolf
member, 6 posts
Wed 13 May 2015
at 02:34
  • msg #6

Re: Suggestion: Collapsible sections in posts

Those older requests talk a lot about javascript support - I'm pretty sure all the major browsers support javascript now, including most mobile devices.

The current spoiler display (with bold, back text) is also pretty ugly and doesn't encourage use in IC threads. This was raised in the other threads about this too.
bigbadron
moderator, 14842 posts
He's big, he's bad,
but mostly he's Ron.
Wed 13 May 2015
at 02:39

Re: Suggestion: Collapsible sections in posts

In reply to Ashwolf (msg # 6):

While the browsers may support it, a lot of users don't.
DarkLightHitomi
member, 894 posts
Sat 16 May 2015
at 01:22
  • msg #8

Re: Suggestion: Collapsible sections in posts

How about something like the Private lines?

 If I'm guessing correctly, private lines are only loaded by the viewer they are for, thus those who aren't allowed to see it, don't see any space consumed by it. Perhaps have a flag on the spoiler, that treats it like a private line but instead of based on who is loading the page, it is based on whether they have the flag to show spoilers when they load the page. Then, just leave a single visible line that says spoiler that links to the post it is in but with the flag active. Of course, a setting might set the flag to default on, instead of defaulting to off, for those who wait for ages to load each page.
Sign In