Skip to content

Commit e8e263e

Browse files
authored
TagBox - selectAll checkBox should be aligned correctly in fluent (T1252002)
1 parent a9864c3 commit e8e263e

10 files changed

+32
-3
lines changed

e2e/testcafe-devextreme/tests/editors/tagBox/common.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import TagBox from 'devextreme-testcafe-models/tagBox';
33
import { testScreenshot } from '../../../helpers/themeUtils';
44
import url from '../../../helpers/getPageUrl';
55
import { createWidget } from '../../../helpers/createWidget';
6+
import { safeSizeTest } from '../../../helpers/safeSizeTest';
67

78
fixture.disablePageReloads`TagBox`
89
.page(url(__dirname, '../../container.html'));
@@ -123,6 +124,25 @@ test('Select all checkbox should be focused by tab and closed by escape (T389453
123124
applyValueMode: 'useButtons',
124125
}));
125126

127+
safeSizeTest('TagBox with selection controls', async (t) => {
128+
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
129+
const tagBox = new TagBox('#container');
130+
131+
await t.click(tagBox.element);
132+
133+
await testScreenshot(t, takeScreenshot, 'TagBox with selection controls.png', {
134+
shouldTestInCompact: true,
135+
});
136+
137+
await t
138+
.expect(compareResults.isValid())
139+
.ok(compareResults.errorMessages());
140+
}, [300, 300]).before(async () => createWidget('dxTagBox', {
141+
items: [1, 2, 3, 4, 5, 6, 7],
142+
showSelectionControls: true,
143+
width: 300,
144+
}));
145+
126146
test('Placeholder is visible after items option change when value is not chosen (T1099804)', async (t) => {
127147
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
128148
const tagBox = new TagBox('#container');
5.75 KB
Loading
5.3 KB
Loading
5.41 KB
Loading
5.39 KB
Loading
4.82 KB
Loading
4.11 KB
Loading

packages/devextreme-scss/scss/widgets/fluent/common/_mixins.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,16 @@ $badge-invalid-bg: $base-invalid-color;
8989
}
9090

9191
.dx-list-select-all {
92+
margin-inline: $fluent-list-item-margin-inline;
9293
padding: $fluent-list-item-vertical-padding + 2px 0 $fluent-list-item-vertical-padding - 2px;
9394
}
9495

9596
.dx-list-items {
96-
margin-left: $fluent-list-vertical-padding;
97-
margin-right: $fluent-list-vertical-padding;
97+
margin-inline: $fluent-list-item-margin-inline;
98+
99+
.dx-list-select-checkbox {
100+
margin-inline: $fluent-list-item-checkbox-margin-inline;
101+
}
98102
}
99103

100104
.dx-list-item,

packages/devextreme-scss/scss/widgets/fluent/dropDownEditor/_index.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ $fluent-dropdowneditor-invalid-badge-size: $fluent-invalid-badge-size + $fluent-
128128
}
129129

130130
.dx-list-group-header,
131-
.dx-list-item-content {
131+
.dx-list-item-content,
132+
.dx-list-select-all-label {
132133
font-size: $fluent-dropdowneditor-list-font-size;
133134
line-height: $fluent-dropdowneditor-list-line-height;
134135
}

packages/devextreme-scss/scss/widgets/fluent/list/_sizes.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// adduse
44

55
$fluent-list-vertical-padding: 4px !default;
6+
$fluent-list-item-margin-inline: 4px !default;
7+
$fluent-list-item-checkbox-margin-inline: null !default;
68
$fluent-list-bottom-padding: 4px !default;
79
$fluent-list-searchbox-margin-bottom: 4px !default;
810
$fluent-list-item-height: null !default;
@@ -13,6 +15,7 @@ $fluent-list-group-header-vertical-padding: null !default;
1315
$fluent-list-next-button-horizontal-padding: null !default;
1416

1517
@if $size == "default" {
18+
$fluent-list-item-checkbox-margin-inline: 8px !default;
1619
$fluent-list-item-height: 32px !default;
1720
$fluent-list-item-vertical-padding: 6px !default;
1821
$fluent-list-item-horizontal-padding: 12px !default;
@@ -21,6 +24,7 @@ $fluent-list-next-button-horizontal-padding: null !default;
2124
}
2225

2326
@else if $size == "compact" {
27+
$fluent-list-item-checkbox-margin-inline: 4px !default;
2428
$fluent-list-item-height: 24px !default;
2529
$fluent-list-item-vertical-padding: 4px !default;
2630
$fluent-list-item-horizontal-padding: 8px !default;

0 commit comments

Comments
 (0)