refactor: simplify expand chat input to 2-state with optimized button layout
- Remove 3-state logic (normal/50%/80%) - now only normal/expanded - Remove double-click detection and tooltips for simplicity - Remove platform-specific behavior (same UX for Electron and web) - Optimize button layout: reduce from 36px to 28px to fit 3 buttons - Position expand button above history buttons in vertical stack - Keep 15-line expanded height (360px, capped to available space) Per upstream dev feedback to keep it simple with one approach
This commit is contained in:
@@ -37,18 +37,18 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.prompt-input {
|
||||
@apply w-full pl-3 pr-10 pt-2.5 border text-sm resize-none outline-none transition-colors;
|
||||
font-family: inherit;
|
||||
background-color: var(--surface-base);
|
||||
color: inherit;
|
||||
border-color: var(--border-base);
|
||||
line-height: var(--line-height-normal);
|
||||
border-radius: 0;
|
||||
padding-bottom: 0;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
.prompt-input {
|
||||
@apply w-full pl-3 pr-10 pt-2.5 border text-sm resize-none outline-none transition-colors;
|
||||
font-family: inherit;
|
||||
background-color: var(--surface-base);
|
||||
color: inherit;
|
||||
border-color: var(--border-base);
|
||||
line-height: var(--line-height-normal);
|
||||
border-radius: 0;
|
||||
padding-bottom: 0;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.prompt-input-overlay {
|
||||
@@ -70,110 +70,47 @@
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.prompt-history-top,
|
||||
.prompt-history-bottom {
|
||||
/* Navigation buttons container (expand, prev, next) */
|
||||
.prompt-nav-buttons {
|
||||
position: absolute;
|
||||
right: 0.35rem;
|
||||
top: 0.25rem;
|
||||
right: 0.25rem;
|
||||
bottom: 0.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
gap: 0.125rem;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.prompt-history-top {
|
||||
top: 0.3rem;
|
||||
}
|
||||
|
||||
.prompt-history-bottom {
|
||||
bottom: 0.6rem;
|
||||
}
|
||||
|
||||
.prompt-expand-button,
|
||||
.prompt-history-button {
|
||||
@apply w-9 h-9 flex items-center justify-center rounded-md;
|
||||
@apply w-7 h-7 flex items-center justify-center rounded-md;
|
||||
color: var(--text-muted);
|
||||
background-color: rgba(15, 23, 42, 0.04);
|
||||
transition: background-color 0.15s ease, color 0.15s ease;
|
||||
padding: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.prompt-expand-button:hover:not(:disabled),
|
||||
.prompt-history-button:hover:not(:disabled) {
|
||||
background-color: var(--surface-secondary);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.prompt-history-button:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.prompt-expand-top {
|
||||
position: absolute;
|
||||
top: 0.3rem;
|
||||
right: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.prompt-expand-button {
|
||||
@apply w-9 h-9 flex items-center justify-center rounded-md;
|
||||
color: var(--text-muted);
|
||||
background-color: rgba(15, 23, 42, 0.04);
|
||||
transition: background-color 0.15s ease, color 0.15s ease;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.prompt-expand-button:hover:not(:disabled) {
|
||||
background-color: var(--surface-secondary);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.prompt-expand-button:active:not(:disabled) {
|
||||
background-color: var(--accent-primary);
|
||||
color: var(--text-inverted);
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.prompt-expand-button:disabled {
|
||||
.prompt-expand-button:disabled,
|
||||
.prompt-history-button:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.prompt-expand-button::after {
|
||||
content: attr(data-tooltip);
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
right: 0;
|
||||
background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
|
||||
color: var(--text-primary);
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 6px;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.4;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid var(--border-base);
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
transform: translateY(-4px);
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
z-index: 1000;
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
/* Only show tooltip on hover for Electron (desktop-mode) */
|
||||
.prompt-expand-button.desktop-mode:hover::after {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* Web/Mobile: No tooltip (data-tooltip will be undefined anyway) */
|
||||
.prompt-expand-button.web-mode::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.prompt-overlay-text {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -369,4 +306,4 @@
|
||||
gap: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user