||[Aug. 30th, 2000|01:33 pm]
I've often noted (to Brad) that it's much more fun working on a Linux client, because it's ok to assume the users have more of a clue than the Windows users. Some of the design decisions I have made are ideas I would've implemented differently if I were writing the Windows client (a task I don't envy).|
With that in mind, here's the situation: the "magic" box in the CVS version (a variant of which will be in the next released version, too) is my idea for automating a lot of the text entry I do with LoserJabber. It's comparable to the Windows "URL entry" box, but (of course) more complicated and more powerful.
I'm not sure how to proceed, so maybe some of you could help.
My goal is best explained by examples:
- Example one: "I just went out with Joe and Jane." I'd like to be able to link to the LiveJournals of Joe and Jane, without typing in the full URLs. Note that joe's username could be something other than "joe".
- Example two: "You can download the mp3 <a href=".../themusic.mp3">here</a>." I don't want to type in the full URL for my website, because almost all of my links will be relative to there.
- Example three (common use): "Check out this cool website: http://www.jwz.org ." It should be a link, too.
I see two basic ways to implement this.
- One is to make a scripting language of sorts.
Example one would then be something like:
I just went out with %ljfriend(Joe, joe649) and %ljfriend(Jane).
Example two could be:
You can download the mp3 <a href="%website/themusic.mp3">here</a>."
Example three could be:
"Check out this cool website: %makelink(http://www.jwz.org)." makelink would then use the same URL twice (once in the A tag, once in the body).
This seems very cool, except for a few major issues:
- This is intimidating to nonprogrammers. Even *nix users have their limits.
- When should the keywords evaluated? At submit time? If so, what should LoserJabber do when there's an error?
- When you edit your history, all of the keywords will have been expanded, so you'll have to muck around with the raw text.
- Any scripting language tends to grow as people request more and more features. Even though I only need one basic feature (keyword expansion), would I be better off just allowing you to embed Perl?
- Considering these problems (mostly the first), I tried the other way: making it dialog-based. If you look at the "Magic" dialog (in the CVS version), it is currently displaying "lj" entry, which is defined as: <a href=\"http://%1.livejournal.com\">%2</a>. I hope you can see the correlation between this text and the dialog.
Example one (as you're typing):
I just went out with [CTL-M "friend" tab "Joe" tab "joe649" enter] and ...
(Oops, I can see that my picture is backwards... well, you get the idea, I hope.)
You can try this (minus the first few steps; keyboard accelerators are a bitch in GTK) already, and see how the "preview" looks. (You can't switch off of the "friend" mode, even though the controls are there... sorry for the confusion.)
This has its own set of problems, which are also annoying, but not as bad:
- Would nontechies use even this? LoserJabber would come with the common cases ("friend"), but the real joy would be defining your own: For example, you could make a "smiley" magic, which would type the clown-hat-curly-hair-smiley-face for you (South Park reference, sorry): <@:-)
- As you used the magic dialog, "confusing" HTML would appear in your journal entry. (This is assuming total luserdom, here.)
- As you type your text in the dialog, it grows in an ugly way. I could make the "preview" a text entry field, which would allow you to modify it before you close the dialog, but it seems that any solution will be somewhat ugly.
- Mostly, the UI is really ugly, and I can't think of how to make it work in a way I'd be pleased with it.
It is preferable in one, important, sense: preconfigured and designed properly, it could be used by someone who doesn't know HTML, almost as easily as the Windows client.
This is why I've been avoiding the magic dialog. I may just remove it entirely, so I could finally release 2.0, but I'd like some sort of functionality included.
What are your thoughts?
Also, should this discussion be moved to the mailing list?
[Visit http://lists.sourceforge.net/mailman/listinfo/loserjabber-devel; there's nobody on it, yet.]