Skip to content

Commit

Permalink
Tweak Chat components alignment (#6104)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored and philippjfr committed Jan 17, 2024
1 parent ef083b5 commit 00fd653
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions panel/chat/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
1 change: 1 addition & 0 deletions panel/chat/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion panel/dist/css/chat_message.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
max-width: calc(100% - 80px);
}

.header {
width: fit-content;
}

.name {
font-size: 1em;
margin-bottom: 0px;
Expand Down Expand Up @@ -88,7 +92,7 @@
.timestamp {
color: #a9a9a9;
display: flex;
margin-top: 0px;
margin-top: 3px;
}

.markdown {
Expand Down

0 comments on commit 00fd653

Please sign in to comment.