Spoiler element in community posts — Replace the word "Spoiler" with script name

1030
13
01-26-2024 05:34 AM
Status: Open
Labels (1)
Bud
by
Notable Contributor

I noticed @AlfredBaldenweck used an interesting technique where a lengthy Python script was collapsed into a "Spoiler."

Source: Improved documentation for updateConnectionProperties(): workspace_factory

spoiler.gif


The user can choose to expand or collapse the spoiler to show the Python script as needed.

That seems very useful when it comes to avoiding clutter in posts. Otherwise, lengthy posts and replies are cumbersome to navigate.


Idea:

Rather than using the default "Spoiler" text, could we customize the text with a more meaningful title, such as the Python script's name? I.e. MyScript.py.

Even if we had to make that change in the HTML editor, that would still be better than the default "Spoiler" text.

For example, if I copy/paste a spoiler into a post, then HTML mode looks like this:

<div class="lia-spoiler-container"><a class="lia-spoiler-link" href="https://community.
esri.com/t5/arcgis-pro-ideas/improved-documentation-for/idc-p/1278285/highlight/true#"
rel="nofollow noopener noreferrer">Spoiler</a></div>

So it seems like it should be possible to replace Spoiler with custom text. But I'm not good enough with HTML to get that working; everything I try gets automatically stripped out when I hit save/post.


Related: Support additional HTML tags in community posts

13 Comments
JesseCloutier

@Bud, we're reviewing this request to determine whether updating the 'Spoiler' text to something static and more broadly applicable would be a simple update or a more involved code change/customization. In anticipation of upgrading to the next generation version of this platform later in 2024, we're limiting new customizations until after that takes place, which will determine the shorter term outcome for this idea. I'm updating it to Under Review while our team evaluates.

JesseCloutier
Status changed to: Under Review
 
Bud
by

@AlfredBaldenweck Do you have any suggestions for a generic word to replace "Spoiler"?

  1. Details
  2. Code
  3. Something else?
JesseCloutier

@Bud our team was able to quickly evaluate and reach a conclusion: Because we're expecting code changes in the platform update I alluded to in my first message, we're pressing pause on code changes and customizations like this for now. I'm closing this idea for the time being but we'll be happy to re-evaluate once the update is complete--currently anticipated later this year.

JesseCloutier
Status changed to: Closed
 
AlfredBaldenweck

Yeah I'd love just to rename spoilers in general. I use them for code because sometimes I post 100+ lines at a time (and in the case you show, multiple times in the same post) so being able to hide that is nice for everyone else.

I think defaulting to "Spoilers" but letting us change the name space would be a good way to go about it.

Like so in that example you showed, the first block would be named like "CIM Error" or something, the second would be "Update Connection Properties()". 

I think either of your two suggestions would be fine, but giving us the option to just name it ourselves would be best.

JesseCloutier

Thanks for the additional feedback, @AlfredBaldenweck. You both make understandable points and it's something we'll be happy to re-evaluate after the anticipated update to our platform.

DavidPike

Nice idea.  I'd just throw my 2 pence in and say that closing ideas off (even with the best of intentions to pick them back up) could cause some ideas to drop of the radar.  Is there perhaps a better status to put these into?

AlfredBaldenweck

Agree. A "Judgment deferred" status plus the month/year it'll get checked again would be awesome.

 

Bud
by

A similar thought:

In other Esri communities, if an idea is valid, it doesn't get closed; it stays open.