mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:20:44 +00:00
fix(ui): address markdown preview review
This commit is contained in:
@@ -19,8 +19,9 @@ describe("markdown preview styles", () => {
|
||||
|
||||
expect(css).toContain(".md-preview-dialog__panel.fullscreen .md-preview-dialog__header-main");
|
||||
expect(css).toContain("clip-path: inset(50%);");
|
||||
expect(css).toContain(".md-preview-dialog__panel.fullscreen .md-preview-dialog__meta");
|
||||
expect(css).toContain("display: none;");
|
||||
expect(css).toMatch(
|
||||
/\.md-preview-dialog__panel\.fullscreen\s+\.md-preview-dialog__meta\s*\{[^}]*display:\s*none;/,
|
||||
);
|
||||
expect(css).toContain(".md-preview-dialog__panel.fullscreen .md-preview-dialog__body");
|
||||
expect(css).toContain("width: min(100%, 96ch);");
|
||||
});
|
||||
|
||||
@@ -38,6 +38,7 @@ export function renderMarkdownSidebar(props: MarkdownSidebarProps) {
|
||||
<button
|
||||
@click=${props.onClose}
|
||||
class="btn"
|
||||
type="button"
|
||||
title="Close sidebar"
|
||||
aria-label="Close sidebar"
|
||||
>
|
||||
@@ -48,7 +49,12 @@ export function renderMarkdownSidebar(props: MarkdownSidebarProps) {
|
||||
${props.error
|
||||
? html`
|
||||
<div class="callout danger">${props.error}</div>
|
||||
<button @click=${props.onViewRawText} class="btn" style="margin-top: 12px;">
|
||||
<button
|
||||
@click=${props.onViewRawText}
|
||||
class="btn"
|
||||
type="button"
|
||||
style="margin-top: 12px;"
|
||||
>
|
||||
View Raw Text
|
||||
</button>
|
||||
`
|
||||
@@ -77,7 +83,9 @@ export function renderMarkdownSidebar(props: MarkdownSidebarProps) {
|
||||
${content.rawText?.trim()
|
||||
? html`
|
||||
<div style="margin-top: 12px;">
|
||||
<button @click=${props.onViewRawText} class="btn">View Raw Text</button>
|
||||
<button @click=${props.onViewRawText} class="btn" type="button">
|
||||
View Raw Text
|
||||
</button>
|
||||
</div>
|
||||
`
|
||||
: nothing}
|
||||
@@ -95,7 +103,7 @@ export function renderMarkdownSidebar(props: MarkdownSidebarProps) {
|
||||
Sanitized rich-text preview for quick reading.
|
||||
</div>
|
||||
</div>
|
||||
<button @click=${props.onViewRawText} class="btn btn--sm">
|
||||
<button @click=${props.onViewRawText} class="btn btn--sm" type="button">
|
||||
View Raw Text
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user