DataGrid: Fix header borders being cut off above the vertical scrollbar (T1306973)#34372
Open
Alyar666 wants to merge 7 commits into
Open
DataGrid: Fix header borders being cut off above the vertical scrollbar (T1306973)#34372Alyar666 wants to merge 7 commits into
Alyar666 wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a DataGrid visual defect where header borders are cut off in the area adjacent to the vertical scrollbar gutter (T1306973) by tagging header/footer views when scrollbar spacing is applied and adding theme-specific styling to render the missing border.
Changes:
- Add a
dx-*-scroller-spacingstate class toggled byColumnsView.setScrollerSpacing. - Add theme SCSS rules (generic/material/fluent) to draw a 1px border before the scrollbar gutter for headers when spacing is present (including RTL).
- Add Jest coverage for the class toggling behavior and an e2e screenshot test for the visual regression (LTR/RTL), including cleanup of injected scrollbar CSS.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/__internal/grids/grid_core/views/m_columns_view.ts | Toggles a new prefixed scroller-spacing class when scrollbar spacing is applied. |
| packages/devextreme/js/__internal/grids/grid_core/views/const.ts | Adds the scrollerSpacing class token to shared view constants. |
| packages/devextreme/js/__internal/grids/grid_core/views/tests/columns_view.integration.test.ts | New Jest test verifying the scroller-spacing class is toggled for headers/footer. |
| packages/devextreme/js/__internal/grids/grid_core/tests/mock/helpers/utils.ts | Extends test instance typing to include getView for view-level assertions. |
| packages/devextreme-scss/scss/widgets/material/gridBase/_index.scss | Adds header border rendering before scrollbar gutter when scroller-spacing is active (LTR/RTL). |
| packages/devextreme-scss/scss/widgets/generic/gridBase/_index.scss | Same visual fix for the generic theme (LTR/RTL). |
| packages/devextreme-scss/scss/widgets/fluent/gridBase/_index.scss | Same visual fix for the fluent theme (LTR/RTL). |
| e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts | Adds screenshot regression coverage for the header border near the scrollbar gutter (LTR/RTL) and removes injected scrollbar CSS after the test. |
added 2 commits
July 20, 2026 12:25
Comment on lines
+1495
to
+1498
| .css({ | ||
| paddingLeft: rtlEnabled ? width : '', | ||
| paddingRight: !rtlEnabled ? width : '', | ||
| }); |
Contributor
There was a problem hiding this comment.
Lets replace it with inline start/end paddings
Suggested change
| .css({ | |
| paddingLeft: rtlEnabled ? width : '', | |
| paddingRight: !rtlEnabled ? width : '', | |
| }); | |
| .css({ | |
| paddingInlineStart: '', | |
| paddingInlineEnd: width, | |
| }); |
Contributor
Author
There was a problem hiding this comment.
This behavior was already implemented; I didn't change it. However, let's see if we can adjust it, provided the change is relatively inexpensive.
Comment on lines
+1490
to
+1494
| const $element = this.element(); | ||
|
|
||
| $element && $element.css({ | ||
| paddingLeft: rtlEnabled ? width : '', | ||
| paddingRight: !rtlEnabled ? width : '', | ||
| }); | ||
| $element | ||
| ?.toggleClass(this.addWidgetPrefix(CLASSES.scrollerSpacing), !!width) | ||
| .css('paddingInlineEnd', width ? `${width}px` : ''); |
Comment on lines
+27
to
+31
| columnHeadersView.setScrollerSpacing(15); | ||
|
|
||
| expect(columnHeadersView.element().hasClass(SCROLLER_SPACING_CLASS)).toBe(true); | ||
| expect(columnHeadersView.element().css('paddingInlineEnd')).toBe('15px'); | ||
|
|
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.
No description provided.