diff --git a/src/styles/components/chat/_chat-prompt-attachment.scss b/src/styles/components/chat/_chat-prompt-attachment.scss index 6d58b42d..641a0fd3 100644 --- a/src/styles/components/chat/_chat-prompt-attachment.scss +++ b/src/styles/components/chat/_chat-prompt-attachment.scss @@ -22,6 +22,9 @@ > .mynah-syntax-highlighter { pointer-events: auto; user-select: text; + // Allow scrolling on hover so the full (overflowing) code snippet can be + // viewed; without this the content is clipped and no scrollbar is usable. + overflow: auto; pre { text-overflow: unset; } @@ -63,6 +66,10 @@ > .mynah-card-body { > .mynah-syntax-highlighter { max-height: calc(70vh - var(--mynah-sizing-12)) !important; + // The preview is meant to show the full snippet, so allow it to scroll + // (horizontally and vertically) and be interactive. + overflow: auto !important; + pointer-events: auto !important; } } } diff --git a/ui-tests/__test__/flows/quick-action-commands-header.ts b/ui-tests/__test__/flows/quick-action-commands-header.ts index c90e28b6..a0e6c7ae 100644 --- a/ui-tests/__test__/flows/quick-action-commands-header.ts +++ b/ui-tests/__test__/flows/quick-action-commands-header.ts @@ -137,9 +137,9 @@ export const verifyQuickActionCommandsHeaderStatusVariations = async (page: Page let foundStatusClass = false; for (const statusClass of statusClasses) { - const hasStatus = await headerElement.evaluate((el, className) => + const hasStatus = Boolean(await headerElement.evaluate((el, className) => el.classList.contains(className), statusClass - ); + )); if (hasStatus) { foundStatusClass = true; console.log(`Found status class: ${statusClass}`);