This is a project to drastically clean up and simplify the Zwiki skin code, templates, and styles.

Status:begun around 0.51, now done (double-check)

Goals

Make it easier for developers to add new views to Zwiki. We should make this as simple as possible. Eg with Django you add a method in one place and boom, you have a new view. We may want to say "just add a new page template to zwiki_skins or the wiki folder".

Make it easier for developers to understand the view code. We should have clearer separation of model and view code, like Django.

Eliminate duplication of templates between standard and plone skins. The feeling that every change must be applied to not one but two complex, almost-but-not-identical skin templates puts a big drag on cleanup and development efforts. We want to be able to concentrate on one template and get the benefit in both standard and plone skins. At the same time we want to keep the templates comprehensible so ordinary mortals can customize them without being driven nuts by twisty macros.

Make it much easier for wiki admins to customize their wiki's appearance. This means more pervasive, consistent, and understandable styles, and skin templates that are easier to understand, rearrange and maintain.

Make a first release of refactored views which does not have major visible skin changes. Don't refactor the skin code and redesign the skin at the same time.

Screenshots

Screenshots to judge the impact on the standard & plone skins.

Standard skin

0.51, pre-viewgeddon 0.52, version 1
standard-view-0.png standard-view-1.png
standard-edit-0.png standard-edit-1.png
standard-history-0.png standard-history-1.png
standard-backlinks-0.png standard-backlinks-1.png
standard-subscribe-0.png standard-subscribe-1.png

Plone skin

The plone skin is more affected as up till now it has had its own plonish templates.

0.51, pre-viewgeddon 0.52, version 1
plone-view-0.png plone-view-1.png
plone-edit-0.png plone-edit-1.png
plone-history-0.png plone-history-1.png
plone-backlinks-0.png plone-backlinks-1.png
plone-subscribe-0.png plone-subscribe-1.png

Here it is in plone with the current zwiki+RST stylesheet just overlaid on the plone styles. I think it makes it more appealing. It affects the whole plone skin though.

plone without zwiki stylesheet plone with zwiki stylesheet
plone-view-1.1.png plone-view-2.png

Discussion

testing --simon, Thu, 30 Mar 2006 10:32:51 -0800 reply

I'm close to switching this server over to the new code. leo.zwiki.org is an example of a wiki it breaks - old customized templates and the new code don't coexist well (wiki_template.macros and all that backward compatibility cruft is part of the problem). It may or may not be (a) possible (b) advisable to support pre-0.52 templates with the new code. I wonder.

please test, and keep testing --simon, Thu, 30 Mar 2006 15:39:08 -0800 reply

This server is now running the ViewGeddon code. Even though this is still evolving, from this point on the more testing it gets the better. There are two ways to test -

  1. use any of these wikis hosted on http://joyful.com , exploring all parts of the UI
  2. check out the ZWiki-viewgeddon branch from CodeRepos and use it on your servers, looking especially for any migration issues with your existing wikis, customized templates, different versions of plone, zope etc. This is especially valuable.

please test, and keep testing --simon, Thu, 30 Mar 2006 15:48:58 -0800 reply

Note the goals have been clarified and before/after screenshots have been added to this page.

Expected results: all should work and look roughly as before. Styles may be a little less polished, headings may be a little lacking, plone (http://plone.demo.zwiki.org) views may look a little less plonish, access keys and search meta tags do not yet work in plone.

I haven't yet decided whether to push towards getting this major refactoring into dapper, or our 0.52 release. There is a slightly awkward conjunction of 0.52 release date, ubuntu deadlines, and a string of recent releases with annoying bugs. There's lots more we can do now building on this work, but possibly if I get a good enough feeling about the stability and level of testing, the current code will be a good basis for 0.52 and dapper.

viewgeddon branch has landed --Simon Michael, Sat, 01 Apr 2006 16:15:10 -0800 reply

FYI, see related GeneralDiscussion posting (easiest to find here: http://joyfulsystems.blogspot.com/2006/04/update.html). And I merged the ZWiki-viewgeddon branch into the main ZWiki repo, so you probably want to pay attention to that one now as it will be more current. I'll use ZWiki-viewgeddon again only if I need to try something disruptive.

Everything should now be working at least as well as before. In plone we are lacking the zwiki styles and the plone action icons (do we care about those ?)

drop zwiki_plone layer ? --simon, Wed, 03 May 2006 00:05:24 -0700 reply

The zwiki_plone layer is empty, I can't think of any need for it, and I am tired of typing so much to edit skin templates. I think it's YAGNI time. I'd like to drop the zwiki_plone layer and rename zwiki_standard to zwiki. So it will be just skins/zwiki. Any reason why not ?

drop zwiki_plone layer ? & macros --simon, Wed, 03 May 2006 10:41:59 -0700 reply

I did this - much better. If anyone has code to clean up old obsolete skin layers in plone, let me know.

Also, I've simplified macro handling - it slurps all macros from the page templates listed in STANDARD_TEMPLATES into here/macros, and - which was the goal - it now rereads them when you are in debug mode and the file is modified. All of the built in templates, macros, and dtml now refresh when you're in debug mode - I think for the first time - and this will help skin developers greatly.