Hacker News new | past | comments | ask | show | jobs | submit login
Hacky version control for html (neverfriday.com)
16 points by _csoo on Aug 21, 2009 | hide | past | favorite | 10 comments



I want to thank God, my mom, looks at camera hi mom! and the HTML spec writers who included the INS and DEL tags and of course, jQuery. I love you jQuery!

(any feedback is welcome)


There doesn't seem to be much correlation between buttons and what happens on the page.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2

For example, if I click on one revision (Gerry Giraffe) and then on the next (Kramer Koala) stuff happens, but if I click back on Gerry, nothing happens. Perhaps further instructions are required.


Yeah, right now I have it displaying the changes. The trouble is I don't have an ordering for the versions. Gerry Giraffe doesn't depend on Kramer Koala. I'll fix that up though so that it toggles the changes. Might turn them into checkboxes to make it clearer?


The <ins> and <del> tags have always seemed weird to me in that they talk about the document's history, rather than the document itself, or what the document is talking about. The problem I've always seen with using them for version control is, what happens when the document you're trying to version control has <ins> and <del> tags?

I suppose you'd have the same problem if you put a diff under version control, but it seems like this kind of thing implies that there should be something different about those tags (I'd say another namespace, but those have been abused enough already).

I don't know how/if I'd solve this, I'm just wondering if anyone else feels the same.


They are not supposed to be used for versioning HTML documents. For example they cannot indicate if you change the HTML head or if you change markup. What they can indicate, is changes in content.

I don't think you should necessarily store versioning history of content with INS and DEL tags. If you have a CMS you might have each historic version of content. If the user requests a diff, you can generate it automatically by comparing versions, but you can represent that diff for the user by using INS and DEL elements.


It's beautiful that this is the one spot where the W3C got the content/presentation separation correctly.

* but you can represent that diff for the user by using INS and DEL elements.*

This would be false. No thank you. The whole point of including the datetime attribute is to allow for storing the versions in the document itself. HTML should never be hand-coded and should only be interacted with via a good editor. However, there aren't too many of those around.

The default web browser behaviour for dealing with the INS and DEL elements is incorrect and the cause of it is a lack of understanding of what those elements are for and why they were included in the spec.


How the heck does this thing work? Looks like it has some nice bells and whistles- wish I knew how to ring/blow them.


It stores versions of the document within the document itself via the INS and DEL elements.

Each date up at the top as various changes associated with it. On each day, changes were made to the document. By clicking show/hide you can toggle the changes from that day. By clicking Apply Changes, you can apply all changes up until that day (so if you're applying changes up till day 3, it will apply the changes from day 1 and 2 as well). Play Through Changes does the same thing, however it pauses for a second or two between the changes so you can visually see the changes (fade in/out of the elements).

Applying all changes will run through everything and give you the "final" version of the document.

I'll include a better explanation on the website itself, I was just tired as heck at 4am ;)


Needs JS to work (there's no warning about that) and... this is awesome.


Ah sorry, I'll include that as well.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: