From e00f630b15805197f7c39137e1c4ddab44f5abe6 Mon Sep 17 00:00:00 2001 From: Robin Schreiber Date: Tue, 7 May 2024 18:31:38 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A7=B0:=20prevent=20displaying=20brea?= =?UTF-8?q?kpoints=20in=20sidebar=20when=20not=20applicable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit partitioned breakpoints also have breakpoints, but it does not really make sense to display the breakpoint control for them. --- lively.ide/studio/controls/responsive.cp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lively.ide/studio/controls/responsive.cp.js b/lively.ide/studio/controls/responsive.cp.js index 27106fd0f3..c346698977 100644 --- a/lively.ide/studio/controls/responsive.cp.js +++ b/lively.ide/studio/controls/responsive.cp.js @@ -44,7 +44,7 @@ class BreakpointEntryModel extends ViewModel { } getBreakpointSpec () { - const store = this.targetStylePolicy?.getBreakpointStore(); + const store = !this.targetStylePolicy?.statePartitionedInline && this.targetStylePolicy?.getBreakpointStore(); if (!store) { return; } @@ -53,7 +53,7 @@ class BreakpointEntryModel extends ViewModel { update (targetMorph) { this.targetMorph = targetMorph; - const store = this.targetStylePolicy?.getBreakpointStore(); + const store = !this.targetStylePolicy?.statePartitionedInline && this.targetStylePolicy?.getBreakpointStore(); if (!store) return; const { horizontalPin, verticalPin, configureComponentButton } = this.ui; const { @@ -289,7 +289,7 @@ export class ResponsiveControlModel extends PropertySectionModel { let bpStore; while (true) { - bpStore = stylePolicy?.getBreakpointStore(); + bpStore = !stylePolicy?.statePartitionedInline && stylePolicy?.getBreakpointStore(); if (bpStore) { break; } From 1fc376a045cec5a10ffb61aa6ed882b9f649a9ec Mon Sep 17 00:00:00 2001 From: Robin Schreiber Date: Tue, 7 May 2024 18:32:45 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A7=B0:=20do=20not=20incrementally=20?= =?UTF-8?q?extend=20partitioned=20policies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Partitioned policies are synthesized, and any override by definition, will revoke the splitting. Therefore it does not make sense to extend the existing master via `applyConfiguration()` --- lively.ide/studio/controls/component.cp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lively.ide/studio/controls/component.cp.js b/lively.ide/studio/controls/component.cp.js index f1c76d8aeb..d62d187fa4 100644 --- a/lively.ide/studio/controls/component.cp.js +++ b/lively.ide/studio/controls/component.cp.js @@ -263,7 +263,7 @@ export class ComponentControlModel extends PropertySectionModel { const { autoComponentSelection, hoverComponentSelection, clickComponentSelection } = this.ui; const pos = this.targetMorph.position; // the parent is always preserved, since we can not alter the structural inheritance here - if (this.targetMorph.master) { + if (this.targetMorph.master && !this.targetMorph.master.statePartitionedInline) { const previousMasterConfig = this.targetMorph.master.getConfig() || {}; const bps = previousMasterConfig.breakpoints; if (bps) bps[0][1] = autoComponentSelection.component;