(".file-preview-virtualizer");
+
+ await using _screen = await render(
+
+ {filePreview("wrapped.ts")}
+
,
+ );
+ await vi.waitFor(() => expect(scroller()?.scrollHeight).toBeGreaterThan(20_000));
+ const shadowRows = () =>
+ [...document.querySelectorAll("*")].flatMap((host) =>
+ host.shadowRoot ? [...host.shadowRoot.querySelectorAll("[data-line]")] : [],
+ );
+ await userEvent.click(shadowRows().find((row) => row.getAttribute("data-line") === "1")!);
+ await vi.waitFor(() => expect(deepActiveElement()?.matches("[data-content]")).toBe(true));
+ await userEvent.keyboard(
+ isMacPlatform(navigator.platform) ? "{Meta>}f{/Meta}" : "{Control>}f{/Control}",
+ );
+ await vi.waitFor(() => expect(deepActiveElement()).toBeInstanceOf(HTMLInputElement));
+ await userEvent.keyboard("needle{Enter}");
+
+ const visibleLines = () => {
+ const viewport = scroller()!.getBoundingClientRect();
+ return shadowRows()
+ .filter((row) => {
+ const box = row.getBoundingClientRect();
+ return box.height > 0 && box.top >= viewport.top && box.bottom <= viewport.bottom;
+ })
+ .map((row) => Number(row.getAttribute("data-line")));
+ };
+ await vi.waitFor(() => expect(visibleLines()).toContain(801));
+ });
});
describe("rendered Markdown task saves", () => {
diff --git a/apps/web/src/components/issue/IssueListFilterPickers.tsx b/apps/web/src/components/issue/IssueListFilterPickers.tsx
index ff40d1c3f8f45..d1d28fa366de0 100644
--- a/apps/web/src/components/issue/IssueListFilterPickers.tsx
+++ b/apps/web/src/components/issue/IssueListFilterPickers.tsx
@@ -26,7 +26,7 @@ import {
} from "~/components/ui/menu";
import { useIssueFilterCandidates } from "~/state/issues";
-import type { ProjectFaviconProject } from "../ProjectFavicon";
+import { ProjectFavicon, type ProjectFaviconProject } from "../ProjectFavicon";
import {
PullRequestFilterRadioSubmenu,
@@ -36,7 +36,6 @@ import {
import { pullRequestLabelColor } from "../pullRequest/pullRequestList.logic";
const VISIBLE_CHOICES = 30;
-const ALL_PROJECTS = "all";
const matches = (needle: string, ...fields: ReadonlyArray) =>
needle.length === 0 || fields.some((field) => field?.toLowerCase().includes(needle));
@@ -54,38 +53,18 @@ export function IssueFiltersMenu(props: {
assignee: string | undefined;
onAssignee: (assignee: string | undefined) => void;
projects: ReadonlyArray;
- project: { environmentId: EnvironmentId; projectId: ProjectId } | undefined;
- onProject: (project: { environmentId: EnvironmentId; projectId: ProjectId } | undefined) => void;
+ hiddenProjects: ReadonlySet