Splitter - set initial size for collapsed panels#32975
Splitter - set initial size for collapsed panels#32975dmlvr wants to merge 5 commits intoDevExpress:26_1from
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the internal Splitter sizing logic so panes that start in collapsed: true can restore their initially configured size when expanded, and adds/adjusts QUnit coverage in the Splitter widget test suite.
Changes:
- Capture configured
sizefor initially-collapsed panes and use it when calculating the expand delta (instead of always expanding to “half of neighbor”). - Export Splitter CSS class constants from the internal implementation and reuse them in tests.
- Add new QUnit tests covering size restoration for initially-collapsed panes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/ui/splitter/splitter.ts | Captures initial sizes for collapsed panes and uses them on first expand; exports internal CSS class constants. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.tests.js | Imports internal CSS class constants; adds tests for restoring configured size after expanding initially-collapsed panes. |
You can also share your feedback on Copilot code review. Take the survey.
packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.tests.js
Outdated
Show resolved
Hide resolved
packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.tests.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Updates the Splitter’s collapse/expand sizing logic so panes that start in a collapsed state can restore their configured initial size when expanded, and extends the widget’s test coverage for this scenario.
Changes:
- Track the configured size for initially-collapsed panes via an internal
_initialSizeBeforeCollapsefield and use it when expanding. - Refactor expand target-size calculation into
_getTargetPaneSize. - Update Splitter tests to use exported CSS class constants and add new test cases for initial collapsed-size restoration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/ui/splitter/splitter.ts | Captures initial configured size for collapsed panes and uses it to compute expansion target size; exports Splitter CSS class constants. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.tests.js | Imports Splitter CSS constants from the internal module and adds tests verifying restore behavior for initially-collapsed panes. |
No description provided.