Skip to content

fix(ui): use percentage sizes for resizable panels after react-resizable-panels v4 bump [UX-1330]#2539

Merged
c-julin merged 1 commit into
masterfrom
jc/fix-resizable-panel-percent-sizes
Jun 26, 2026
Merged

fix(ui): use percentage sizes for resizable panels after react-resizable-panels v4 bump [UX-1330]#2539
c-julin merged 1 commit into
masterfrom
jc/fix-resizable-panel-percent-sizes

Conversation

@c-julin

@c-julin c-julin commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What

The SQL Studio editor pane (and the rp-connect pipeline YAML editor) render with the resize divider collapsed near the top — the editor shrinks to a ~42px strip while the results/lint pane takes the rest. Once you drag the divider it's fine, but it resets on every fresh load / panel remount.

Why

react-resizable-panels was bumped from v3 → v4 in #2528. In v4 the size parser treats a bare number as pixels, where v3 treated it as a percentage:

case "number": return [e, "px"];   // v4: bare number = pixels
// only a "42%"-suffixed string is parsed as percent

The SQL workspace and pipeline editor were written for v3 semantics (defaultSize={42} meaning 42%), so after the bump they became 42px / 70px strips.

Fix

Pass percentage strings so v4 reads them as percentages:

  • sql-workspace.tsx: editor defaultSize="42%" / minSize="15%", results minSize="20%"
  • rp-connect/pipeline/index.tsx: editor defaultSize="70%" / minSize="30%", lint defaultSize="30%"

These were the only two ResizablePanel usages with numeric size props.

Ref: UX-1330

…ble-panels v4 bump [UX-1330]

react-resizable-panels v4 (bumped from v3 in #2528) interprets bare
numeric defaultSize/minSize as pixels, not percentages. The SQL workspace
editor pane collapsed to a ~42px strip and the pipeline editor split was
similarly broken. Pass percentage strings so v4 reads them as percentages.
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Registry drift detected

App: frontend · Scope: diff vs origin/master · Files: 2

Count
⚠️ Outdated registry components 2
🛠 Locally-modified components 0
❓ Unknown to registry 0
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0
Components needing attention
Status Component Uses Detail
⚠️ outdated alert installed 2.1.2 → latest 2.2.0
⚠️ outdated badge installed 2.1.2 → latest 2.2.0

Refresh command:

bunx shadcn@latest add @redpanda/alert @redpanda/badge --overwrite

Generated by lookout audit-changes.

@c-julin c-julin merged commit 96810b0 into master Jun 26, 2026
17 of 18 checks passed
@c-julin c-julin deleted the jc/fix-resizable-panel-percent-sizes branch June 26, 2026 16:10
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.

2 participants