RE: dogfood feedback -- Smart Quotes


Subject: RE: dogfood feedback -- Smart Quotes
From: Paul Rohr (paul@abisource.com)
Date: Thu Feb 22 2001 - 17:39:08 CST


At 02:44 PM 2/22/01 -0800, WJCarpenter wrote:
>paul> The cheap & obvious hack would be to replace the entire quoted
>paul> passage, instead of just the quote character(s), but I haven't
>
>Well, something like that might be made to work, but it certainly
>doesn't have a very good feel to it.

Agreed, on both counts. Let's see if we can do better.

>The smartquote stuff gets along just fine with a 1-character memory
>(plus the ability to look at 1 character of the context of that
>character), and even that was a bit of a chore to get right. To make
>such multiple character UNDO records, it sounds like a lot of
>additonal complexity and maintenance woe to me.

To be clear -- how many distinct undo cases do you have to deal with here,
and which ones have the IP motion problem? Off the cuff, I can only think
of two cases:

1. Type a closing double-quote at the end of a phrase.
-------------------------------------------------------
(Ditto for paired single-quotes.) Change the matching open quote first,
then the closing one, globbed together as a user-atomic change. Even with
the existing undo mechanism, the IP should already wind up in the right
place.

2. Type a single-quote inside a contraction.
---------------------------------------------
Wait until you leave the word, then backtrack to replace it. This is the
screw case, no? The IP gets left after the forced change, rather than at
the end of the word you were typing. Possible solutions:

2.a. Don't allow undo. (The current approach.) Ick.

2.b. Make the user move the cursor by hand. Even if you could fix the
smart quote algorithm to not fire again when the cursor leaves the word,
this would still feel broken.

2.c. Stick a "move the IP here" action into the undo stack. Ick, ick, ick,
brittle, ugly, ick, ick. Plus which, it's a lot of work to implement.

2.d. The proposed hack -- replace from the quote to the IP, which for most
contractions should be only a few characters.

Actually, the more I think about it, the more I like it. Small, localized
code to handle a single exceptional case sounds like the effort is
well-matched to the task.

What am I missing?

>Another approach could be to make it easier to type in a
>non-smart-quote character. [...]

Nah. That just feels like GUI clutter. The whole idea of a smart quotes
feature is that it:

  - Just Works, almost all the time, without any intervention needed,
  - can be easily undone when it's wrong, and
  - can be turned off entirely for folks who hate it.

If you need to add GUI controls to toggle it on and off frequently, then the
algorithm needs more work.

>((To be frank, it wasn't obvious to me that UNDO should do the thing
>that it tries to do now. Along the way, someone pointed out that
>that's the canonical way to get incidental non-smart-quotes in MSWord.
>It seems plain enough, but it had never occured to me to try it
>before. So, maybe making the UNDO "just work" isn't meeting a common
>user expectation anyhow. Beats me.))

A well-done undo mechanism is very, very simple to explain. The paradigm
we've been using is that *any and all* changes made to your document can be
undone. Period. This should apply to:

  - hand edits (via selecting and typing)
  - clipboard operations (cut & paste)
  - formatting operations (character, paragraph, section, or document)
  - smart quotes
  - other AutoText-like features (should we ever implement the beast)
  - etc.

In all of those cases, you invoke the same action to get rid of a change (or
series of changes) that you don't like. Undo. Change your mind? Fine.
Redo until you get back where you wanted to be.

If we're very very consistent about this, then users can discover how to use
the product when they wind up in unknown territory. I actually learned
about this specific behavior from my spouse, who was getting annoyed with a
version of Mac Word. Quoting *very* loosely:

  - Aargh! Why did it do that?
  - I'm sure there's a way to turn it off.
  - Nah, I don't have time to find the right dialog.
  - I just want to get rid of that change.
  - (Undo)
  - Hey, that worked! Cool!

That's what we want, too.

Paul



This archive was generated by hypermail 2b25 : Thu Feb 22 2001 - 17:31:36 CST