fix(search): make the search popups draggable (#625)

Find in Files, Replace in Files and Search Everywhere have no window title bar, so they could not be moved off the editor underneath. Dialogs can now be dragged from any element marked `data-dialog-drag`: the headers of those search popups, the title of any titled popup, and the existing window title bars and alert bodies, which now use the same mark. Controls inside a handle never start a drag.

Also waits for a review thread inlay in a test where it can mount a tick later.

Co-authored-by: a-rookie-of-C-language <[email protected]>
This commit is contained in:
arookieofcanda-rookie-of-C-language authored and GitHub committed 2026-11-01 08:13:15 +08:00
1 parent 95e79116d1
commit 0bf597c2fd
5 files changed
+53 -10

No files matched your search

+2 -1
View File
@@ -216,7 +216,8 @@ describe("review threads in a pull request diff", () => {
expect(right.contains(t1)).toBe(true);
expect(t1.closest(".cm-lineInlay")!.previousElementSibling?.textContent).toBe("line three");
expect(right.querySelectorAll(".cm-reviewControl-toggle")).toHaveLength(2);
expect(inlay("T2")).not.toBeNull();
// Each thread's inlay mounts in its own effect, so T2 may land a tick after T1.
await waitFor(() => expect(inlay("T2")).not.toBeNull());
act(() => setReviewDiffSettings({ threadsView: "unresolved" }));
await waitFor(() => expect(inlay("T2")).toBeNull());