diff --git a/e2e/runAnything.spec.ts b/e2e/runAnything.spec.ts index 862859696..72b522884 100644 --- a/e2e/runAnything.spec.ts +++ b/e2e/runAnything.spec.ts @@ -39,9 +39,15 @@ test("Run Anything keeps its command field and shortcuts visible as its results const popup = page.getByRole("dialog", { name: "Run Anything", exact: true }); const field = popup.getByLabel("Command line", { exact: true }); + const fieldSurface = field.locator(".."); + const commandRow = fieldSurface.locator(".."); const results = popup.getByRole("listbox", { name: "Run Anything entries" }); const hint = popup.getByText(/Enter to run, Tab to complete|Tab to complete, Enter to run/); await expect(field).toBeFocused(); + await expect(fieldSurface).toHaveCSS("box-shadow", "none"); + await expect(commandRow).toHaveCSS("border-bottom-width", "1px"); + await expect(commandRow).toHaveCSS("border-left-width", "0px"); + const focusedDivider = await commandRow.evaluate((el) => getComputedStyle(el).borderBottomColor); await page.setViewportSize({ width: 560, height: 340 }); await expect .poll(async () => { @@ -69,6 +75,7 @@ test("Run Anything keeps its command field and shortcuts visible as its results await field.press("Shift+Tab"); const history = popup.getByRole("button", { name: "Clear History" }); await expect(history).toBeFocused(); + await expect(commandRow).not.toHaveCSS("border-bottom-color", focusedDivider); await history.press("Enter"); await expect(history).toBeHidden(); await expect(field).toBeFocused(); diff --git a/src/features/run-anything/RunAnything.module.css b/src/features/run-anything/RunAnything.module.css index b93e43a0f..e6986fa1d 100644 --- a/src/features/run-anything/RunAnything.module.css +++ b/src/features/run-anything/RunAnything.module.css @@ -49,7 +49,15 @@ } .query { flex: none; - padding: var(--space-2); + margin-inline: var(--space-3); + border-bottom: 1px solid var(--border-popup); +} +.query:focus-within { + border-bottom-color: var(--focus-ring); +} +.query .commandField { + min-height: 29px; + padding-inline: var(--space-0-5); } .rows { flex: 1 1 auto; diff --git a/src/features/run-anything/RunAnything.tsx b/src/features/run-anything/RunAnything.tsx index 8cc10dd00..40c6ee157 100644 --- a/src/features/run-anything/RunAnything.tsx +++ b/src/features/run-anything/RunAnything.tsx @@ -144,6 +144,8 @@ function RunAnythingPopup({ root }: { root: string }) { ref={field} data-autofocus leadingIcon="run-anything" + variant="bare" + className={styles.commandField} clearable={false} role="combobox" aria-autocomplete="list"