Skip to content

feature(component)-side-panel sizes#18298

Open
NDCallahan wants to merge 15 commits intoBudibase:masterfrom
NDCallahan:feature/sidepanel-sizes
Open

feature(component)-side-panel sizes#18298
NDCallahan wants to merge 15 commits intoBudibase:masterfrom
NDCallahan:feature/sidepanel-sizes

Conversation

@NDCallahan
Copy link
Contributor

@NDCallahan NDCallahan commented Mar 14, 2026

Description

Adds a size option to the Side Panel component to have small medium large fullscreen options available when using a size panel. Adds a Default size option to the Open Side Panel action so it can inherit the size already configured on the Side Panel component (instead of always forcing the action to pick a size). This makes the action behave like “use whatever size the component is configured with” when the component already has a size set.

Addresses

App Export

Screenshots

Launchcontrol

Add a small description in layman's terms of what this PR achieves. This will be used in the release notes.


Summary by cubic

Adds Side Panel size variants and a “Default” option in the Open Side Panel action to inherit the component’s size. Moves background styling to the outer container so the header matches, prevents flicker and reactive churn, and restores async close, the action editor’s two‑column layout, and the full‑width layout.

  • New Features
    • Sizes: small (400px), medium (500px), large (625px), fullscreen (20px gutters). Configurable on the Side Panel; default is small. Builder updates size live; actions can override per open.
    • Open Side Panel action: Size selector; “Default” inherits the component’s size. If the component already has a size, the action defaults to “Default”; explicit sizes pass through to runtime.
    • Background now applies to the outer container and reads the component’s background/background-image. Inner background is stripped and the container is cleared on close to avoid flicker (including gradients) across panels.

Written for commit 084d330. Summary will update on new commits.

@NDCallahan NDCallahan marked this pull request as ready for review March 15, 2026 03:24
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 7 files

Confidence score: 3/5

  • There is a concrete regression risk in packages/client/src/components/app/SidePanel.svelte: closed instances can remove global #side-panel-container background styles, so one panel closing may visually affect other panels that are still open.
  • packages/client/src/components/app/Layout.svelte may unintentionally constrain size--max to 400px, which could shrink nav/main areas configured as Max; this is user-facing layout impact, though confidence is low.
  • packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/OpenSidePanel.svelte removed .root styles while still using class="root", which likely disrupts the two-column action editor layout (alignment/width/centering).
  • Pay close attention to packages/client/src/components/app/SidePanel.svelte, packages/client/src/components/app/Layout.svelte, and packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/OpenSidePanel.svelte - potential shared-style side effects and layout regressions.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/client/src/components/app/Layout.svelte">

<violation number="1" location="packages/client/src/components/app/Layout.svelte:556">
P2: `size--max` no longer provides full-width layouts; it now limits Max to 400px, constraining any nav or main area configured as Max.</violation>
</file>

<file name="packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/OpenSidePanel.svelte">

<violation number="1" location="packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/OpenSidePanel.svelte:46">
P2: The `.root` layout styles were removed but the component still relies on `class="root"`. This likely breaks the action editor’s two-column layout (grid, width, centering), causing the Side Panel/Size controls to misalign or stack incorrectly. Restore the `.root` styles or provide a replacement layout class.</violation>
</file>

<file name="packages/client/src/components/app/SidePanel.svelte">

<violation number="1" location="packages/client/src/components/app/SidePanel.svelte:95">
P2: Closed SidePanel instances can clear the shared container background because every instance calls applyContainerBackground(open, ...) and the false branch removes background/background-image on the global #side-panel-container. With multiple SidePanels, a closed instance can override the open panel’s background.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@NDCallahan NDCallahan force-pushed the feature/sidepanel-sizes branch from 09093b6 to 7dd88cc Compare March 18, 2026 20:16
@NDCallahan
Copy link
Contributor Author

@cubic recheck

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Mar 18, 2026

@cubic recheck

@NDCallahan I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 7 files

Confidence score: 2/5

  • There is a clear runtime breakage risk: packages/client/src/components/app/SidePanel.svelte removed handleSidePanelClose while a live call remains, which is likely to throw a ReferenceError when users close the panel.
  • packages/client/src/components/app/Layout.svelte appears to introduce a user-facing layout regression by forcing size--max to 400px, which can incorrectly constrain views expected to be full width.
  • Given one high-confidence functional error plus a likely UI regression, this is high merge risk until these are corrected.
  • Pay close attention to packages/client/src/components/app/SidePanel.svelte, packages/client/src/components/app/Layout.svelte - close-handler runtime failure and max-width behavior regression.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/client/src/components/app/SidePanel.svelte">

<violation number="1" location="packages/client/src/components/app/SidePanel.svelte:47">
P1: Removed `handleSidePanelClose` definition leaves a live call site that will throw `ReferenceError` when the panel closes.</violation>
</file>

<file name="packages/client/src/components/app/Layout.svelte">

<violation number="1" location="packages/client/src/components/app/Layout.svelte:556">
P2: `size--max` now forces a 400px width, but this class is still used for “Max” page/nav widths. This regresses full-width layouts by constraining them to 400px.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@NDCallahan
Copy link
Contributor Author

@cubic recheck please

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Mar 18, 2026

@cubic recheck please

@NDCallahan I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 7 files

Confidence score: 3/5

  • There is some real merge risk: packages/client/src/components/app/SidePanel.svelte has a concrete user-facing UI regression where a closed panel can clear the shared container background and override the active panel, leading to incorrect/flickering state.
  • A second medium issue in packages/client/src/components/app/SidePanel.svelte can cause reactive churn in builder mode because setSize updates the store even when size is unchanged, which may create self-retriggering updates while open and effectiveSize stay constant.
  • Given one clear UI behavior bug (6/10, high confidence) plus a likely reactive loop/perf concern, this lands as moderate risk rather than merge-blocking.
  • Pay close attention to packages/client/src/components/app/SidePanel.svelte - shared background state cleanup and size-update reactivity need guarding to avoid flicker and update churn.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/client/src/components/app/SidePanel.svelte">

