From 007ada81f5016b0617332cafb74674393fa3fc39 Mon Sep 17 00:00:00 2001 From: Ashit Rath Date: Mon, 28 Apr 2025 13:38:38 +0530 Subject: [PATCH] chore: Revert reset main canvas reducer (#40406) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description [Thread](https://theappsmith.slack.com/archives/CGBPVEJ5C/p1745816357424529) Revert from https://github.com/appsmithorg/appsmith/pull/40349/files#diff-81c17163a9b2e20b963396864fc8106e02d812add8ddc82bf9e4f4bffeb273edR42 Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 86fc8d8465e64d9b903cec2ccae9fe960e42b526 > Cypress dashboard. > Tags: `@tag.All` > Spec: >
Mon, 28 Apr 2025 08:06:57 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Refactor** - Improved internal handling of the editor reset action for enhanced maintainability. No impact on user-facing features. --- app/client/src/ce/reducers/uiReducers/mainCanvasReducer.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/client/src/ce/reducers/uiReducers/mainCanvasReducer.ts b/app/client/src/ce/reducers/uiReducers/mainCanvasReducer.ts index 3616fecc04..580bab6450 100644 --- a/app/client/src/ce/reducers/uiReducers/mainCanvasReducer.ts +++ b/app/client/src/ce/reducers/uiReducers/mainCanvasReducer.ts @@ -7,7 +7,6 @@ import { } from "constants/WidgetConstants"; import type { UpdateCanvasLayoutPayload } from "actions/controlActions"; import type { UpdateCanvasPayload } from "actions/pageActions"; -import { klona } from "klona"; export const initialState: MainCanvasReduxState = { initialized: false, @@ -39,9 +38,6 @@ export const handlers = { state.isMobile = action.payload.width <= layoutConfigurations.MOBILE.maxWidth; }, - [ReduxActionTypes.RESET_EDITOR_REQUEST]: () => { - return klona(initialState); - }, }; const mainCanvasReducer = createImmerReducer(initialState, handlers);