Skip to content

fix(splitter): preserve pane sizes after collapse - 22.1.x - #17554

Merged
kdinev merged 4 commits into
22.1.xfrom
vkombov/fix-17545-22.1.x
Sep 8, 2026
Merged

fix(splitter): preserve pane sizes after collapse - 22.1.x#17554
kdinev merged 4 commits into
22.1.xfrom
vkombov/fix-17545-22.1.x

Conversation

@viktorkombov

Copy link
Copy Markdown
Contributor

Closes #17545

Description

This PR prevents IgxSplitterPane from losing its configured size after being collapsed and expanded.

Previously, collapsing a pane reset its siblings to size="auto", which caused horizontal panes to lose their previous width. The updated behavior:

  • Preserves pane sizes and min/max constraints.
  • Clears only temporary drag sizes.
  • Allows fixed-size siblings to fill the released space while a pane is collapsed.
  • Handles both runtime and initially collapsed panes.

Testing

Added coverage for horizontal and vertical splitters, fixed-size panes, initial collapse, and temporary drag-size cleanup.

Motivation / Context

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

@mddragnev mddragnev added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Sep 1, 2026
Copilot AI lite review requested due to automatic review settings September 8, 2026 11:31

Copilot AI 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.

🟢 Approval recommended

The behavioral change is narrowly scoped to collapse/expand sizing, aligns with the reported issue/acceptance criteria, and is covered by targeted unit tests for the key scenarios.

Pull request overview

This PR fixes IgxSplitterPane collapse/expand behavior so panes retain their configured sizes (and min/max constraints) after being collapsed and then expanded, addressing #17545 and preventing sibling panes from being reset to size="auto".

Changes:

  • Removed the “reset all pane sizes when any pane is collapsed” initialization behavior in IgxSplitterComponent.
  • Updated IgxSplitterPaneComponent collapse handling to preserve configured sizes, clear only temporary dragSize, and allow adjacent fixed-size panes to flex-grow while a sibling is collapsed.
  • Added/updated unit tests to cover horizontal/vertical splitters, fixed-size behavior during collapse, initially-collapsed panes, and drag-size cleanup.
File summaries
File Description
projects/igniteui-angular/splitter/src/splitter/splitter.component.ts Stops resetting pane sizes during pane initialization when panes are collapsed, enabling size preservation across collapse/expand.
projects/igniteui-angular/splitter/src/splitter/splitter.component.spec.ts Adds coverage validating size preservation, fixed-size fill behavior during collapse, initial-collapse constraints, and dragSize cleanup.
projects/igniteui-angular/splitter/src/splitter/splitter-pane/splitter-pane.component.ts Preserves size on collapse, clears only sibling dragSize, and adjusts flex-grow logic to let adjacent panes fill released space while collapsed.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread projects/igniteui-angular/splitter/src/splitter/splitter.component.spec.ts Outdated
Comment thread projects/igniteui-angular/splitter/src/splitter/splitter.component.spec.ts Outdated
@kdinev
kdinev enabled auto-merge (squash) September 8, 2026 11:45
@kdinev
kdinev merged commit 05b60cb into 22.1.x Sep 8, 2026
5 checks passed
@kdinev
kdinev deleted the vkombov/fix-17545-22.1.x branch September 8, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

splitter version: 22.1.x ✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants