Skip to content

Commit 9345bd9

Browse files
Refactor: Update padding and margin styles for consistent layout in AutoApproveMenu component
1 parent fe9137b commit 9345bd9

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

src/core/config/__tests__/importExport.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ describe("importExport", () => {
227227

228228
expect(result).toEqual({
229229
success: false,
230-
error: "Expected property name or '}' in JSON at position 2",
230+
error: "Expected property name or '}' in JSON at position 2 (line 1 column 3)",
231231
})
232232
expect(fs.readFile).toHaveBeenCalledWith("/mock/path/settings.json", "utf-8")
233233
expect(mockProviderSettingsManager.import).not.toHaveBeenCalled()

src/integrations/terminal/__tests__/ExecaTerminal.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("ExecaTerminal", () => {
2222
onShellExecutionComplete: vi.fn(),
2323
}
2424

25-
const subprocess = terminal.runCommand("ls -al", callbacks)
25+
const subprocess = terminal.runCommand("LANG=C ls -al", callbacks)
2626
await subprocess
2727

2828
expect(callbacks.onLine).toHaveBeenCalled()

webview-ui/eslint.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ export default [
1818
"@typescript-eslint/no-explicit-any": "off",
1919
"react/prop-types": "off",
2020
"react/display-name": "off",
21+
"@typescript-eslint/no-unused-expressions": [
22+
"error",
23+
{
24+
"allowShortCircuit": true,
25+
"allowTernary": true,
26+
"allowTaggedTemplates": true,
27+
"enforceForJSX": false
28+
}
29+
],
2130
},
2231
},
2332
{

webview-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"lint": "eslint src --ext=ts,tsx --max-warnings=0",
6+
"lint": "eslint src --max-warnings=0",
77
"check-types": "tsc",
88
"test": "jest -w=40%",
99
"format": "prettier --write src",

webview-ui/src/components/chat/AutoApproveMenu.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
134134
display: "flex",
135135
alignItems: "center",
136136
gap: "8px",
137-
padding: isExpanded ? "8px 0" : "8px 0 0 0",
137+
padding: "8px 0 0 0", // Ensure consistent padding for the toggle header
138138
cursor: "pointer",
139139
}}
140140
onClick={toggleExpanded}>
@@ -207,8 +207,8 @@ const AutoApproveMenu = ({ style }: AutoApproveMenuProps) => {
207207
display: "flex",
208208
alignItems: "center",
209209
gap: "8px",
210-
marginTop: "10px",
211-
marginBottom: "8px",
210+
// marginTop: "10px", // Removed to use parent's gap for spacing
211+
// marginBottom: "8px", // Removed to use parent's gap for spacing
212212
color: "var(--vscode-descriptionForeground)",
213213
}}>
214214
<span style={{ flexShrink: 1, minWidth: 0 }}>

0 commit comments

Comments
 (0)