Skip to content

refactor(uikit-playground,deps): Update react-split-pane - #41118

Merged
ggazzo merged 1 commit into
developfrom
refactor/uikit-playground-split-pane
Jun 30, 2026
Merged

refactor(uikit-playground,deps): Update react-split-pane#41118
ggazzo merged 1 commit into
developfrom
refactor/uikit-playground-split-pane

Conversation

@tassoevan

@tassoevan tassoevan commented Jun 30, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

It upgrade react-split-pane to match React version requirement.

Issue(s)

Steps to test or reproduce

Further comments

Review in cubic

Task: ARCH-2197

Summary by CodeRabbit

  • Bug Fixes
    • Updated the split-pane experience to work with a newer library version.
    • Improved layout behavior by applying size limits directly to panes and adjusting resizing for tablet vs. non-tablet views.

@tassoevan tassoevan added this to the 8.7.0 milestone Jun 30, 2026
@tassoevan
tassoevan requested a review from a team June 30, 2026 17:05
@dionisio-bot

dionisio-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 58639ab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH-2167

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Upgrades react-split-pane from ^0.1.92 to ^3.2.0 in package.json and migrates SplitPlaneContainer to the v3 API by switching to named imports (Pane, SplitPane), replacing splitPaneProps with explicit minSize/maxSize on Pane components, and adding resizable={!isTablet} to SplitPane.

Changes

react-split-pane v3 upgrade

Layer / File(s) Summary
Dependency bump and component migration
apps/uikit-playground/package.json, apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx
Bumps react-split-pane to ^3.2.0 and migrates the component to the v3 named-export API: replaces default import with Pane/SplitPane named imports, removes splitPaneProps (defaultSize, allowResize), and applies minSize/maxSize directly to Pane wrappers with resizable={!isTablet} on SplitPane.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: upgrading react-split-pane in the UIKit playground.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx`:
- Around line 28-29: `SplitPlaneContainer` computes `maxSize` from
`previewSize.inlineSize` in a way that can go negative on the first render
before `useResizeObserver` populates `contentBoxSize`, which creates an invalid
`<Pane>` constraint. Update the `maxSize` calculation in
`SplitPlaneContainer.tsx` to clamp it to a safe non-negative value and ensure it
never falls below `minSize`, keeping the existing `minSize`/`maxSize`
relationship valid even when `previewSize.inlineSize` is undefined or very
small.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 183b53ed-0d62-4477-9c56-c7e8d6b9bf76

📥 Commits

Reviewing files that changed from the base of the PR and between a158ae7 and 58639ab.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • apps/uikit-playground/package.json
  • apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx
🧠 Learnings (2)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx
🔇 Additional comments (2)
apps/uikit-playground/package.json (1)

38-38: LGTM!

apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx (1)

3-3: LGTM!

Also applies to: 37-44

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 3 files

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="apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx">

<violation number="1" location="apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx:29">
P1: `maxSize` can be smaller than `minSize`, creating invalid pane constraints. This can break SplitPane sizing on initial/compact renders.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

allowResize: !isTablet,
};
const minSize = 300;
const maxSize = (previewSize.inlineSize || 1) - 350;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1: maxSize can be smaller than minSize, creating invalid pane constraints. This can break SplitPane sizing on initial/compact renders.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/uikit-playground/src/Components/Preview/SplitPlaneContainer/SplitPlaneContainer.tsx, line 29:

<comment>`maxSize` can be smaller than `minSize`, creating invalid pane constraints. This can break SplitPane sizing on initial/compact renders.</comment>

<file context>
@@ -25,22 +25,22 @@ const SplitPlaneContainer = ({ previewSize }: SplitPlaneContainerProps) => {
-		allowResize: !isTablet,
-	};
+	const minSize = 300;
+	const maxSize = (previewSize.inlineSize || 1) - 350;
 
 	return isTablet ? (
</file context>
Suggested change
const maxSize = (previewSize.inlineSize || 1) - 350;
const maxSize = Math.max(minSize, (previewSize.inlineSize ?? 0) - 350);

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.84%. Comparing base (a158ae7) to head (58639ab).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #41118   +/-   ##
========================================
  Coverage    69.84%   69.84%           
========================================
  Files         3393     3393           
  Lines       130748   130748           
  Branches     22776    22788   +12     
========================================
  Hits         91326    91326           
+ Misses       36071    36068    -3     
- Partials      3351     3354    +3     
Flag Coverage Δ
unit 69.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ggazzo
ggazzo merged commit 6ca1ce7 into develop Jun 30, 2026
43 of 45 checks passed
@ggazzo
ggazzo deleted the refactor/uikit-playground-split-pane branch June 30, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants