[Zope3-dev] Template usage
Alexander Limi
limi@plone.org
Thu, 06 Feb 2003 18:11:46 +0100
Hi,
This is Godefroid and Alexander writing, and as you may have discovered
we've done some updates to the Rotterdam skin. We've changed the color
scheme (to please the people that disliked the Plone colors), and moved
things around quite a bit.
In particular we have moved the actions into an "Action Bar" at the top,
similar to toolbars in applications. We have further plans with this, so
bear with us for a while here, things aren't complete yet. :)
This mail will mainly discuss the current concept of having a separate
template for dialog forms.
At the moment, we have two top-level templates in Z3, the main template,
simply called template.pt, and the dialog template called dialog_macros.pt.
We agree with the rationale behind having a way to separate the two page
types, but we don't think it should be done by having two separate
templates. The main template can easily be reused for this, the only thing
needed is a way to decide whether a page is a view or falls into a
different category (for example a dialog page or maybe a wizard page for
novice and setup interfaces later on).
If we're able to detect whether a PT is rendering a view or a dialog, we
can simply hide the irrelevant parts.
How this should be done technically, we will leave up to you, but seeing as
the GlobalMenuBrowserService (hope I got that right ;) is already able to
decide whether a view is selected or not, it should be able to tell us when
there are no applicable views on a page - like the case of a dialog.
So any suggestions on how to do this are appreciated, as we need a
mechanism that is easy to enforce and maintain.
Actually hiding too much of the interface confuses the user more than
helping, since you in a way "pull out the rug" under him by removing things
he normally relies on, like the navigation box or similar items. Removing
non-applicable items is ok, but most of the other elements should be kept
where they usually are. So in the case of dialogs, we will be hiding the
view tabs and the action bar, while keeping navigation and personalized
elements.
An example is checked in in the Grant action dialog, where we've simply
emptied the action and view slots. This is not the way to do it
programmatically, just a visual example.
On a related note, we need cancel buttons on any screen that is a form
where you make decisions. One example is the Role Permission Mapping form,
which has a Save Changes button, but no Cancel button. We should remember
this when creating dialog forms.
And lastly, a small note from the XHTML dictator:
Apart from some rare cases, you're doing a very good job at keeping markup
clean. We will fix the remaining occurences as we plod along into the code.
In general:
- Don't style ANY HTML elements. Ever. :)
- Don't use tables unless you have specific tabular data
- No colors should be specified
- Use <strong> and <em>, not <b> or <i> to emphasize text
It's better that the code is clean and looks a bit ugly visually right now
than us having to remove redundant code when re-styling things. Most pages
should look good with minimal markup (like p and strong tags).
--
Godefroid Chapelle and Alexander Limi