дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 01:57:13 +02:00
fix(terminal): keep session and search controls visible (#2379)
In a narrow Terminal tool window the search field's options and match count pushed the navigation and close buttons out of view (24px overflow), and session tab controls were misaligned. Search now lays out on a control-width grid (match count and navigation on their own row when narrow) and session controls align with the tool window header. Verified on macOS with tabs, new sessions, splits, search, light/dark and narrow panes.
Цей коміт міститься в:
1 джерело
0b70ede663
коміт
d132f1adf5
7 files changed
+89
-3
No files matched your search
@@ -87,6 +87,7 @@ export function TerminalFindBar({ sessionKey }: { sessionKey: string | null }) {
|
||||
e.stopPropagation();
|
||||
closeTerminalFind();
|
||||
} else if (e.key === "Enter") {
|
||||
if ((e.target as Element).closest("button")) return;
|
||||
e.preventDefault();
|
||||
find(e.shiftKey ? "previous" : "next");
|
||||
} else if (e.key === "F3" || (hasPrimaryModifier(e) && e.key.toLowerCase() === "g")) {
|
||||
@@ -155,7 +156,7 @@ export function TerminalFindBar({ sessionKey }: { sessionKey: string | null }) {
|
||||
title="Previous Occurrence"
|
||||
shortcut={formatBinding("Shift+Enter")}
|
||||
size="small"
|
||||
disabled={!query}
|
||||
disabled={!query || !result?.count}
|
||||
onClick={() => find("previous")}
|
||||
/>
|
||||
<IconButton
|
||||
@@ -163,7 +164,7 @@ export function TerminalFindBar({ sessionKey }: { sessionKey: string | null }) {
|
||||
title="Next Occurrence"
|
||||
shortcut="↵"
|
||||
size="small"
|
||||
disabled={!query}
|
||||
disabled={!query || !result?.count}
|
||||
onClick={() => find("next")}
|
||||
/>
|
||||
<span className={styles.findSpacer} />
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
/* A tab group: its header (while split) over its tabs' terminals. */
|
||||
.group {
|
||||
container: terminal-group / inline-size;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -156,3 +157,17 @@
|
||||
.findSpacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@container terminal-group (max-width: 360px) {
|
||||
.find {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) repeat(3, var(--h-control-small));
|
||||
}
|
||||
.findField {
|
||||
grid-column: 1 / -1;
|
||||
min-width: 0;
|
||||
}
|
||||
.findSpacer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -459,7 +459,7 @@ function GroupTabs({ group }: { group: string }) {
|
||||
/>
|
||||
<IconButton
|
||||
ref={menuRef}
|
||||
icon="chevron-down"
|
||||
icon="toolbar-expand"
|
||||
size="small"
|
||||
title="More Terminal Options"
|
||||
aria-haspopup="menu"
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.5 5.75L8 10.25L3.5 5.75" stroke="#6C707E" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Після Ширина: | Висота: | Розмір: 310 B |
@@ -0,0 +1,4 @@
|
||||
<!-- Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.5 5.75L8 10.25L3.5 5.75" stroke="#CED0D6" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Після Ширина: | Висота: | Розмір: 310 B |
@@ -224,6 +224,7 @@ const ICONS = {
|
||||
// General UI
|
||||
"chevron-right": "general/chevronRight",
|
||||
"chevron-down": "general/chevronDown",
|
||||
"toolbar-expand": "general/chevronDownLarge",
|
||||
"chevron-up": "general/chevronUp",
|
||||
"chevron-left": "general/chevronLeft",
|
||||
close: "general/close",
|
||||
|
||||
Reference in new issue
Заблокувати користувача