Previous Entry Share Next Entry
Release 0.4.1.3
querki
jducoeur wrote in querki_project
Another day, another release. One small change, one important fix.


Make Simple Pages suck less: when I started up the Querki project, I started with two base Models -- Simple Page and Simple Thing. The idea was that Simple Page would *always* have a Default View, and Simple Thing wouldn't. So the default Simple Page contained a Default View that contains brief instructions.

That made some sense for folks just starting out, but gets *incredibly* irritating once you've been using the system for a while. I've found that my workflow is often to build my Model and add a bunch of Properties first, and maybe even create some instances, and only later get around to defining the Default View. But until then, the Simple Page's default Default View is in the way, preventing me from seeing my Properties. (And as talvin pointed out, its text wasn't even correct any more.)

So I've simply scrapped that default. While Simple Page still has a Default View property, it now starts out empty. This means that what you actually see is the uber-default: a list of your Properties and their values.

In the medium term, I hope to make that uber-default user-editable instead of hard-coded, so it can become a real starting point. (The QL language isn't quite up to it yet, but it'll get there.) And we'll need to address the Default View in the tutorial. But for now, this tweak improves common workflow. (I think -- tell me if you disagree.)

I'm also looking for opinions about the Simple Thing / Simple Page split. I'm gradually coming to the opinion that it's pointless: that the distinction is so persnickety as to not matter, and nobody really cares much, so it's taking up conceptual space to no benefit. So I'm pondering deprecating Simple Page, and moving Default View onto the root Thing class (from which *everything* descends). Opinions would be welcomed.


Fixed the handling of illegal Names (and other values) in the Editor: this was a big, nasty bug that both Alexx and talvin noticed. The Name field only allows a very restricted character set, by design: letters, digits, spaces and dashes. If you were in the Editor, and you put any illegal characters into the Name field, it *should* give you an error, and originally did so. But there was a regression (probably a fairly long time ago), so that it instead was throwing away both the error and any previous value of the Name, setting the Name to None, and as a result displaying the Thing using its Object ID instead. (The random-looking string of letters and characters.)

In fact, the bug was even worse than that. If you put an illegal value into any Property *other* than Name, it would throw away the Property entirely from this Thing, and still save it!

The fix was actually pretty complex, mainly because I decided to do it right. Originally, it simply showed you an error message that said "Illegal value", with nothing more useful. But I've been finally getting the error pathways cleaned up, with error messages that can be passed all the way up the system from bottom to top, properly internationalizable and all that good stuff. So I rewrote things so that the validate() method can now throw an informative exception, which gets displayed to you. Also, I added some code to "repair" the broken Property, setting it back to its previous value if possible and redisplaying the Editor.

So I believe this now works decently. I've only fixed a couple of the validators to be compatible with it -- if you get "Unexpected Error" messages when you put an illegal value into the Editor, it probably means I need to update that Type to the new system, so log an Issue about it.


My thanks to all the folks who are kicking the tires and telling me about the problems they find. Hopefully we can quickly stabilize all of the important ones, and move on to more interesting stuff...
Tags:

  • 1
"I'm also looking for opinions about the Simple Thing / Simple Page split. I'm gradually coming to the opinion that it's pointless: that the distinction is so persnickety as to not matter, and nobody really cares much, so it's taking up conceptual space to no benefit. So I'm pondering deprecating Simple Page, and moving Default View onto the root Thing class (from which *everything* descends). Opinions would be welcomed."

Well, I hadn't yet even *noticed* Simple Page, so there's one data point that it may be pointless.

(Deleted comment)
  • 1
?

Log in

No account? Create an account