The current chat implementation was the first CORK-based component written for LiNC and has a number of issues:
- Occasional duplicate entries, probably caused by a hacked mechanism that we implemented to make local messages not be displayed until they had been reflected off the server. [Has been fixed]
- No controls for clearing the message list [Fixed]
- No controls for changing the default message list size
- Constructing a Swing Document object for a large message list can be extremely slow.
- No indication when remote parties are typing
- Auto-scroll prevents review of an active chat (each new message makes the transcript scroll to the bottom) [Fixed 031204]
- No way to signal remote users whose windows may have become buried, e.g., by beeping or forcing the window to front.
Possible enhancements include:
- Switching to standard SharedList instead of custom ChatMessageList
- Problem: Selection of chat text becomes trickier
- Use of custom swing View object for rendering
- This was added to support coloring changes for MOOs
- Support for MB-style chatroom
- Could take ObjectSessionData-based ListModel for participants (would handle people leaving and entering)
- Message list could have (single?) lastUtterance field
- Change could have (user, replace/append, text) data
- Needs to be more than just a string
- Needs to consider timing. Could be updated in keyTyped, but no more often than every n seconds.
- Should be possible to disable this if there are alot of users.
- May be a good idea to disable by default, but enable it in workspaces and userlist-launched chats
- Or could just throttle based on number of distinct users seen during the session
- A more adaptive approach would be to limit the minimum interval at which we send utterance updated, but change this limit based on the number of users who appear to be present.
- Bubble config with font, color, maxSize, text, decay
- Could limit bubble to one line and scroll
- Preferred size based on number of people
- Typing indication (assuming we don't have MB-style bubbles)
- Simple fading "Johnny is typing..." label above or below input field
- iChat-ish indication that preserves place in transcript
- Use lastUtterance field (as described above)
- Initial implementation of this added 031204. Does not adaptively throttle messages, and also uses no extra threading. This means that typing indication will not clear automatically (it is cleared when a message comes in), and also means that updates are only sent in response to key presses.
|