Hi, all,

This evening/early morning i threw together a proof-of-concept dedicated
wiki editor for fossil which uses modular widgets and publish/subscribe
("pubsub") messaging to send messages between app/widget components.
Because the word "widget" is overused, i'm calling them "fijets", as in
"fossil json widgets."

Here's a screenshot:

http://fossil.wanderinghorse.net/tmp/fossil-wiki-editor-v0.0.1.png

Some things the screenshot shows:

- Several fijets: login, wiki-list, wiki-editor, and wiki-timeline
- Selecting a page in the wiki-list fijet will send an event which the
editor listens for, causing it to load the content for that page. It caches
the content of each visited page so that it can support switching between
pages while editing.
- The timeline view (at the bottom) automatically reloads when a
page-saved/page-create event is triggered (as a side-effect of saving).

The features include:

- Login.
- Editing of multiple pages at a time. When switching pages any edits are
saved locally (in the current page's JS engine, not in the filesystem).
- Creating and saving of pages. All of the pages in that particular repo
were creates with the JSON API.
- Revert all pages or just a given page to the repo state.
- It's a single-page-app.
- fijets are dynamically loaded by simply adding a placeholder in the HTML
page, e.g. <span class='fijet-wiki-list'></span> gets replaced by the
dynamically-loaded wiki-list fijet.
- each fijet can be styled independently (its CSS is dynamically loaded
along with the JS).


Of course there are tons more things which "could" (and maybe someday will)
be added, such as:

- diffs of local edits vs repo (using jsdifflib)
- preview mode requires an addition to the /json/wiki back-end.
- One could choose to save wiki pages in a custom format and do all
rendering client-side. The wiki could also be abused to store non-wiki data
(e.g. JS scripts and style sheets).
- Distinctively mark links to wiki pages which have unsaved local edits.
- Ability to browse history/older versions of a page.
- With the addition of a user administration UI it could be a standalone
application. Currently users have to be administered via the HTML interface
or manually via the JSON API.

But this is version 0.0.1-pre-alphalpha (born late last night).

At this point it's all an experiment with the widget model and pubsub
message handling. It seems to work okay but i don't know how scalable it
will be.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to