diff --git a/scss/widgets/base/dataGrid/_common.scss b/scss/widgets/base/dataGrid/_common.scss index 6256851fc951..d3b3b8c61c9e 100644 --- a/scss/widgets/base/dataGrid/_common.scss +++ b/scss/widgets/base/dataGrid/_common.scss @@ -30,7 +30,7 @@ } .dx-datagrid-group-panel { - display: inline-block; + display: flex; white-space: nowrap; width: 100%; touch-action: pinch-zoom; diff --git a/scss/widgets/generic/dataGrid/_index.scss b/scss/widgets/generic/dataGrid/_index.scss index 90e3d8270f1d..7ec48f869da1 100644 --- a/scss/widgets/generic/dataGrid/_index.scss +++ b/scss/widgets/generic/dataGrid/_index.scss @@ -37,6 +37,7 @@ padding: $generic-datagrid-cell-padding; border-top: $generic-grid-base-border-hidden; border-bottom: $generic-grid-base-border-hidden; + line-height: $generic-grid-base-group-panel-message-line-height; } .dx-group-panel-item { diff --git a/scss/widgets/generic/gridBase/_index.scss b/scss/widgets/generic/gridBase/_index.scss index b2539c974034..ec8e76cd1e5b 100644 --- a/scss/widgets/generic/gridBase/_index.scss +++ b/scss/widgets/generic/gridBase/_index.scss @@ -13,6 +13,7 @@ @use "../toolbar/colors" as *; @use "../button/mixins" as *; @use "../button/colors" as *; +@use "../button/sizes" as *; @use "../validation/colors" as *; // adduse @@ -29,7 +30,7 @@ $generic-grid-base-drag-header-second-shadow: 0 1px 3px $datagrid-drag-header-se $generic-grid-base-checkbox-icon-size: 16px; $generic-grid-base-checkbox-indeterminate-icon-size: 6px; $grid-masterdetail-padding: 20px; - +$generic-grid-base-group-panel-message-line-height: $generic-button-text-line-height; @mixin dx-set-checkbox-border-color-as-background() { @if $generic-color-postfix == ".contrast" { diff --git a/scss/widgets/material/dataGrid/_index.scss b/scss/widgets/material/dataGrid/_index.scss index a1752e625bc1..5748bb4538b4 100644 --- a/scss/widgets/material/dataGrid/_index.scss +++ b/scss/widgets/material/dataGrid/_index.scss @@ -37,6 +37,7 @@ padding: $material-datagrid-cell-padding 0; border-top: $material-grid-base-border-hidden; border-bottom: $material-grid-base-border-hidden; + line-height: $material-grid-base-group-panel-message-line-height; } .dx-group-panel-item { diff --git a/scss/widgets/material/gridBase/_index.scss b/scss/widgets/material/gridBase/_index.scss index 1d762ee51727..61ce26b44fce 100644 --- a/scss/widgets/material/gridBase/_index.scss +++ b/scss/widgets/material/gridBase/_index.scss @@ -16,6 +16,7 @@ @use "../toolbar/colors" as *; @use "../button/mixins" as *; @use "../button/colors" as *; +@use "../button/sizes" as *; @use "../validation/colors" as *; @use "../typography/sizes" as *; @@ -37,6 +38,7 @@ $material-grid-base-command-select-column-width: $material-grid-base-checkbox-si $material-grid-base-cell-vertical-padding: round(math.div($material-grid-base-cell-height - $material-grid-base-cell-line-height, 2)); $material-grid-base-cell-padding: $material-grid-base-cell-vertical-padding $material-grid-base-cell-horizontal-padding; $grid-masterdetail-padding: 16px; +$material-grid-base-group-panel-message-line-height: $material-button-text-line-height; @mixin grid-base($widget-name) { .dx-#{$widget-name}, diff --git a/testing/testcafe/tests/dataGrid/grouping/etalons/group-panel-message-align.png b/testing/testcafe/tests/dataGrid/grouping/etalons/group-panel-message-align.png new file mode 100644 index 000000000000..b6359e773449 Binary files /dev/null and b/testing/testcafe/tests/dataGrid/grouping/etalons/group-panel-message-align.png differ diff --git a/testing/testcafe/tests/dataGrid/grouping/etalons/groupingPanel.png b/testing/testcafe/tests/dataGrid/grouping/etalons/groupingPanel.png index d72e25defee7..38bf749ddba4 100644 Binary files a/testing/testcafe/tests/dataGrid/grouping/etalons/groupingPanel.png and b/testing/testcafe/tests/dataGrid/grouping/etalons/groupingPanel.png differ diff --git a/testing/testcafe/tests/dataGrid/grouping/grouping.ts b/testing/testcafe/tests/dataGrid/grouping/grouping.ts index 9b8dd6104aeb..63db047b921f 100644 --- a/testing/testcafe/tests/dataGrid/grouping/grouping.ts +++ b/testing/testcafe/tests/dataGrid/grouping/grouping.ts @@ -259,3 +259,46 @@ safeSizeTest('Empty header message should appear when all columns grouped and se }, }); }); + +test('Group panel message should be vertically aligned (T1186613)', async (t) => { + const { takeScreenshot, compareResults } = createScreenshotsComparer(t); + const dataGrid = new DataGrid('#container'); + + await t + .expect(await takeScreenshot('group-panel-message-align.png', dataGrid.getToolbar().element)) + .ok() + .expect(compareResults.isValid()) + .ok(compareResults.errorMessages()); +}).before(async () => createWidget('dxDataGrid', { + groupPanel: { + visible: true, + }, + showBorders: true, + searchPanel: { + visible: true, + }, + editing: { + allowAdding: true, + }, + toolbar: { + items: [ + 'groupPanel', + { + showText: 'always', + location: 'before', + name: 'addRowButton', + options: { + icon: null, + text: 'add a new row', + }, + }, { + location: 'before', + widget: 'dxTextBox', + options: { + width: 140, + text: 'TestTest', + }, + }, + ], + }, +}));