On Tue, 11 Feb 2014, Jeremy Ruston wrote:
First, a top level thing: the tiddlywebadaptor is currently used unchanged
for talking to TiddlyWeb/Space and TW5's own noddy HTTP server. I'd like to
retain that approach, which suggests that some of the changes need to be
parameterised, as you've noted.
Makes sense.
This implies that we should create a new "edition" for the this Tank work,
which is to say a folder like "editions/tw5tiddlyweb". The edition would
contain configuration tiddlers that set things up for Tank, with
corresponding configuration tiddlers in "editions/clientserver" for TW5
talking to the TW5 server component.
This too.
I'm not sure whether we should continue to support the current tw5tiddlyweb
edition. It's not really usefully functional, and I think we'd probably
both rather put effort into Tank, perhaps?
I'm agnostic on that. It seems (superficially) that it ought to be
possible to support at least four editions off the same code with
config or dependency injection or whatever. The editions I'm thinking
are:
* the node clientserver set
* tw5 on tiddlyspace
* tw5 on tank
* tw5 on plain tiddlyweb
The latter three are fairly similar with one main distinction: Where
does the name of the recipe come from. On tiddlyspace it comes from
either the hostname or from /status (in space.recipe, which on the
server is just calculated from hostname). On tank it's
/comps/<recipe>. On plain tiddlyweb it's from
/recipes/<recipe>/tiddlers.[1]
Host might appear to be a distinction but if the code itself is loaded
from the same place as the tiddlers (as it usually does) then host can
be '/'.
Thanks, I'd missed it but had the same problem with tw5tiddlyweb. I've
fixed it here:
https://github.com/Jermolene/TiddlyWiki5/commit/1086c51019539560768d8e97ac527ae19260cbe5
Cool, I've integrated that change (which is what led to the comp being
posted).
* It would be awesome if TW didn't have to worry about login/logout, just
redirecting to the appropriate SPAs to handle it. The tricky case is maybe
when a user has made changes that they can't save without logging in.
Logout is not too much of an issue, but login can be a bit more messy.
Login to tiddlyspace is just passing username and password to a form,
but login to tank requires the oauth2 dance, which means potentially
following a series of redirects, taking you out of the current view.
It is possible to get the name of the current challengers off /status
but that's no help with complex auth paths.
* How might we handle extracting the recipe from the URL if a custom domain
is being used?
I don't think I quite understand the details of your question? Are you
asking what happens if there's an internal rewrite (rather than
redirect) from somecustomdomain.com/ to defaultdomain.com/some/path?
* The current code excludes the app by appending ?select=title:!app to the
end of the skinny tiddler URL. As it's only a skinny version presumably
there'd be no problem with instead doing the exclusion on the TW config
side?
Yeah that ought to be fine. I did it that way because I had no
visibility into where the fat loading was really happening.
It looks like the current tiddlywebadaptor.js code requires the current
user be logged in. Is there a particular reason for this Jeremy? That
comp above is designed to be public, but unless isLoggedIn is true the
callback after status is not called...
Fixed:
Thanks, will integrate that soon.
Some other observations:
* When creating a New Tiddler, before the title is changed a draft of
New Tiddler is saved. This might be redundant and somewhat
encouraging of having a tiddler named "New Tiddler". Perhaps a draft
shouldn't happen (nor saving) unless the title is changed?
* As far as I can tell there's no visible error reporting (other than
the browser's console) when the syncer experiences errors. Nor any
way to handle those errors, yet. Plans?
* A specific case of error would be an HTTP 412 (which would indicate
an edit conflict). At this point that doesn't happen because no
If-Match header is sent on PUT. If it were used, what are your
thoughts on how handling would be done?
* It would be cool if the Recent tab, when hidden, lit up or otherwise
signalled when it had new data. The fact that the syncer actually
does sync when other people make changes is probably one of the coolest
features, but it is a bit hidden.
More as I play and get other feedback.
Thanks!
[1] I'm using the /comps path in Tank to distinguish both from the API
URI and from the fact that a recipe represents a collection of
tiddlers, whereas a comp loads one tiddler (app) from a recipe.
One of the learnings from tiddlyspace was that as much as it initially
appears nice for the API and human interface to overlap, it ends up
getting messy on various dimensions.
--
Chris Dent http://burningchrome.com/
[...]
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.