Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat Widget: Align user messages to right #7488

Open
tomscoorch opened this issue Nov 13, 2024 · 2 comments
Open

Chat Widget: Align user messages to right #7488

tomscoorch opened this issue Nov 13, 2024 · 2 comments

Comments

@tomscoorch
Copy link

tomscoorch commented Nov 13, 2024

I wanted to kindly suggest a small enhancement to the chat widget that I believe could improve user experience.

Currently, all messages in the chat are aligned to the left by default. In most chat interfaces (such as ChatGPT, WhatsApp, etc.), user messages are typically aligned to the right. This makes it much easier to distinguish between the user's messages and the bot's responses, and overall helps to reduce confusion.

Would it be possible to implement an option where user messages and the associated avatar/logo are aligned to the right, either as a default or on a per-user basis? I believe this small adjustment would make the chat interface much clearer and more user-friendly.

Thank you very much for considering this request. I appreciate your time and look forward to hearing your thoughts on this.

Example from ChatGPT:

Image

@ahuang11
Copy link
Contributor

ahuang11 commented Nov 13, 2024

Sure, I'd be okay with adding an user_messages_align param. Would you be interested in implementing it?

Potentially, it's super() inheriting from Feed https://github.com/holoviz/panel/blob/main/panel/chat/feed.py#L398 and if user == self.user statement and align="end":
https://github.com/holoviz/panel/blob/main/panel/chat/interface.py

@tomscoorch
Copy link
Author

tomscoorch commented Nov 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants