Skip to content

Commit

Permalink
Chatbot Image size and list fixes (#9161)
Browse files Browse the repository at this point in the history
* fixes

* add changeset

* stor

* radius

* max height

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
dawoodkhan82 and gradio-pr-bot authored Aug 21, 2024
1 parent ba6322e commit 173c7b8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .changeset/fifty-toys-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/chatbot": patch
"gradio": patch
---

fix:Chatbot Image size and list fixes
11 changes: 11 additions & 0 deletions js/chatbot/Chatbot.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,14 @@ This document is a showcase of various Markdown capabilities.`,
]
}}
/>

<Story
name="Chatbot with image in markdown"
args={{
value: [
[
`![A cheetah](https://cdn.britannica.com/02/92702-120-6A02E613/Cheetah.jpg)`
]
]
}}
/>
19 changes: 13 additions & 6 deletions js/chatbot/shared/ChatBot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,19 @@
max-height: 200px;
}
.message-wrap
> div
:not(.avatar-container)
div
:not(.image-button)
:global(img) {
border-radius: var(--radius-xl);
margin: var(--size-2);
width: 400px;
max-width: 30vw;
max-height: 30vw;
}
.message-wrap .message :global(a) {
color: var(--color-text-link);
text-decoration: underline;
Expand All @@ -701,12 +714,6 @@
border: 1px solid var(--border-color-accent);
}
/* Lists */
.message-wrap :global(ol),
.message-wrap :global(ul) {
padding-inline-start: 2em;
}
/* KaTeX */
.message-wrap :global(span.katex) {
font-size: var(--text-lg);
Expand Down

0 comments on commit 173c7b8

Please sign in to comment.