show how to create a minimal example that uses ChatFeed (or ChatInstance),
or a new class as a GUI only. I.e., all user system interactions are carried out
in separate code, with the GUI used to display the messages only.
show how to remove all the extra ChatMessage features,
and tighten up the spacing.
The avatars are still too large, and so is the spacing
between the avatar and the message
I am currently struggling with adding some buttons and a larger text input area.
I am running into sizing an alignment issues.
Given how much effort it turned out to be trying to put this together,
I think it should definitely be documented.
Any suggestions on how to put this together?
Incidentally, the default_avatars in message_params does not seem useful in this context. Maybe ChatFeed should have an append_message() fn
that one can stream data to? I have not been able to make that work,
Instead writing
I colored .center yellow and .right gray.
I found chat_message.css and am trying to figure out display:flex
which I had not encountered before.
Looks like the extent of center is width: calc(100% - 15px); /* Without this, words start on a new line */
which causes the extra 5 or so gray pixels to the right.
changing this to width: calc(100% - 5px); /* Without this, words start on a new line */
gets rid of most of the extra space in right and appears not to cause any ill effects. What does the comment Without this, words start on a new line mean exactly?
@ahuang11 I think I figured out enough about ChatMessage and ChatFeed to start tackling ChatInterface.
How do I set the css style for the ChatMessages that the Send button inserts in the ChatFeed area?
Is there functionality in ChatInterface to create and append a ChatMessage to the ChatFeed area, or do I have to create it separately with the desired style and then append it?
As shown in the attached image, when setting STYLE in the chatinterface,
the avatar is at the bottom of .left,
whereas using the same STYLE with ChatInterface.send displays it at the top of .left
Also, I cannot figure out for the life of me how to reduce the size of the avatar.
None of the settings I tried seem to affect it?!
Re pn.chat.ChatAreaInput submitting on <Enter> is the behavior that I do not want:
with the app I have in mind, The user will enter several sentences.
Could submit be bound to <Shift Enter> or <Ctrl Enter>?