From ecb93b2d50a77aa31d09efabfb38ce9a3e225e8a Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Thu, 5 Mar 2026 12:27:38 +0530 Subject: [PATCH 1/2] fix: fix the visibility of lable position option --- packages/pluggableWidgets/switch-native/CHANGELOG.md | 2 ++ .../switch-native/src/Switch.editorConfig.ts | 11 +++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/pluggableWidgets/switch-native/CHANGELOG.md b/packages/pluggableWidgets/switch-native/CHANGELOG.md index d9f4b9e93..881ca27b8 100644 --- a/packages/pluggableWidgets/switch-native/CHANGELOG.md +++ b/packages/pluggableWidgets/switch-native/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [1.1.1] - 2026-03-05 + ### Added - Added the ability to change the position of the label in horizontal view from the left side of the switch to the right side. diff --git a/packages/pluggableWidgets/switch-native/src/Switch.editorConfig.ts b/packages/pluggableWidgets/switch-native/src/Switch.editorConfig.ts index 0b6c14bc2..22fdae060 100644 --- a/packages/pluggableWidgets/switch-native/src/Switch.editorConfig.ts +++ b/packages/pluggableWidgets/switch-native/src/Switch.editorConfig.ts @@ -24,12 +24,11 @@ export function getPreview(values: SwitchPreviewProps, isDarkMode: boolean): Str document: decodeURIComponent( (isDarkMode ? StructurePreviewSwitchDarkSVG : StructurePreviewSwitchSVG).replace("data:image/svg+xml,", "") ), - width: 80, + width: 51, height: 30, grow: 8 }; - const children = values.showLabel ? [label, image] : [image]; - + const children = values.showLabel ? (values.labelPosition === "right" ? [image, label] : [label, image]) : [image]; return values.labelOrientation === "horizontal" ? { type: "RowLayout", @@ -48,7 +47,11 @@ export function getPreview(values: SwitchPreviewProps, isDarkMode: boolean): Str export function getProperties(values: SwitchPreviewProps, defaultProperties: Properties): Properties { if (!values.showLabel) { - hidePropertiesIn(defaultProperties, values, ["label", "labelOrientation"]); + hidePropertiesIn(defaultProperties, values, ["label", "labelOrientation", "labelPosition"]); + } + + if (values.showLabel && values.labelOrientation !== "horizontal") { + hidePropertiesIn(defaultProperties, values, ["labelPosition"]); } return defaultProperties; From 6c0d2ce493caf8407e3d80f20a9544ee0210d54b Mon Sep 17 00:00:00 2001 From: Srirang Kalantri <130371151+SrirangK@users.noreply.github.com> Date: Fri, 6 Mar 2026 18:26:06 +0530 Subject: [PATCH 2/2] Remove 1.1.1 release notes from CHANGELOG Removed version 1.1.1 release notes from CHANGELOG. --- packages/pluggableWidgets/switch-native/CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/pluggableWidgets/switch-native/CHANGELOG.md b/packages/pluggableWidgets/switch-native/CHANGELOG.md index 881ca27b8..d9f4b9e93 100644 --- a/packages/pluggableWidgets/switch-native/CHANGELOG.md +++ b/packages/pluggableWidgets/switch-native/CHANGELOG.md @@ -6,8 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] -## [1.1.1] - 2026-03-05 - ### Added - Added the ability to change the position of the label in horizontal view from the left side of the switch to the right side.