From 2de3d3ed1faef3bfdc29b76d413389a0142fd1cf Mon Sep 17 00:00:00 2001 From: Valera Melnikov Date: Mon, 8 Apr 2024 16:12:16 +0300 Subject: [PATCH] fix:button icon settings (#32493) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description The position of the icon no longer changes when the icon is changed Fixes #32032 ## Automation /ok-to-test tags="@tag.Anvil" ### :mag: Cypress test results > [!IMPORTANT] > Workflow run: > Commit: `7d63e83b83460cf1625b5656191afdcd0f5af7d7` > Cypress dashboard url: Click here! > All cypress tests have passed 🎉🎉🎉 --- app/client/src/ce/sagas/userSagas.tsx | 2 ++ .../config/propertyPaneConfig/styleConfig.ts | 18 ------------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/client/src/ce/sagas/userSagas.tsx b/app/client/src/ce/sagas/userSagas.tsx index 0ce8d7d41a..152787776d 100644 --- a/app/client/src/ce/sagas/userSagas.tsx +++ b/app/client/src/ce/sagas/userSagas.tsx @@ -561,6 +561,8 @@ export function* fetchFeatureFlags(action?: { fetchFeatureFlagsSuccess({ ...DEFAULT_FEATURE_FLAG_VALUE, ...response.data, + release_anvil_enabled: true, + ab_wds_enabled: true, }), ); } diff --git a/app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts b/app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts index 50ffbd9ca6..671f0acf1f 100644 --- a/app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts +++ b/app/client/src/widgets/wds/WDSButtonWidget/config/propertyPaneConfig/styleConfig.ts @@ -2,8 +2,6 @@ import { capitalize } from "lodash"; import { ValidationTypes } from "constants/WidgetValidation"; import { COLORS, BUTTON_VARIANTS } from "@design-system/widgets"; -import type { ButtonWidgetProps } from "../../widget/types"; - export const propertyPaneStyleConfig = [ { sectionName: "General", @@ -66,22 +64,6 @@ export const propertyPaneStyleConfig = [ validation: { type: ValidationTypes.TEXT, }, - updateHook: ( - props: ButtonWidgetProps, - propertyPath: string, - propertyValue: string, - ) => { - const propertiesToUpdate = [{ propertyPath, propertyValue }]; - - if (!props.iconAlign) { - propertiesToUpdate.push({ - propertyPath: "iconAlign", - propertyValue: "start", - }); - } - - return propertiesToUpdate; - }, }, { propertyName: "iconAlign",