On 18/02/15 00:43, Richard Hipp wrote:
[...]
> ....will likely have a modified DOM for
> the web interface and thus may break any new skins you come up with
> today.

This might be a good time to mention that I've been playing with a
Material Design skin for Fossil, using the Polymer engine. There's a
totally not-fit-for-consumption preview here:

http://cowlark.com/cgi-bin/fossil.cgi/fhg/doc/tip/doc/index.wiki

Most of the interesting stuff is in the settings pages, unfortunately,
and involves forms, although there are a couple of trivial forms
available without needing to be an admin user (e.g. the login page, or
the Wiki search box). They don't really do it justice, though. Also you
can see the adaptive sidebar in action if you make the page narrow.

The biggest thing which is causing me problems is that a lot of the UI
structure is hidden inside the Fossil server and is not available to the
skin. For example, the Timeline page has eight submenu items, two of
which are actually toggles, and the rest are state bits which interact
in a non-entirely-obvious manner. In the HTML these are all just links
and aren't distinguishable without prior knowledge of the UI structure,
which I'd like to avoid; plus there is no way to find the labels of the
other states ("20 Entries" vs "200 Entries", for example).

I would really like any future development of the skinning system to
have decoupling between the emitted HTML and the actual UI. For example,
if we could add a TH1 file to the skin, which contained functions that
emitted the HTML, then this would put the generated markup under control
of the skin, so the skin could emit whatever it liked. I'm already doing
this to generate the top-level menu.

So the submenu could be generated with:

begin_submenu
  begin_toggle "Number of items to show" "Now showing 20 entries"
    toggle_state "20 Entries" "/timeline?n=20"
    toggle_state "200 Entries" "/timeline?n=200"
  end_toggle
  [...etc...]
end_submenu

The default implementation would just emit the existing HTML; but a skin
could override it to, say, display a drop-down menu. It wouldn't be
worth doing for the complex UI elements like the timeline view or the
file display, but for top-level menus and settings forms etc it would be
invaluable.

(Apart from anything else, that way I could avoid the horrifying
Javascript which rewrites the HTML into Polymer-specific widgets...)

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "There does not now, nor will there ever, exist a programming
│ language in which it is the least bit hard to write bad programs." ---
│ Flon's Axiom

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to