Previous Entry Share Next Entry
Release 1.2.5
querki
jducoeur wrote in querki_project
Today's release (and 1.2.4.1, a patch release a couple of days ago) is mainly focused on bug-fixes and tweaks.


The one new feature is the addition of the _substring(START, END) function. This is actually rather un-Querki in its style: using the name "string" instead of "text", using 0-based indexing, and so on. But I found that I need it, and rather than fart around for too long trying to think of The One True Way to implement this in Querki style, I decided to call a spade a spade and implement *exactly* the substring() function that programmers are used to from Java and JavaScript. Indeed, under the hood this *is* Java's substring() function, but is more forgiving of index-out-of-bounds problems. (If the END index is out of bounds it'll just show the string through the actual end; if the START is out of bounds it'll always return empty string.)

We'll likely do something more Querkish down the road, but I'm still pondering what that should ideally look like. I suspect it'll involve treating the Text as a List of Characters, at which point _drop() and _take() will work properly, but that's still up in the air. Opinions welcomed.


Bug Fixes

The reason I needed to push out 1.2.4.1 in a rush was due to a regression that was causing multiplicative explosion of applying Functions -- if you had three Things A, B and C, with property Foo containing values "a", "b" and "c", and you had a Function that called My Model._instances -> Foo, it would return ("a", "b", "c", "a", "b", "c", "a", "b", "c"). This seems innocuous until you start nesting Functions; as it turns out, Kate's Cross-Stitch Gallery has enough Function complexity that it was actually enough to bring Querki to its knees for a while, computing something like n**6 results.

(BTW, if you haven't looked at the Cross-Stitch Gallery, I commend it. It shows off lots of Kate's pretty artwork, and is a good example of what you can do with a medium-complexity Querki Space. It's an example of what I can build in Querki in about an hour.)


Also discovered while working on the Cross-Stitch Gallery: I made _filter() more forgiving of empty values. It's normal to pass a Function into _filter(); it applies that Function to each received Thing, to see if the Thing passes. The change I made was actually lower-level in the code, but the result is that, if the Function returns an empty value, it's considered to be false -- this Thing doesn't pass the filter. That seems intuitively correct, whereas previously it was causing the whole expression to fail with an error.


Email addresses are no longer treated as case-sensitive in login: Courtney discovered this one the hard way -- if you used mixed-case for your Querki email address (say, "Justin@Querki.net"), then you could *only* log in using the same capitalization. This is strictly wrong -- email addresses are supposed to be case-insensitive -- so it's now treated that way for login.


The UI for List editing has been improved: this has been rankling me for months -- when we upgraded to Bootstrap 3, the List-editing UI wound up a bit bollixed: bulkier than it should be, with more vertical space than it should have. In particular, the drag handle for rearranging the List was on a line by itself, which made no sense. This is all at least closer to correct now, and doesn't take as much screen real estate. The code is also greatly improved -- I'm slowly moving all of the rendering code out of the server and into the client where it belongs.

While I was in there, I removed the delete-element button from the tab order, which means you can no longer tab to it. That's intentional -- I had found, the hard way, that it was much too easy to accidentally delete list elements while tabbing around. So for now, you have to actually click on the delete button to delete an element. This probably isn't the final word on this, but it's an improvement.
Tags:

?

Log in

No account? Create an account