дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
fix(find): keep the usages popup size loader private and fix a knip import (#7049)
#7048 exported the size loader only its own file uses, and its e2e test imported usages.ts from a literal path; knip reported both. Unexport the loader and import through a variable like the other spec in the file.
Цей коміт міститься в:
1 джерело
72669a04c2
коміт
3eb6933644
2 files changed
+3
-2
No files matched your search
@@ -50,7 +50,8 @@ test("Show Usages resizes from its corner, the list fills it, and it reopens at
|
||||
await page.setViewportSize({ width: 1200, height: 800 });
|
||||
const show = () =>
|
||||
page.evaluate(async () => {
|
||||
const { useUsagesPopup } = await import(/* @vite-ignore */ "/src/features/code-insight/usages.ts");
|
||||
const usages = "/src/features/code-insight/usages.ts";
|
||||
const { useUsagesPopup } = await import(/* @vite-ignore */ usages);
|
||||
const path = "/dev/app/src/Main.ts";
|
||||
useUsagesPopup.setState({
|
||||
open: true,
|
||||
|
||||
@@ -60,7 +60,7 @@ const MIN_WIDTH = 360;
|
||||
const MIN_HEIGHT = 160;
|
||||
|
||||
/** The size the popup was last resized to, if any (IDEA remembers Show Usages' size). */
|
||||
export function loadUsagesPopupSize(): { w: number; h: number } | null {
|
||||
function loadUsagesPopupSize(): { w: number; h: number } | null {
|
||||
try {
|
||||
const saved = JSON.parse(localStorage.getItem(SIZE_KEY) ?? "null") as { w?: unknown; h?: unknown } | null;
|
||||
return typeof saved?.w === "number" && typeof saved.h === "number" && Number.isFinite(saved.w + saved.h)
|
||||
|
||||
Reference in new issue
Заблокувати користувача