From 87e8cb06304a66d63a28693aabbbae4583d714f0 Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Wed, 20 Dec 2023 10:40:11 -0800 Subject: [PATCH 1/3] Fix header stretch --- panel/chat/message.py | 1 + panel/dist/css/chat_message.css | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/panel/chat/message.py b/panel/chat/message.py index 9996c5a5b9..229c6f3a22 100644 --- a/panel/chat/message.py +++ b/panel/chat/message.py @@ -277,6 +277,7 @@ def _build_layout(self): self.chat_copy_icon, stylesheets=self._stylesheets, sizing_mode="stretch_width", + css_classes=["header"] ), self._center_row, self._timestamp_html, diff --git a/panel/dist/css/chat_message.css b/panel/dist/css/chat_message.css index 692dcc4cfa..eb330a0f50 100644 --- a/panel/dist/css/chat_message.css +++ b/panel/dist/css/chat_message.css @@ -47,6 +47,10 @@ max-width: calc(100% - 80px); } +.header { + width: fit-content; +} + .name { font-size: 1em; margin-bottom: 0px; From 209ed6b18cf793c745eb75599d611cd597da4e72 Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Wed, 20 Dec 2023 10:46:38 -0800 Subject: [PATCH 2/3] Better alignment with buttons --- panel/chat/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/chat/interface.py b/panel/chat/interface.py index 3ef6e68e77..d23a154f26 100644 --- a/panel/chat/interface.py +++ b/panel/chat/interface.py @@ -292,8 +292,8 @@ def _init_widgets(self): sizing_mode="stretch_width", max_width=show_expr.rx.where(90, 45), max_height=50, - margin=(5, 5, 5, 0), - align="start", + margin=(0, 5, 0, 0), + align="center", visible=visible ) if action != "stop": From 8a447e326fd52de8c75f3d78592fca24ff59632f Mon Sep 17 00:00:00 2001 From: Andrew <15331990+ahuang11@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:57:11 -0800 Subject: [PATCH 3/3] Update chat_message.css --- panel/dist/css/chat_message.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/dist/css/chat_message.css b/panel/dist/css/chat_message.css index eb330a0f50..c85c9753ba 100644 --- a/panel/dist/css/chat_message.css +++ b/panel/dist/css/chat_message.css @@ -92,7 +92,7 @@ .timestamp { color: #a9a9a9; display: flex; - margin-top: 0px; + margin-top: 3px; } .markdown {