ui: fix collapsed user bubble with markdown rendering (#25869)
Edge paragraph margins are now zeroed at the source in markdown-content.css, but the user bubble and the system message still carried the -my-4 compensation for them. The uncompensated negative margins shrank the wrapper 2rem below its content, collapsing single-line user bubbles into a scrollable sliver and skewing the system message expand threshold.
This commit is contained in:
+1
-4
@@ -157,10 +157,7 @@
|
|||||||
>
|
>
|
||||||
{#if currentConfig.renderUserContentAsMarkdown}
|
{#if currentConfig.renderUserContentAsMarkdown}
|
||||||
<div bind:this={messageElement} class={isExpanded ? 'cursor-text' : ''}>
|
<div bind:this={messageElement} class={isExpanded ? 'cursor-text' : ''}>
|
||||||
<MarkdownContent
|
<MarkdownContent class="markdown-system-content" content={message.content} />
|
||||||
class="markdown-system-content -my-4"
|
|
||||||
content={message.content}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<span
|
<span
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@
|
|||||||
>
|
>
|
||||||
{#if renderMarkdown && currentConfig.renderUserContentAsMarkdown}
|
{#if renderMarkdown && currentConfig.renderUserContentAsMarkdown}
|
||||||
<div bind:this={messageElement}>
|
<div bind:this={messageElement}>
|
||||||
<MarkdownContent class="markdown-user-content -my-4" {content} />
|
<MarkdownContent class="markdown-user-content" {content} />
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<span bind:this={messageElement} class="text-md whitespace-pre-wrap">
|
<span bind:this={messageElement} class="text-md whitespace-pre-wrap">
|
||||||
|
|||||||
Reference in New Issue
Block a user