Skip to content

feat(Layout): add natural boundaries and percent maxSize support#1053

Merged
tenphi merged 3 commits intomainfrom
fix-layout-panel-resize-bounds
Feb 25, 2026
Merged

feat(Layout): add natural boundaries and percent maxSize support#1053
tenphi merged 3 commits intomainfrom
fix-layout-panel-resize-bounds

Conversation

@tenphi
Copy link
Copy Markdown
Member

@tenphi tenphi commented Feb 25, 2026

Note

Medium Risk
Touches core layout sizing/resize behavior and introduces container resize tracking, which could cause regressions in panel clamping or re-render behavior across existing layouts, but is localized to Layout/Layout.Panel.

Overview
Adds natural boundary sizing for opposite Layout.Panels so left/right (or top/bottom) resizable panels can’t overlap and will auto-shrink on container resize, while reserving a configurable minimum content gap via new Layout prop minContentSize (default 320).

Extends Layout.Panel maxSize to accept CSS strings (notably percentages) by tracking container dimensions via ResizeObserver, resolving supported CSS sizes to pixels for drag clamping, and composing CSS --max-size (including min(...)) so visual constraints apply immediately. Storybook examples and a changeset document the new behaviors.

Written by Cursor Bugbot for commit 98630c3. This will update automatically on new commits. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Feb 25, 2026 11:54am
cube-ui-kit-cursor Ready Ready Preview, Comment Feb 25, 2026 11:54am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 25, 2026

🦋 Changeset detected

Latest commit: 98630c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

📦 NPM canary release

Deployed canary version 0.0.0-canary-b2f8ae7.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

🏋️ Size limit report

Name Size Passed?
All 356.48 KB (+0.13% 🔺) Yes 🎉
Tree shaking (just a Button) 60.52 KB (0% 🟰) Yes 🎉
Tree shaking (just tasty) 36.78 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

🧪 Storybook is successfully deployed!

Comment thread src/components/content/Layout/LayoutPanel.tsx
Comment thread src/components/content/Layout/LayoutPanel.tsx
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread src/components/content/Layout/LayoutPanel.tsx Outdated
@tenphi tenphi merged commit 9b68b79 into main Feb 25, 2026
17 checks passed
@tenphi tenphi deleted the fix-layout-panel-resize-bounds branch February 25, 2026 16:10
@github-actions github-actions Bot mentioned this pull request Feb 25, 2026
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