Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-16 11:00:42

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Article jump-back abilities for ease and piece of mind

I’m sure I saw someone else comment on the possibility of article diff abilitities, but couldn’t find it.

I just had the very devastating experience of losing an article I’ve been drafting for over a week…many hours of work gone (man, that’s a severe blow to the soul). I’m not even sure why it happened, but it could have been related to a combination of using Firefox tabs, the FF Session Saver extension, and leaving my article draft view open between computer startups (working locally with XAMPP)…the bulk of the article content disappeared from where code was first written in a < pre > tag, and apparently was saved that way without my active input. (Not saying that’s the fault, but that was the circumstances.)

Anyway, I was thinking if Textpattern had the ability to save even just one or two article changes back, that would be HUGE for one’s piece of mind, and a very easy way to recapture a previous version without complicated database backups etc.

I realize I should have a better writing workflow in place (e.g., writing in some other app first and then moving to TxP), and I probably will now, but still, a short “diff” history would be a really cool and useful thing to have. I sure wish it existed now, I’d have all those hours of my life back.

I don’t even really mean to suggest the ability to view (side-by-side) differences, but rather just a short, simple link list in the Write panel like so…

  • Current draft
  • 1 back
  • 2 back

Where when a “back” version link was clicked, it’s contents are switched into the active write view and will be saved to “current” if the save button is clicked.

Just a thought.

EDIT: OK, had I used “versioning” in my search, I would be more enlightened. Looks like this is well along the lines of what I’m after, though I think what I’m suggesting would be much simpler in the beginning.

Last edited by Destry (2006-01-18 13:17:00)

Offline

#2 2006-01-16 14:53:43

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Article jump-back abilities for ease and piece of mind

From a dev point of view, there’s 0,1,n. No history (or versioning, or backup), one step, or any number of steps. And the amount of code to move from 1 step to n shouldn’t to too huge (the main drawbacks are speed and memory doing joint queries, but since it’s backend stuff, even in a low-end shared server it should be fine).

As I understood it (it’s not the first time this is requested/discussed, the requests for this are easily in the double digit), the main issue is scenarios & UI. Handling writing rights, how to handle reverse, things like that; and how to display it without bloating the whole thing.

I may be wrong, but I’m pretty sure this is a perfect example of the kind of things Zem talked about several times. The gang of four may want to code it, may know how to code it (with all those good GPL wikis these days, the code&algo are easy to find), but haven’t the will/time/courage/knowledge to implement it for the users. And we (read, users) may describe it in lenght, to help them do that.

Edit: by the way, I think this may be done with a plugin. The only thing I don’t know is if a plugin could hook at the “save.article” stage. If it can, then it’s “simply” adding a new table that would be a almost carbon copy of the txp_textpattern one, without unique id, and to use these id and appropriate timestamp to store&retrieve the datas (interrupt the save before the sql UPDATE, make an INSERT of the old sql datas into the history table, then give back the hand to TXP). The code to display the thing, handle the UI, and have an online diff tool is not trivial in size on the other hand.

Last edited by Jeremie (2006-01-16 15:00:12)

Offline

#3 2006-01-16 23:06:02

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Article jump-back abilities for ease and piece of mind

but haven’t the will/time/courage/knowledge to implement it for the users.

More importantly, there’s the issue of support. Most of the dev team’s time isn’t spent writing code, it’s spent diagnosing problems, testing bug reports, and helping users who haven’t read or understood the documentation and FAQ. Adding new features – particularly ones that haven’t been carefully planned and designed – only increases that load, so we get bitten twice.

We might be experts with Textpattern’s PHP code, but that doesn’t mean we’re experts at building web sites with Textpattern. There are any number of forum users who have more experience at that than any of us on the dev team. That’s why we keep asking for help with UI and documentation issues: you guys are better placed than us to know how this stuff needs to work in the real world, to anticipate problems, to know what questions need to be answered by documentation, and so on.

Contributing those things helps free up the dev team to work on the stuff that no one else can do.


Alex

Offline

#4 2006-01-16 23:25:35

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Article jump-back abilities for ease and piece of mind

> Destry wrote:

I’m not even sure why it happened, but it could have been related to a combination of using Firefox tabs, the FF Session Saver extension, and leaving my article draft view open between computer startups (…)

Dont say I didnt warn you !


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2006-01-18 13:10:45

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Article jump-back abilities for ease and piece of mind

Jeremie wrote: The code to display the thing, handle the UI, and have an online diff tool is not trivial in size on the other hand.

Like I implied, I think a diff-ing tool in the interface would be unnecessary (big time), just a simple three-item list in the write panel that rotates the two most recent article versions with the current. That would do the trick nicely.

zem wrote: Adding new features – particularly ones that haven’t been carefully planned and designed – only increases that load … We might be experts with Textpattern’s PHP code, but that doesn’t mean we’re experts at building web sites with Textpattern.

Certainly. I here you. I would never think to be adding anything in Feature Requests without it considered for careful planning and testing. For that matter, I would never suggest anything at all if I didn’t think it was worthwhile for everyone (and in sync with the lightweight nature of TxP), not just myself. As for code. I’m not a PHP programmer, so I rely on your good services — and approach — for feature requests. I’m more of the site builder type, but even though I do try and be self-sufficient, I do get lost in all the distributed resources sometimes (distributed resources are hard to keep up with), if I’ve missed a new feature that relates to all this, please, anyone, point it out clearly.

@maniqui:
Yeah, from your other thread, I agree completely; I still love session saver (super productivity tool), but I’m more careful now with using it with TxP. I think the problems arise when you have an admin panel open that involves an active text box (e.g., the write panel). It’s best to change panels to one that does not (e.g., the articles subtab panel) before logging out. That seems to work fine.

EDIT: OK, took the nod and started a planning page in TextBook’s Feature Requests, here.

Last edited by Destry (2006-01-18 13:47:22)

Offline

Board footer

Powered by FluxBB