Edgewall Software
Modify

Opened 11 years ago

Last modified 6 years ago

#9214 new enhancement

expandable blockquotes

Reported by: team@… Owned by:
Priority: normal Milestone: next-major-releases
Component: wiki system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Would be nice to have an ability to configure blockquotes as "expandable by jQuery". Sometimes the content of blockquote is very large, say, 1000 lines, and a wiki page would look ugly with such a long text. Making a blockquote "expandable" would help, for example:

{{{+expandable
#!xml
...very long xml...
}} }

Maybe such feature exists already, but I didn't find it. Thanks.

Attachments (1)

headings.png (28.1 KB ) - added by ilewismsl 8 years ago.
Image of heading expand/collapse with URL hash to track expanded sections

Download all attachments as: .zip

Change History (7)

comment:1 by Remy Blank, 11 years ago

Component: generalwiki system
Milestone: next-major-0.1X

That's a nice idea. In the same vein, I would like to have foldable sections in wiki pages, much like the "Attachment" and "Modify Ticket" sections on this page. It can already be done with a {{{#!div}}} section containing a {{{#!html}}} section, but it's a bit of a hack.

comment:2 by team@…, 11 years ago

exactly, with a HTML hack we can do this, but would be nice to have an standard option for this.

comment:3 by Christian Boos, 11 years ago

Owner: set to Christian Boos

comment:4 by ilewismsl, 8 years ago

If you add expand/collapse it would be nice if you could also add it to headings.

In particular:

=+ Heading1 =

would produce an expanded section with a ± box at its left that could collapse all the content from that h1 to the next h1 or to the end of the content if this is the last heading 1.

=- Heading1 =

would produce the same output but with the heading pre-collapsed when you load the page.

==+ Heading2 ==

Same story but to next h2, h1, or end of content.

We have something like this on our internal system and it works quite nicely. I will attach an image headings.png.

by ilewismsl, 8 years ago

Attachment: headings.png added

Image of heading expand/collapse with URL hash to track expanded sections

in reply to:  4 comment:5 by ilewismsl, 8 years ago

Replying to ilewismsl:

If you add expand/collapse it would be nice if you could also add it to headings.

I meant to say that we use a name/value hash (Sample: #Expand=-,+,-,+,-,-,-,-,-,-,-,-) on the url to track which sections are expanded and which are collapsed. The #Expand= value just has a comma separated flat list of ± for all affected headings in the document regardless of level.

The java script updates the #Expand= list as you click the ± boxes and at onload it either uses the default if there is no Expand= name or it expands/collapses as indicated by the URL. For a given fixed document - which is what most documents are most of the time, even wiki pages - this is fine. And, if the document changes making the list too long or too short we either ignore part of the Expand list or use defaults for the items the URL does not reach. You won't get quite what you expected but you will get something not too bad most of the time.

You can see an example of a URL at the top of the image.

It works quite nicely. It allows history to work (you do not come back to a different page when you click on a link and then hit the back button) and it allows you to send someone else a link that brings up a page that looks like what you meant to send, not something completely different as you often get with expand/collapse content on a page.

The only problem is handling the normal use of a hash to get to a particular place in the document. We handle that with another name/value pair (sample #Ofs=Hash&Expand=…) in the hash part of the URL. A basic hash link still works without JavaScript as long as it is in one of the expanded sections of the page. You only need the JavaScript to find the hash when you also need the Expand list.

comment:6 by Ryan J Ollos, 6 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.