Tags:
skin1Add my vote for this tag create new tag
view all tags

Develop a Stable Skin Interface

TWiki has not the best record for a stable skin interface. Each major and minor release since TWiki 4 seems to break skins. The latest example is OopsTemplatesNotShowingAnymore in the QuickMenuSkin on TWiki 4.1.2. Many new skins have been contributed during Beijing release and Cairo release (TWikiRelease01Sep2004), but none was working in TWiki 4 without changes, and only a few have been updated to work on TWiki 4. Today I had a conversation with the maintainer of the NTP TWiki. They just recently updated to TWiki 4 because the GnuSkin they used was never updated to TWiki 4.

What can we do to make the skin interface more stable, thus help grow the TWikiCommunity and increase the value of TWiki?

-- PeterThoeny - 15 Apr 2007

I think the changes should be documented better, so there would at least be hope for skins to run along with TWiki. The best thing would be to nail down the skin behavior after careful consideration, and treat the skin API as any other API - keep it as still as possible. The situation is pretty bad at the moment, from the regular webmaster point of view, since he can´t keep the skins that his users are used to.

As a first aid, I try to list the properties that affect skins, and let´s see if we can clarify the current situation. The following list states these properties (please append if necessary).

Skin affecting property Link
CSS: default classes/id:s required by twiki (hard coded)  
Template names (hard-coded) TWikiSkins
Template behaviour (e.g. default action when skin template is not available, ...)  
Template query order  
Variables required by templates (like %ATTACHTABLE%) TWikiSkins
TWiki variables TWikiVariables
(...)


Skin behavior change monitor

Changed skin behavior From version To version
WebChanges table is messed up (displays a long, single line).
QuickMenuSkin only!
4.0.5 4.1.2
Default oops-templates have changed; they no longer call "oops" at the bottom of the template. E.g. QuickMenuSkin defines "oops" in twiki.quickmenu.tmpl , and since there is no call to match the definition, no oops are ever displayed. FIX: make twiki.quickmenu.tmpl call the headers, body and footers. Dont forget to adjust other templates that call these, so that no duplicate pages are ever displayed. 4.0.5 4.1.2
When using rename for topic or web, the "Select all" and "Clear" buttons no longer work for any other skin than PatternSkin. I think the problem is in the javascript.
Checked template forms, they seem to be exactly the same. The only difference is that PatternSkin works, the rest don't.
This is what Firebug says:
<br />checkAll is not defined<br />onclick(click clientX=0, clientY=0)<br />
4.0.5 4.1.2

-- MikkoLaakso - 16 Apr 2007

Sorry, this was maybe a bit off-subject, and I am not a developer - but I am a skin developer anyway :).

-- MikkoLaakso - 16 Apr 2007

For my part, I think Arthur Michael and I, are working towards stablising the skins right now. It may take some time, because the reason its not seemed stable is because the skin system is not quite re-use and generic oritented, and because the twiki skins are still quite new!

If you think in terms of the amount of work that Arthur has done on PatternSkin, and similarly the amount of work that Micahel has done on NatSkin, and then compare it to the amount of time they have had to devote to their respective works, and the help (or lack thereof), The skins have only just matured - now we're working on pushing the lessons we've learned down into the skin subsystem.

the documentation that Mikko is starting here will be a very useful resource - as it will give us a measure of our sucess in communicating what is happening - Mikko, please continue!

-- SvenDowideit - 16 Apr 2007

Some of my thoughts.

Firstly I think the claim "Each major and minor release since TWiki 4 seems to break skins" is overly negative. The mentioned bug is most probably not a bug.

Skins are 'just' like plugins: the author is responsible for maintenance - unless someone else steps in. And what usually happens when the specs have changed is that maintained plugins are updated within a couple of months after a TWiki release.

But skins are more complex than (most) plugins. If the original author moved to other things in life a skin update is not easy to tackle. And there is such a thing as authorship that has a greater weight with visual things than with code.

I don't think we can define a "skin API". Skins are largely templates and as such free to compose. What we can do is document the interface to TWiki core. Undocumented SPLIT comes to mind.

-- ArthurClemens - 16 Apr 2007

I think that the actual problem is not that each release break skins, as the "API" for skins is pretty much stable given that it is the same "API" for topics (and we go through great lengths to keep it backward compatible). But there are some issues with each TWiki release and the release of new skins:

  • If a skin requires a plugin to work (the case of GnuSkin NatSkin), the plugin uses the internal of TWiki and is not updated, then the skin will fail (the case of GnuSkin).
  • If a skin derives from another skin (let say, PatternSkin), and a new version of that skin is released, there is a chance that the derived skin will break (it happened to me).

I don't know why OppsTemplatesNotShowingAnymore, but I think is worth finding the root of the problem (so we don't start a line of actions that is not the right one).

-- RafaelAlvarez - 17 Apr 2007

The problem with OopsTemplatesNotShowingAnymore was changed basic templates (like oopsmore.tmpl ). I think many skin builders will want to take advantage of the base templates, so they should remain as still as possible. Well, at least better documented than other templates/skins.

I wonder why the skins arent documented into the skins themselves? Every programmer comments his code, so why not comment skins? I think this would be enough for many cases and easiest to do.

-- MikkoLaakso - 22 Apr 2007

TWiki Skins are begining to be documented inline - there is now a comment syntax %{ comment }%

Also, if you want to see a skin that is based on re-using the oops tmpl's (and all the rest of the default tmpls - see MoveableTypeSkin

-- SvenDowideit - 22 Apr 2007

Sven, MoveableTypeSkin is very nice! I have seen it, but never looked into the templates. Thanks for the tip!

-- MikkoLaakso - 23 Apr 2007

Can somebody confirm that "Select all" and "Clear all" buttons (in rename) do not work on any other skin than PatternSkin? (e.g. try ?skin=classic)

-- MikkoLaakso - 25 Apr 2007

I could reproduce the bug on latest develop release (MainBranch). Filed Bugs:Item4034.

-- PeterThoeny - 08 May 2007

NTP TWiki has been using NatSkin for a long time. They said that they were about to upgrade to Dakar and thus move on with NatSkin as well, but then abandoned that way. This was a long time ago. I never received any substantial feedback by them, or even patches. I offered to help but it never came to it. Only by reading TWiki Irc logs I found them saying that it had "issues", not saying which, nor asking me for help. In effect, I don't care which skin they install on their site. It is their choice. But what exactly are these guys at NTP TWiki complaining about?

-- MichaelDaum - 08 May 2007

Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r19 - 2007-05-08 - MichaelDaum
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.