?

Log in

No account? Create an account
I've often noted (to Brad) that it's much more fun working on a Linux… - LogJam [entries|archive|friends|userinfo]
LogJam

[ website | LogJam ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Aug. 30th, 2000|01:33 pm]
LogJam
logjam
[evan]
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.]
LinkReply

Comments:
From: rasik
2000-08-30 03:08 pm (UTC)

hm

I think it would be a pretty cool toy to play with if it were included in the client. I would tend to think that anyone using loserjabber would try it out at least once .. however, I'm not sure if it'd be something I'd use consistently. I have a feeling people would either love the feature and use it at least somewhat regularly, or ignore it. To me, it's kind of a toss-up whether the dialog method or the scripting method would be more liked by end users. Both have their advantages. And I wouldn't worry about the ugliness of the UI for the dialog... I can see how it might detract from the compact and smooth look of loserjabber so far, though. Perhaps it would be possible to just disable preview mode with a checkbox in the magic dialog?
(Reply) (Thread)
[User Picture]From: revjim
2000-08-30 03:43 pm (UTC)
I see three possibilties here.

1)Cater to the hackers and develop a small scripting language or embed perl

2)Cater to the lusers and don't even show them the HTML as a preview. When a user elects to do magic, there are three choices, and three dialogs (one for each): Link to a Journal, Link to a website, Link to a file on my website. Each of these dialogs provides two text fields. One for the link text, and one for the additional link information (journal user name, website url, file on my website). Once they press okay, the HTML is inserted and it looks like HTML. I don't know how difficult this would be, but you could snazz it up a bit and let the HIGHLIGHTED (selected) text in the textentry box be the inital link text in the dialog box. You could add ONE layer of snazziness (which should be able to be turned off, cause it would be annoying for some users) which would look for tags when pulled up in the history window (and therefore also in the regular textentry window) and make them look like hyperlinks in the text entry box. Right clicking on them would allow you to edit the hyperlink (could either default to the link to a website dialog box, or could use some sort of regexp to figure out if the link to a journal or link to a file on my server would apply better). Of course if you are gonna do all this, you may as well use GtkHTML instead of Gtkspell for your textentry widget and just display all the text formatting. (maybe you could embed Mozilla in LoserJabber.... ***just a joke, just a joke***)

3) Do both.


Just my $0.02.

(Reply) (Thread)
[User Picture]From: bradfitz
2000-08-30 05:09 pm (UTC)

yo

i haven't finished reading your entry or everybody's comments because I have to go pack, but don't work on the relative to absolute URL mapping ... livejournal already does that, given the "baseurl" in your user settings. problem is, i've never exposed that to the protocol or the website. actually, i'm not sure if it's even a good idea for the server to do (it already does it... but at render time, not at submission time, which I think I should change.)

Better idea --- adding a key in the protocol like:

urlbase = "http://www.bradfitz.com/";

and when LJ gets the postevent/editevent, does the remapping there (I already have the code to do it...). then other clients could take advantage of this too.
(Reply) (Thread)
[User Picture]From: patrick
2000-08-30 05:31 pm (UTC)

mailing list!

sure it should be on the mailing list. because mailing lists are a fun waste of time. yea, but anyways i send some comments on that, but i think only me, evan and brad are on that as of now. i could be wrong, though. :)

my comments in short were that i like a scripting language style. dialog boxes are annoying to work with.
(Reply) (Thread)
[User Picture]From: diamondc
2000-08-30 08:26 pm (UTC)
wow, i just think a pulldown menu would work the best. you could just highlight a name and pull
down a menu and could choose a "link to user's livejournal" or a regular link that then asks for a name for the link and then the url itself.

i noticed that loserjabber doesn't save keyboard accelerators after you close it, maybe you can just set default ones in the source?
(Reply) (Thread)