Skip to content

Commit

Permalink
TreeList - Expand/collapse buttons are too close to column borders if…
Browse files Browse the repository at this point in the history
… the first column is a boolean column (T1223168) (DevExpress#27462)
  • Loading branch information
Raushen authored May 27, 2024
1 parent 34156fb commit 6828e54
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
8 changes: 7 additions & 1 deletion scss/widgets/base/_gridBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,14 @@

.dx-editor-cell {
max-width: 0;
padding: 0;
vertical-align: middle;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;

&:not(.dx-#{$widget-name}-cell-expandable) {
padding-left: 0;
}

.dx-texteditor,
.dx-texteditor-container {
Expand Down
5 changes: 4 additions & 1 deletion scss/widgets/material/gridBase/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ $material-grid-base-group-panel-message-line-height: $material-button-text-line-

&.dx-editor-cell:not(.dx-command-select) {
padding-right: 0;
padding-left: 0;

&:not(.dx-#{$widget-name}-cell-expandable) {
padding-left: 0;
}
}
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions testing/testcafe/tests/treeList/markup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { createScreenshotsComparer } from 'devextreme-screenshot-comparer';

import { changeTheme } from '../../helpers/changeTheme';
import { createWidget } from '../../helpers/createWidget';
import url from '../../helpers/getPageUrl';
import TreeList from '../../model/treeList';

fixture`Markup`
.page(url(__dirname, '../container.html'));

const tasksT1223168 = [{
Task_ID: 1,
Task_Subject: 'Plans 2015',
Task_Parent_ID: 0,
}, {
Task_ID: 2,
Task_Subject: 'Health Insurance',
Task_Parent_ID: 1,
}, {
Task_ID: 3,
Task_Subject: 'Training',
Task_Parent_ID: 2,
}];

['generic.light', 'material.blue.light'].forEach((theme) => {
test(`TreeList - Expand/collapse buttons are too close to column borders if the first column is a boolean column (T1223168) in ${theme}`, async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const treeList = new TreeList('#container');

await t
.expect(await takeScreenshot(`T1223168-expandable-${theme}`, treeList.element))
.ok()
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}).before(async () => {
await changeTheme(theme);
await createWidget('dxTreeList', {
dataSource: tasksT1223168,
keyExpr: 'Task_ID',
parentIdExpr: 'Task_Parent_ID',
autoExpandAll: true,
wordWrapEnabled: true,
showBorders: true,
columns: [{
dataField: 'test',
dataType: 'boolean',
}, 'Task_Subject'],
showColumnLines: true,
rowDragging: {
allowReordering: true,
},
});
}).after(async () => {
await changeTheme('generic.light');
});
});

0 comments on commit 6828e54

Please sign in to comment.