From 068847d4e9069b65cd3303324f16fb424bf91e0d Mon Sep 17 00:00:00 2001 From: Rudraprasad Das Date: Mon, 10 Jun 2024 19:34:54 +0530 Subject: [PATCH] fix: vanishing widgets in protected branches (#34129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fixing vanishing widgets in protected branches Fixes https://github.com/appsmithorg/appsmith/issues/34128 ## Automation /ok-to-test tags="@tag.Git" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: b45f21e9573c872c809b4f509d735988cbfcfae7 > Cypress dashboard url: Click here! ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Refactor** - Simplified logic by removing unnecessary checks for protected mode. --- .../common/dropTarget/DropTargetComponentWrapper.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/client/src/layoutSystems/common/dropTarget/DropTargetComponentWrapper.tsx b/app/client/src/layoutSystems/common/dropTarget/DropTargetComponentWrapper.tsx index 08067edd20..ecc048b180 100644 --- a/app/client/src/layoutSystems/common/dropTarget/DropTargetComponentWrapper.tsx +++ b/app/client/src/layoutSystems/common/dropTarget/DropTargetComponentWrapper.tsx @@ -7,7 +7,6 @@ import { useSelector } from "react-redux"; import { getWidget } from "sagas/selectors"; import type { AppState } from "@appsmith/reducers"; import { MAIN_CONTAINER_WIDGET_ID } from "constants/WidgetConstants"; -import { protectedModeSelector } from "selectors/gitSyncSelectors"; interface DropTargetComponentWrapperProps { dropTargetProps: DropTargetComponentProps; @@ -31,12 +30,7 @@ export const DropTargetComponentWrapper = memo( const widget = useSelector((state: AppState) => getWidget(state, dropTargetProps.parentId || MAIN_CONTAINER_WIDGET_ID), ); - const isProtectedMode = useSelector(protectedModeSelector); - if ( - (dropTargetProps.parentId && !widget) || - isProtectedMode || - dropDisabled - ) { + if ((dropTargetProps.parentId && !widget) || dropDisabled) { //eslint-disable-next-line return <>{children}; }