Feature Proposal: Implementing Accordion to Twisty

Motivation

To have other ways to structure content, hide and show things

Description and Documentation

http://foswiki.org/Tasks/Item1323

Examples

Impact

%WHATDOESITAFFECT%
edit

Implementation

-- Contributors: EugenMayer - 19 Mar 2009

Discussion

I suggest that accordion, and tab UI's should be implemented using the already existing STARTSECTION and ENDSECTION tags, which would mean that the only additional tags needed would be to list the 'sections' that will be grouped. This will require a TOM addressing for topic sections - so that you can make a tabbed UI using sections from several topics.

Also, a non-JS fallback should be pretty simple to implement along the way - URLPARAM that selects new view, with clicking on an acrodian/tab anchor forcing reload.

It does look like you need to fill in a 'proposed syntax and the rest of the feature req above...

-- SvenDowideit - 20 Mar 2009

Does the use of the STARTSECTION/ENDSECTION macros for twisty sections have any impact on nested sections, or sections that are not on line boundarys? For example a Table row that is "| col1 | col2 | col3 |%ENDSECTION"

-- GeorgeClark - 20 Mar 2009

STARTSECTION and ENDSECTION have a different meaning: they are used for INCLUDE only. So that does not make immediate sense.

Then compare with jQuery syntax for accordion sections:
<div id="accordion">
  <div>
    <a href="#">First header</a>
    <div>First content</div>
  </div>
  <div>
    <a href="#">Second header</a>
    <div>Second content</div>
  </div>
</div>

The non-js fallback here is just showing all contents:

First header
First content
Second header
Second content

Which is similar to Twisty non-js fallback.

-- ArthurClemens - 21 Mar 2009

I did suggest it at the beginning and even started coding, but looking at the bigger picture of providing TAGs to common interface solutions (see MoveToJQuery), I think now adding tabs to Twisty is a bit farfetched.

But tabs, accordion and twisty have in common that some content part/section/div is hidden and shown. The syntax should reflect that.

-- ArthurClemens - 21 Mar 2009

Changing to a ParkedProposal. Developer left the project.

-- Main.GeorgeClark - 03 Nov 2015 - 15:58
Topic revision: r6 - 03 Nov 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy