Skip to content

DataGrid/TreeList: Split basic cell styles#32694

Merged
Alyar666 merged 21 commits intoDevExpress:26_1from
Alyar666:datagrid_scss_refactoring_26_1
Mar 4, 2026
Merged

DataGrid/TreeList: Split basic cell styles#32694
Alyar666 merged 21 commits intoDevExpress:26_1from
Alyar666:datagrid_scss_refactoring_26_1

Conversation

@Alyar666
Copy link
Contributor

No description provided.

@Alyar666 Alyar666 self-assigned this Feb 25, 2026
@Alyar666 Alyar666 requested a review from a team as a code owner February 25, 2026 17:04
Copilot AI review requested due to automatic review settings February 25, 2026 17:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the base Grid (DataGrid/TreeList) SCSS by extracting “basic cell styles” from gridBase/_index.scss into a new gridBase/layout/cell.scss mixin, then including that mixin from grid-base($widget-name).

Changes:

  • Added grid-base-cell($widget-name) mixin in layout/cell.scss and moved core cell-related rules into it.
  • Updated gridBase/_index.scss to @use the new layout module and @include grid-base-cell($widget-name).
  • Removed large inlined cell-style blocks from gridBase/_index.scss and adjusted a few selectors accordingly.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/devextreme-scss/scss/widgets/base/gridBase/layout/cell.scss New extracted mixin with core cell styles (positioning, overflow, sizing, borders, padding, etc.).
packages/devextreme-scss/scss/widgets/base/gridBase/_index.scss Imports and includes the new mixin; deletes/rewires the previously inlined rules.
Comments suppressed due to low confidence (1)

packages/devextreme-scss/scss/widgets/base/gridBase/_index.scss:75

  • grid-base-cell already defines the “last-row-border” behavior for cells (layout/cell.scss sets … > td { border-bottom-width: 0; }). Keeping this additional rule here is redundant, and as written it targets .dx-data-row rather than the tds (which is typically where the border is applied). Consider removing this block from _index.scss and keeping the single > td rule in layout/cell.scss.

@Alyar666 Alyar666 force-pushed the datagrid_scss_refactoring_26_1 branch from 975ba39 to da15869 Compare March 1, 2026 18:35
Copilot AI review requested due to automatic review settings March 1, 2026 20:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

@@ -0,0 +1,341 @@
/* stylelint-disable no-duplicate-selectors */
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The file disables no-duplicate-selectors for the entire stylesheet. This makes it easy for future changes to introduce accidental duplicates (including duplicates with conflicting properties) without lint feedback. Consider either consolidating the repeated selectors into single blocks (e.g. .dx-header-row > td, .dx-... .dx-command-expand) or scoping the suppression to the minimum necessary range (disable-next-line / disable + enable around specific blocks).

Suggested change
/* stylelint-disable no-duplicate-selectors */

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings March 1, 2026 23:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings March 2, 2026 11:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

packages/devextreme-scss/scss/widgets/base/gridBase/_index.scss:63

  • border-bottom-width: 0; is now applied to the .dx-data-row element instead of its cells. In this codebase the row borders are applied to > td, so this selector likely no longer removes the last-row border (and it also duplicates the correct > td rule that already exists in layout/cell.scss). Update this block to target > td (or remove it entirely and rely on the layout/cell.scss implementation).

Copilot AI review requested due to automatic review settings March 2, 2026 17:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

packages/devextreme-scss/scss/widgets/base/gridBase/_index.scss:63

  • The selector under .dx-last-row-border now sets border-bottom-width: 0 on .dx-data-row (the <tr>). In this codebase the last-row-border fix targets table cells (> td) (now implemented in layout/cell.scss), so keeping the <tr> rule here is redundant and likely has no effect. Consider removing this rule from _index.scss and relying on the > td rule in layout/cell.scss to avoid confusion/duplicate maintenance.

Copilot AI review requested due to automatic review settings March 2, 2026 17:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.

.dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-datagrid-content .dx-datagrid-table .dx-row.dx-column-lines > td.dx-datagrid-first-header.dx-datagrid-sticky-column-border-left {
border-left: 2px solid;
border-left-color: $datagrid-border-color;
}
Copy link
Contributor

@Raushen Raushen Mar 4, 2026

Choose a reason for hiding this comment

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

Why we do not use scss? These rules can be refactored, now they are too heavy. There is the style duplication everywhere:
.dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-datagrid-content .dx-datagrid-table .dx-row.dx-column-lines...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why we do not use scss? These rules can be refactored, now they are too heavy. There is the style duplication everywhere: .dx-rtl .dx-datagrid .dx-datagrid-sticky-columns .dx-datagrid-content .dx-datagrid-table .dx-row.dx-column-lines...

I agree that we can combine styles into shared selectors in some places. But let's do that later. I’ve added it to my to-do list.

@Alyar666 Alyar666 merged commit dde7931 into DevExpress:26_1 Mar 4, 2026
163 of 167 checks passed
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.

3 participants