дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 17:21:13 +02:00
fix(search): show the results list when the preview is off
Without the preview, `.content` has no definite height, and the results pane's `flex: 1` (a 0% basis) collapsed it to its padding in the system WebKit of macOS 15, so Search Everywhere and Go to File showed no rows. The pane now uses an `auto` basis and keeps its inline height.
Цей коміт міститься в:
1 джерело
c96206ce0c
коміт
1748afd991
2 files changed
+27
-1
No files matched your search
@@ -21,6 +21,30 @@ async function searchFiles(page: Page) {
|
||||
return dialog;
|
||||
}
|
||||
|
||||
for (const count of [1, 2, 24]) {
|
||||
test(`without the preview the results list shows its rows (${count} results)`, async ({ workbench: page }) => {
|
||||
await stubDesktop(page);
|
||||
await page.evaluate((count) => {
|
||||
window.__ipc.handlers.find_files = () =>
|
||||
Array.from({ length: count }, (_, i) => ({
|
||||
path: `/dev/acme-api/src/main${i}.js`,
|
||||
relPath: `src/main${i}.js`,
|
||||
score: 100 - i,
|
||||
indices: [],
|
||||
}));
|
||||
}, count);
|
||||
await doubleShift(page);
|
||||
const dialog = page.locator('[role="dialog"]:has(#se-query)');
|
||||
await dialog.getByRole("tab", { name: "Files", exact: true }).click();
|
||||
await dialog.getByRole("combobox", { name: "Search query" }).fill("main");
|
||||
await expect(dialog.getByRole("separator", { name: "Preview", exact: true })).toBeHidden();
|
||||
const list = dialog.getByRole("listbox", { name: "Results" });
|
||||
await expect
|
||||
.poll(async () => (await list.boundingBox())?.height ?? 0)
|
||||
.toBeGreaterThanOrEqual(Math.min(count, 5) * 24);
|
||||
});
|
||||
}
|
||||
|
||||
test("preview splitter resizes with mouse and keyboard, keeps query focus and remembers its ratio", async ({
|
||||
workbench: page,
|
||||
}) => {
|
||||
|
||||
@@ -139,7 +139,9 @@
|
||||
height: 532px;
|
||||
}
|
||||
.results {
|
||||
flex: 1;
|
||||
/* `auto`, not `1`: without the preview `.content` has no definite height, and a 0% basis there
|
||||
collapses the list in the system WebKit of macOS 15 instead of using its inline height. */
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in new issue
Заблокувати користувача