From 4f50997dc83c2b425f2653d9165c29473121f3e2 Mon Sep 17 00:00:00 2001 From: Dhavanesh24cs412 Date: Thu, 15 Jan 2026 23:49:31 +0530 Subject: [PATCH] fix(devtools): make panel height responsive for fullscreen view - Replace hardcoded 400px height with viewport-relative calculation - Height now scales as 50% of viewport height - Respects minimum (300px) and maximum (400px) constraints - Fixes issue where devtools panel was fixed to small height in fullscreen - Panel now properly adapts to different screen sizes Fixes #320 --- packages/devtools/src/context/devtools-store.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/devtools/src/context/devtools-store.ts b/packages/devtools/src/context/devtools-store.ts index 94e20032..1a258281 100644 --- a/packages/devtools/src/context/devtools-store.ts +++ b/packages/devtools/src/context/devtools-store.ts @@ -112,10 +112,12 @@ export const initialState: DevtoolsStore = { triggerHidden: false, customTrigger: undefined, }, - state: { - activeTab: 'plugins', - height: 400, - activePlugins: [], - persistOpen: false, - }, +state: { + activeTab: 'plugins', + height: typeof window !== 'undefined' + ? Math.min(400, Math.max(300, window.innerHeight * 0.5)) + : 400, + activePlugins: [], + persistOpen: false, +}, }