Repository navigation
fix(splitter): fix pane resizing bugs and reach 100% coverage - #17772
Open
ivanvpetrov wants to merge 3 commits into
Open
ivanvpetrov wants to merge 3 commits into
ivanvpetrov wants to merge 3 commits into
Conversation
- honor % minSize/maxSize and current pointer position when dragging - always commit sizes and emit resizeEnd on drag end and keyboard resize - keep the bar in place when dragged across the resize direction - respect nonCollapsible for Ctrl + arrow keys - fall back to 'auto' for nullish pane size - remove dead keyboard and sibling lookup code
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Constraint edge cases can still produce negative sizes or ignore a valid zero maximum.
3 open findings
What changed in this PR
Fixes splitter resizing behavior across pointer, keyboard, constraints, and nullish pane sizes.
Changes:
- Corrects drag and keyboard resizing behavior and events.
- Adds percentage constraints and pane-fitting logic.
- Expands tests and updates documentation.
| File | Description |
|---|---|
splitter.component.ts |
Refactors resize calculations and interactions. |
splitter.component.spec.ts |
Adds resizing regression tests. |
splitter.component.html |
Simplifies sibling lookup. |
splitter-pane.component.ts |
Adds typing and nullish-size fallback. |
splitter-bar.component.html |
Uses enum values and removes drag direction. |
splitter/README.md |
Documents updated behavior. |
CHANGELOG.md |
Records fixes and behavioral changes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- cap the protected pane at the splitter size when fitting panes - treat a zero maxSize as a valid constraint - make the drag spec helper generic
ivanvpetrov
marked this pull request as ready for review
October 14, 2026 15:24
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Fixes several resizing bugs in
IgxSplitterComponent/IgxSplitterPaneComponent, removes dead code and brings the splitter unit test coverage to 100%.Bug fixes
minSize/maxSizevalues are now honored while resizing. Previously'40%'was parsed as40px.dragMovepageX/pageYhold the previous position (nextPageX/nextPageYare now used).resizeEnd, including when the pointer is released at the drag start point. Previously the temporary drag size stayed applied andresizeStarthad no matchingresizeEnd.Ctrl+ arrow keys no longer collapse panes whennonCollapsibleis set (the expanders were already disabled).sizetonull/undefinedno longer throws. The pane falls back to'auto'.Behavioral change
sizeand emitsresizeStart,resizingandresizeEndon each key press, as a pointer drag does. Previously only a temporary px size was applied,resizeEndwas never emitted and%/autopanes stopped adapting to the splitter size.Refactoring / dead code
switch(duplicatedpreventDefault, old non-standardup/down/left/rightkey names, emptydefault) is replaced with a key → action map.getPaneSiblingsByOrder(replaced by a template array), thedragDirgetter and the[dragDirection]binding, which no longer has any effect.onMoveEndsize conversion and read the splitter size once per call.anytypes in the pane and bar, and the magic numbers in the bar template.Docs
splitter/README.md: fixed the customization notes (pane/barorderand barnonCollapsibleare not public inputs), documented%min/max sizes, keyboard resize events and the nullishsizefallback.CHANGELOG.md: added Behavioral Changes and Bug Fixes entries.Motivation / Context
Splitter analysis and coverage pass. The component had uncovered drag handlers (
onDragMove,onDragEnd) and several resize bugs that showed up once the drag flow was tested with real pointer events.The drag handling is independent of #17744 (igxDrag cancel). That PR's cancel features are opt-in and not used by the splitter.
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Splitter (
IgxSplitterComponent,IgxSplitterPaneComponent, internalIgxSplitBarComponent)How Has This Been Tested?
Unit tests
Manual testing
Automated e2e tests
Added specs for pointer drag in both orientations (via real pointer events), dragging across the resize direction, releasing at the drag start point, keyboard resize commits and events, ignored keys,
nonCollapsiblewithCtrl+ arrows,%min/max sizes, nullishsizeand fitting the panes after the splitter shrinks. All new specs failed before the fix.Updated the existing keyboard specs to assert the rendered sizes instead of the temporary drag size, and replaced a transform spec that only emitted bar outputs directly with real pointer drag specs.
Splitter suite: 37/37 passing, stable over repeated runs. Coverage of
splitter.component.tsandsplitter-pane.component.ts: 100% statements / branches / functions / lines (previously 91% / 88.5% / 94.3% / 91% forsplitter.component.ts).npm run lint:libpasses. The splitter entry point compiles with strict templates.Test Configuration:
Screenshots / Recordings
N/A
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)