fix: remove console composer click shell
This commit is contained in:
@@ -152,14 +152,16 @@ Deno.test("Worker Console composer fits to content without manual resize", async
|
||||
);
|
||||
assert(
|
||||
consolePage.includes("use:fitTextarea={{ value: draft, maxRows: 10 }}") &&
|
||||
consolePage.includes("class=\"composer-input-shell\" onclick={handleComposerShellClick}") &&
|
||||
consolePage.includes("<div class=\"composer-input-shell\">") &&
|
||||
!consolePage.includes("handleComposerShellClick") &&
|
||||
consolePage.includes("bind:this={composerTextareaElement}") &&
|
||||
consolePage.includes("composerTextareaElement?.focus()") &&
|
||||
consolePage.includes('event.key === "PageUp" || event.key === "PageDown"') &&
|
||||
consolePage.includes("scrollConsoleByPage") &&
|
||||
consolePage.includes("class=\"composer-input-footer\"") &&
|
||||
consolePage.includes("pointer-events: none") &&
|
||||
consolePage.includes("class=\"composer-footer-slot\"") &&
|
||||
consolePage.includes("class=\"composer-send-button\"") &&
|
||||
consolePage.includes("pointer-events: auto") &&
|
||||
consolePage.includes("class=\"composer-send-icon\"") &&
|
||||
consolePage.includes('d="M8 6L12 2L16 6"') &&
|
||||
consolePage.includes(".console-composer textarea") &&
|
||||
|
||||
+11
-17
@@ -376,17 +376,6 @@
|
||||
window.requestAnimationFrame(updateConsoleScrollMetrics);
|
||||
}
|
||||
|
||||
function handleComposerShellClick(event: MouseEvent) {
|
||||
const target = event.target;
|
||||
if (
|
||||
target instanceof Element &&
|
||||
target.closest("button, textarea, a")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
composerTextareaElement?.focus();
|
||||
}
|
||||
|
||||
function sendControl(method: ProtocolMethod, label: string) {
|
||||
try {
|
||||
sendProtocolMethod(method);
|
||||
@@ -1317,7 +1306,7 @@
|
||||
{/if}
|
||||
|
||||
<form class="console-composer card" onsubmit={sendMessage}>
|
||||
<div class="composer-input-shell" onclick={handleComposerShellClick}>
|
||||
<div class="composer-input-shell">
|
||||
<textarea
|
||||
id="worker-console-message"
|
||||
aria-label="Console input"
|
||||
@@ -1603,8 +1592,7 @@
|
||||
}
|
||||
|
||||
.composer-input-shell {
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
position: relative;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 18px;
|
||||
background: var(--bg-raised);
|
||||
@@ -1618,12 +1606,16 @@
|
||||
}
|
||||
|
||||
.composer-input-footer {
|
||||
position: absolute;
|
||||
right: 0.7rem;
|
||||
bottom: 0.7rem;
|
||||
left: 1rem;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: var(--space-2);
|
||||
align-items: end;
|
||||
min-height: 2.35rem;
|
||||
padding-left: 0.65rem;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.composer-footer-slot {
|
||||
@@ -1633,17 +1625,18 @@
|
||||
.console-composer textarea {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
min-height: 5.35rem;
|
||||
resize: none;
|
||||
overflow-y: hidden;
|
||||
border: 0;
|
||||
border-radius: 14px;
|
||||
background: transparent;
|
||||
padding: 0.55rem 0.65rem;
|
||||
padding: 0.55rem 3.4rem 3rem 0.65rem;
|
||||
font: inherit;
|
||||
line-height: 1.45;
|
||||
color: var(--text-strong);
|
||||
outline: none;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.console-composer textarea:disabled {
|
||||
@@ -1661,6 +1654,7 @@
|
||||
color: var(--bg);
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.composer-send-button:disabled {
|
||||
|
||||
Reference in New Issue
Block a user