Re: Rethinking our layout



On Wed, 2005-07-20 at 18:58 -0400, Jonathan Blandford wrote:

> The other change we're going to make is to have section editing embed a
> live comment into the page.  This will allow us to collaboratively edit
> a section at a time.  Colin is going to look into adding this.

I thought about this a bit today, and it is a bit tricky.  So what I
want to happen when someone clicks "Edit" on a section is for a live
comment to appear in the place of that section (for all users) with the
current content, and everyone can edit it.

Some issues here though; the first is, how do I get the live comment to
appear in the right place for all users?  Maybe one way to approach this
would be to actually programatically edit the wiki content, replacing
the entire section with a tag like:

<yarrr-live-section name="section name here"></yarrr-live-section>

This would expand in HTML to:

<script>
yarrrLiveSections.add("livesection-1234");
</script>
<div id="livesection-1234"></div>

Temporarily removing all the wiki section content seems pretty evil;
e.g. you can get a conflict, it would pollute the change history, etc.

The other option perhaps is to have mediawiki generate unique section
ids for all the sections; we then have the ☠ server keep track of what
sections are "live".  When we output the HTML, we also have a bit of
JavaScript set the display:none property on all the HTML content for
sections which are currently live, and instead show the LiveComment
containing the content.  This is probably a bit cleaner.

So then assuming we follow the second model, what happens when you close
a live section is that it takes the user to the edit page, and inserts
the content of the live section?  That way we can defer to MediaWiki's
conflict handling etc.

Does this sound sane?





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]