fix: use inline-flex to stabilize find widget buttons (#220)

This commit is contained in:
Jinjing 2026-03-29 23:14:42 -07:00 committed by GitHub
parent affa73bcd3
commit d45ead3682
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 59 additions and 4 deletions

BIN
debug_orca.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

View file

@ -861,3 +861,43 @@
font-size: 12px;
color: var(--muted-foreground);
}
/* ── fix: ensure Monaco find widget layout is not reversed ── */
.monaco-editor .find-widget,
.monaco-editor .find-widget .monaco-inputbox,
.monaco-editor .find-widget .matchesCount {
direction: ltr !important;
flex-direction: row !important;
}
.monaco-editor .find-widget .button,
.monaco-editor .find-widget .monaco-button,
.monaco-editor .find-widget .monaco-find-input .controls .button {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
padding: 0 !important;
width: 20px !important;
height: 20px !important;
line-height: normal !important;
box-sizing: border-box !important;
vertical-align: middle !important;
border: none !important;
box-shadow: none !important;
transition: none !important;
}
/* Specifically for the expand/collapse button icon which is often a nested 'i' or '::before' */
.monaco-editor .find-widget .button.expand {
width: 16px !important;
height: 16px !important;
}
.monaco-editor .find-widget .button > .codicon,
.monaco-editor .find-widget .button > i {
display: flex !important;
align-items: center !important;
justify-content: center !important;
width: 100% !important;
height: 100% !important;
}

View file

@ -394,7 +394,7 @@ export default function Terminal(): React.JSX.Element | null {
tabId={tab.id}
worktreeId={worktree.id}
cwd={worktree.path}
isActive={isVisible && tab.id === activeTabId}
isActive={isVisible && tab.id === activeTabId && activeTabType === 'terminal'}
onPtyExit={(ptyId) => handlePtyExit(tab.id, ptyId)}
/>
))}

View file

@ -173,7 +173,12 @@ export function DiffSectionItem({
automaticLayout: true,
renderOverviewRuler: false,
scrollbar: { vertical: 'hidden', handleMouseWheel: false },
hideUnchangedRegions: { enabled: true }
hideUnchangedRegions: { enabled: true },
find: {
addExtraSpaceOnTop: false,
autoFindInSelection: 'never',
seedSearchStringFromSelection: 'never'
}
}}
/>
)}

View file

@ -77,7 +77,12 @@ export default function DiffViewer({
lineNumbers: 'on',
automaticLayout: true,
renderOverviewRuler: true,
padding: { top: 8 }
padding: { top: 0 },
find: {
addExtraSpaceOnTop: false,
autoFindInSelection: 'never',
seedSearchStringFromSelection: 'never'
}
}}
/>
</div>

View file

@ -169,7 +169,12 @@ export default function MonacoEditor({
tabSize: 2,
smoothScrolling: true,
cursorSmoothCaretAnimation: 'off',
padding: { top: 8 }
padding: { top: 0 },
find: {
addExtraSpaceOnTop: false,
autoFindInSelection: 'never',
seedSearchStringFromSelection: 'never'
}
}}
path={filePath}
/>