<violation number="1" location="packages/client/src/components/app/SidePanel.svelte:61">
P2: Builder-mode reactive block can re-trigger itself because setSize always updates the store even when size is unchanged, causing a reactive loop/churn when open and effectiveSize are constant.</violation>

<violation number="2" location="packages/client/src/components/app/SidePanel.svelte:95">
P2: Closed SidePanel instances clear the shared side-panel container background, so they can override the active panel’s background and cause incorrect/flickering UI state.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@NDCallahan
Copy link
Contributor Author

@cubic recheck one more time please. :)

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Mar 18, 2026

@cubic recheck one more time please. :)

@NDCallahan I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 7 files

Confidence score: 3/5

  • There is a concrete user-facing behavior risk in packages/client/src/components/app/SidePanel.svelte: reactive background updates from non-open panel instances can clear a shared container background while another panel is active.
  • packages/client/src/components/app/Layout.svelte also has a likely UI regression: .nav-toggle still renders but lost its base CSS, which can reduce click-target clarity and affordance for collapsing the left nav.
  • Given one medium-severity functional interaction issue (6/10) plus a confirmed styling regression (5/10), this looks mergeable with caution but carries some regression risk.
  • Pay close attention to packages/client/src/components/app/SidePanel.svelte and packages/client/src/components/app/Layout.svelte - shared background state conflicts and missing base .nav-toggle styling may impact active panel visuals and nav usability.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/client/src/components/app/SidePanel.svelte">

<violation number="1" location="packages/client/src/components/app/SidePanel.svelte:102">
P2: Reactive background updates from non-open SidePanel instances can clear the shared container background while another panel is active.</violation>
</file>

<file name="packages/client/src/components/app/Layout.svelte">

<violation number="1" location="packages/client/src/components/app/Layout.svelte:634">
P2: The `.nav-toggle` control is still rendered but its base CSS was removed, leaving only `:hover` and regressing click-target/affordance styling for left-nav collapse.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="hosting/docker-compose.yaml">

<violation number="1">
P1: CouchDB image was downgraded to `budibase/database:2.0.0` in the main compose manifest, creating DB version skew versus other deployment files pinned to `2.1.0`.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@NDCallahan
Copy link
Contributor Author

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)


Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="hosting/docker-compose.yaml">

<violation number="1">
P1: CouchDB image was downgraded to `budibase/database:2.0.0` in the main compose manifest, creating DB version skew versus other deployment files pinned to `2.1.0`.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

I remove this issue @cubic. Can you recheck

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Mar 18, 2026

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)


...

@NDCallahan I have started the AI code review. It will take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 6 files

Confidence score: 3/5

  • There is some merge risk: packages/client/src/components/app/SidePanel.svelte has a concrete behavior issue (6/10, high confidence) where reactive background effects run from every instance, so inactive panels can clear a shared container background.
  • packages/client/src/components/app/Layout.svelte also has a user-facing regression (5/10) where the left-nav collapse toggle remains clickable but lost its base .nav-toggle styling, which can reduce affordance and click-target consistency.
  • Pay close attention to packages/client/src/components/app/SidePanel.svelte and packages/client/src/components/app/Layout.svelte - cross-instance background side effects and nav-toggle styling regression can impact visible UI behavior.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/client/src/components/app/SidePanel.svelte">

<violation number="1" location="packages/client/src/components/app/SidePanel.svelte:102">
P2: Reactive background side effects are applied from every SidePanel instance, allowing inactive panels to clear the shared container background.</violation>
</file>

<file name="packages/client/src/components/app/Layout.svelte">

<violation number="1" location="packages/client/src/components/app/Layout.svelte:634">
P2: The clickable left-nav collapse toggle lost its base `.nav-toggle` styling while still being interactive, degrading click affordance and target consistency.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

: $component.styles

// Apply / remove background on the container whenever open or bg changes.
$: applyContainerBackground(open, panelBgColor, panelBgImage)
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Reactive background side effects are applied from every SidePanel instance, allowing inactive panels to clear the shared container background.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/client/src/components/app/SidePanel.svelte, line 102:

<comment>Reactive background side effects are applied from every SidePanel instance, allowing inactive panels to clear the shared container background.</comment>

<file context>
@@ -44,12 +46,88 @@
+    : $component.styles
+
+  // Apply / remove background on the container whenever open or bg changes.
+  $: applyContainerBackground(open, panelBgColor, panelBgImage)
+
   const handleSidePanelClose = async () => {
</file context>
Suggested change
$: applyContainerBackground(open, panelBgColor, panelBgImage)
$: if (open) {
applyContainerBackground(true, panelBgColor, panelBgImage)
}
Fix with Cubic

flex-shrink: 0;
align-self: flex-start;
}
/* Note: size variants are defined earlier; keep those as the source of width values. */
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The clickable left-nav collapse toggle lost its base .nav-toggle styling while still being interactive, degrading click affordance and target consistency.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/client/src/components/app/Layout.svelte, line 634:

<comment>The clickable left-nav collapse toggle lost its base `.nav-toggle` styling while still being interactive, degrading click affordance and target consistency.</comment>

<file context>
@@ -615,22 +631,7 @@
-    flex-shrink: 0;
-    align-self: flex-start;
-  }
+  /* Note: size variants are defined earlier; keep those as the source of width values. */
   .nav-toggle:hover {
     background-color: rgba(255, 255, 255, 0.25);
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant