The parent issue for this task tracks the contribution of a feature that allows the user to create lists of keywords which, when used in chat, are expanded to some other text. This can be as simple as when I type 'brb' as a word in chat it expands to 'be right back', or could be used to have keywords for frequently requested help that expand to whole paragraphs.
For this build, the floater used to configure this feature is the menu pick
Advanced > Show Autocorrect Settings
it should be the 'Autocorrect Settings' button on the Chat tab in Preferences - that will be fixed.
Some questions to be considered; for all of these assume that "bbl" is set to expand to "be back later":
- I have proposed that the name of this feature should be changed from 'Autocorrect' to 'Autoexpand' - ok?
- Should we retain the non-word mode? In the word mode, a keyword is expanded only if it is surrounded by spaces (see next question), but in the non-word mode typing 'foobblbar' expands to 'foobe back laterbar'.
- This only treats 'space' as a word edge: so if I type ",bbl " or " bbl," it does not expand. I believe that all punctuation and whitespace characters (but see next question) should be considered word edges.
- The last word on the line, when followed by a return, is not expanded
- We could leave it that way, in which case you have to put a triggering character at the end of the line if you wanted the last word expanded.
- We could change it, but then we have removed the chance to see and correct the expansion at the end of a line; by the time you see it, it has been sent.
- Currently the keyword/expansion lists are stored locally in XML file(s). This makes your lists non-portable between computers, which is not how other SL features operate. It would make sense to have these lists stored on the server. (Oz: I think this is ok for now)
- Sometimes you may not want autocorrect to operate temporarily (for instance, you might want to type "bbl"). What kind of UI should control this? Have an ugly checkbox in the chat and IM floaters?
I think the best way to do this is a single-level 'undo expansion' triggered by backspace or delete: if I type an expansion-triggering character and an expansion is done, and then immediately type backspace or delete, the expansion should be reverted and the triggering character inserted, so
expansion is triggered and the line changed to
be back later,
if I then type backspace or delete it again becomes