xous-core/libs/chat/src
bunnie f88afd1a1a fix various edge cases; move status bar redraw to end of routine
putting the status bar redraw at the end means that even if
the fitting of the boxes isn't 100% correct, the status bar still
ends up "on top".
2023-12-01 17:55:39 +08:00
..
dialogue add an optional bounding rectangle field to posts 2023-11-30 23:05:41 +08:00
api.rs add forced redraw function, fix misdirected message 2023-10-29 23:03:46 +08:00
dialogue.rs cleanup debug statement 2023-12-01 17:55:26 +08:00
icontray.rs mtxchat tidy-up 2023-09-08 13:46:52 +10:00
lib.rs refactor layout to take advantage of pre-computed height bubbles 2023-12-01 02:23:47 +08:00
main.rs add busy-wait animation server and hooks for managing the same 2023-10-20 00:43:09 +08:00
README.md Chat readme & comments 2023-09-01 05:41:40 +10:00
ui.rs fix various edge cases; move status bar redraw to end of routine 2023-12-01 17:55:39 +08:00

chat lib

This Chat library provides a generic Chat UI to read a series of Posts in a Dialogue stored in the pddb - and to Author a new Post.

The idea is to provide a solid common Xous Chat interface, so that Chat Apps can concentrate on the unique protocols of each platform (such as Matrix or Signal).

This is a work-in-progress accepting all contributions from ideas and discussion, thru to pull-requests.

UI User Interface

A Dialogue of Posts appears as a cascade of "speech bubbles" with the most recent at the bottom. The user can use the up/down ↑↓ keys to scroll up/down thru the Posts. One Post will be hilited/selected and the right → key will provide options to reply, edit, delete etc. The left ← key will show the Chat App menu to login, logout, change conversation etc.

A new Post may be authored in the input area at the bottom of the screen.

The Chat UI can provide read-only access to Dialogues in the pddb when offline.

Integration

A Chat App will typically call Chat::new() to setup a Chat UI server, and a 2 way connection between the Chat App server and the Chat UI server. The Chat UI can raise a menu on behalf of the Chat App, allowing for protocol specific actions. The Chat App can receive messages representing:

  • a new outbound user Post
  • key UI events, such as F1 click, Left click, Top Post, etc,
  • raw keystrokes.

The Chat App will next typically call Chat::dialogue_set() with a pddb dict and key holding a Dialogue of Posts.

When the Chat App receives a new Post from the Platform, it will call Chat::post_add() to have it saved in the pddb, and displayed.