From 888c1310e45a5162486fcc043f400554627ffbdc Mon Sep 17 00:00:00 2001 From: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Date: Mon, 13 May 2024 16:26:42 +0530 Subject: [PATCH] fix: Peek overlay overflowing in side by side (#33376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Peek overlay popover was getting cut off in the left side. This PR fix this issue. Fixes #33370 ## Automation /ok-to-test tags="@tag.Sanity" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: a7a9a10ba4e2f0a9918f6ca8898fb9e9b321f0d1 > Cypress dashboard url: Click here! ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No --- .../CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx b/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx index 117e77b6ad..8e2ba47ba7 100644 --- a/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx @@ -96,6 +96,11 @@ export function PeekOverlayPopUpContent( PEEK_OVERLAY_DELAY, ); + const getLeftPosition = (position: DOMRect) => { + let left = position.right - 300; + if (left < 0) left = 8; + return left; + }; return (
= CONTAINER_MAX_HEIGHT_PX ? { bottom: `calc(100vh - ${props.position.top}px)`,