Previous Entry Share Next Entry
Release 1.3.1.1
querki
jducoeur wrote in querki_project
This week's release is made up of lots of little stuff, with a focus on "stuff that's been annoying me":

Features

Probably the most important of the enhancements is kind of simple, but makes a *vast* number of QL expressions easier: _instances is now usually pre-sorted. Thanks to laurion -- in conversation with him, I realized that this wasn't as hard as I hard originally thought.

Basically, if you say [[My Model._instances]], the resulting list will now be sorted by Display Name by default; 80% of the time, that's what you wanted anyway, so this renders _sort unnecessary in most cases. This is being computed automatically and cached in the Space, so it's actually faster than [[My Model._instances -> _sort]]. Obviously, you'll still need to call _sort explicitly if you want to sort on something other than Display Name, but Display Name is most often what you want.

One caveat, though: to keep this fast enough to always do, it does *not* cover Computed Names. If your Things are Computed Name-based, and don't have a Display Name or Link Name, you'll still need to explicitly call _sort. This really only applies to power users, though: Computed Name is a *very* advanced feature.


As recently discussed on my personal LJ, I've changed several names of major system Things:
  • The root model of the world, previously named "Thing", is now "Ur Thing". (Which is a bit obscure, but end users are rarely going to encounter it unless they go looking for it, and that's what it has always been named internally.)

  • The "Link Type" is now named "Thing Type". Yes, it's intentionally vague, but it's basically correct. The old name emphasized that this was an indirection, and that's entirely unnecessary cognitive load: you can't *do* anything with that indirection, and I believe the system makes more sense this way. (We'll see if I'm correct: the discussion was inconclusive.)

  • The "YesNo Type" is now named "TrueOrFalse Type". We didn't come up with any obviously-ideal names for this (I am deliberately avoiding the programmer-jargon "Boolean"), so went for calling a spade a spade. Thanks to mindways for the suggestion.

  • The "Link Model" Property is now named "Restrict to Model". I don't know that this is optimal, but it's English and it's correct: the Property means "only allow Instances of this Model here". If anyone has better names, I'm not averse to tweaking this again.
There will undoubtedly be more name changes yet, but these are the ones that have really been bugging me. Hopefully none of these break any user functions. (I suspect not.)


Added a button to Design a Model on the Space Root page. Just a little detail -- this has been on the Actions menu forever -- but I'm trying to move common activities more front-and-center. (In the medium term, once we have interactive tutorials, we'll probably have a step that highlights that button.)


The _createButton() function now allows you to specify additional display classes. This is a power feature, but is likely to become very common across the display functions.

Querki tries to do the "right thing" whenever possible, and that includes display -- when you call _createButton(), it shows a button. But in practice, sometimes you want to mess with the look of your button: make it bigger or smaller, change the color, and so on. That's done with CSS -- in particular, since Bootstrap is built into Querki, you often want to be able to use Bootstrap classes to tweak the look. So you can add those in the new "classes" parameter, using classes like "btn-xs" for a very small one, or "btn-danger" to show it in a dramatic red.


The Plain Text Type is now internal-only. Plain Text is the Type used for certain key fields in Querki -- for example, it is used in Display Name, and for the body of Notifications. It is notable mainly in that it does *not* allow any QL. But it's always been an edge case, intended only for the rare cases where QL is semantically illegal, and I've realized that it's been confusing people. So it's been changed to no longer be available for end-user Properties: use Text and Large Text instead, which are better-supported and more powerful.


Related to that, Comments are now Text rather than Plain Text. What this means in practice is that you can now use QL in comments.

Comments were originally Plain Text for a very specific reason: Querki's original security model was dangerously loose, and you could accidentally "leak" information in comments that users wouldn't otherwise be able to see. But that was fixed many months ago, and the system now has architectural safeguards against this sort of accidental visibility. (Indeed, it's arguably *too* tight now: there is literally no way to say, "this is based on information that users wouldn't otherwise be able to see, but I'm giving it my blessing". That's on the to-do list to fix, but I'd rather err on the side of being too secure.)

Anyway, you can now put QL in comments, and it will generally work as expected. The context for the QL will be the Thing that you're commenting on, so you can refer to its Properties the same way you would do in any other View. But mostly, this now lets you link to other pages, in the usual way: [[Some Other Page]] or [[.3y285g9]].


Finally, we have the beginnings of the formal Multiple Choice Type. I don't consider this finished yet -- there isn't yet a good UI for editing the options -- but we're about 2/3 of the way towards this working as desired.

Bug Fixes

The Simple Page model is now officially dead. In the early days, there was a model named "Simple Page", for pages that are just display with no other content. But in practice there was no difference between Simple Page and Simple Thing, so Simple Page has been deprecated for a long time. It still exists, but is no longer displayed in any of the major displays.


XML Import now copes with single-level Model Types. Querki has had XML export and import for a while -- this is the quick and easy way to back up a Space, or to copy a Space into a private Querki node. I use it all the time, to copy Spaces from the real site to my development machine for testing and debugging. That mostly works, but Model Types are particularly challenging: there are all sorts of recursive dependencies involved in resolving the XML. This now works for *simple* Model Types. Note, however, that it isn't 100% yet -- if you have complex data types, with Model Types that include other Model Types, I believe it will still fail. (This is pretty high-priority, and so will likely get fully fixed before too long.)


_sort is now correctly case-insensitive. I realized that, for example, "Testing Properties" was displaying before "Testing instances", because we were sorting case-sensitively on Display Names. Querki is supposed to be case-insensitive, so that's wrong. We now correctly ignore case here.


The Issues by Submitter page is now fixed. This page had stopped working, and was showing an internal error, so something was obviously wrong. It turns out that _groupBy() couldn't cope with a missing key. That is, this page does [[Issue._instances -> _groupBy(Reported By)]], and it turned out that, if Reported By was empty, _groupBy went *boom*. (It's kind of amazing it took so long to stumble across this.) This now works properly, and groups together anything that is missing the group key.


Quotes, apostrophes and such now work correctly in the menu bar. One of my banes has been over-escaping XML "entities" such as quotes, with the result that, for example, an apostrophe would display in the menu bar as "'". I recently got the abstractions consistent, but I'm still cleaning up some places that are over-doing it. Please give a yell if you come across more such errors.


When choosing a Thing, sort the options by Computed Name when appropriate. This showed up in my Comics Space: the Publisher type has a Computed Name (because Reasons), and the selector to choose the Publisher for a Title was showing in completely random order. This now takes Computed Name into account.
Tags:

?

Log in

No account? Create an account