• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5532: TwistyPlugin has some mean sideeffects. (and some feature ideas)

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TwistyPlugin Normal New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I was going to try to use twistie to build a UI from sections that are used in several places, and noticed the following
  1. TWISTYTOGGLE{id="login" start="show"} will hide the content if there is no matching TWISTYBUTTON
  2. there is some real oddity if your page has more than one TWISTYBUTTON with the same id
  3. the js header is literal text in the pm file - if that gets moved out to a .tmpl file, we can have one TWistie plugin with multiple js backends
    • tracked in Item5557, and fixing Item4780 because it will be needed for consistency

and as feature requests

  1. depressingly for me, I can't specfy an alt text to use for TWISTYBUTTON if there is no JS - I want a twisty, but if i can't have it, for the user to be directed to another topic..
    • I'd also love to be able to have TWISTYBUTTON use the alt text if there is no matching TWISTYTOGGLE section on the page
  2. there's no way to make the configure UI? I thought twistyplugin and configure shared code?

so the big Q is - are you happy to let me add these? and have you other ideas / info that could help me get to this?

-- TWiki:Main/SvenDowideit - 14 Apr 2008

Twisty is not really made to show other content if javascript if not available. By default it will show the contents.

Surprisingly it will hide contents if only TWISTYTOGGLE is used, you explicitly must pass start="show". That may be a bug.

What works is this - be it verbose - construction:

%TWISTYTOGGLE{id="1" start="show" noscript="hide"}%
This text is shown is javascript is ON
%ENDTWISTYTOGGLE%
%TWISTYTOGGLE{id="2" start="hide" noscript="show"}%
This text is shown is javascript is OFF
%ENDTWISTYTOGGLE%

Which results in: This text is shown is javascript is ON This text is shown is javascript is OFF
Parameter id must be unique. But apparently the plugin does not add ids automatically when they are not passed, as it does with TWISTY. This may be a bug.
The configure accordion has unique code. It is also not without bugs. There is no Twisty code out of the box to create this.
Multiple js backends sounds fine. It would make maintenance easier instead of having 2 Twisty plugins.

-- TWiki:Main.ArthurClemens - 15 Apr 2008

It turns out that the one TWISTYBUTTON per id is hardcoded into the way that the html id's are built to map to the SECTION names, and the JS Storage - this means that changing it will cause much of the code to need re-writing, and that using 2 TWISTYBUTTON's with the same id produces invalid html - as you get 2 elements with the same ID.

-- TWiki:Main.SvenDowideit - 22 Apr 2008

I cannot see this is a release blocker. It has been hidden from the Release Blocker view because someone changed the release blocker search in a way that many extensions incl this one was missed.

But now I see it I will downgrade it to normal. Fix it if you want. But if you do not we can still release 4.2.1

KJL 02 Jun 2008

ItemTemplate
Summary TwistyPlugin has some mean sideeffects. (and some feature ideas)
ReportedBy TWiki:Main.SvenDowideit
Codebase

SVN Range TWiki-5.0.0, Sun, 13 Apr 2008, build 16659
AppliesTo Extension
Component TwistyPlugin
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2008-06-02 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback