Skip to content

Commit cd866d2

Browse files
[WC-3088] DataGrid: Row selection indicator (#1907)
2 parents c73025b + c7d8ede commit cd866d2

File tree

48 files changed

+584
-272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+584
-272
lines changed

packages/modules/data-widgets/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- We enhanced datagrid selection UI with responsive container queries and improved layout styling for header and footer components.
12+
- We enhanced gallery selection UI with responsive container queries and improved layout styling for header and footer components to match datagrid implementation.
13+
914
## [3.6.1] DataWidgets - 2025-10-14
1015

1116
### [3.6.1] Datagrid

packages/modules/data-widgets/src/themesource/datawidgets/web/_datagrid.scss

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ $root: ".widget-datagrid";
311311
justify-content: flex-end;
312312
white-space: nowrap;
313313
align-items: baseline;
314-
margin: 16px;
314+
margin: 0 16px;
315315
color: $pagination-caption-color;
316316

317317
.paging-status {
@@ -397,6 +397,10 @@ $root: ".widget-datagrid";
397397
}
398398
}
399399

400+
&-top-bar {
401+
container: widget-datagrid-header / inline-size;
402+
}
403+
400404
&-content {
401405
overflow-x: auto;
402406
}
@@ -409,6 +413,10 @@ $root: ".widget-datagrid";
409413
display: contents;
410414
}
411415

416+
&-footer {
417+
container: widget-datagrid-footer / inline-size;
418+
}
419+
412420
&.widget-datagrid-selection-method-click {
413421
.tr.tr-selected .td {
414422
background-color: $grid-selected-row-background;
@@ -517,7 +525,7 @@ $root: ".widget-datagrid";
517525

518526
.widget-datagrid .widget-datagrid-load-more {
519527
display: block !important;
520-
margin: 0 auto;
528+
margin: 0;
521529
}
522530

523531
.infinite-loading.widget-datagrid-grid-body {
@@ -540,21 +548,30 @@ $root: ".widget-datagrid";
540548
grid-column: 1 / -1;
541549
}
542550

543-
:where(#{$root}-paging-bottom) {
551+
:where(#{$root}-paging-bottom, #{$root}-padding-top) {
544552
display: flex;
545553
flex-flow: row nowrap;
546554
align-items: center;
547555
}
548556

549-
:where(#{$root}-pb-start, #{$root}-pb-end, #{$root}-pb-middle) {
557+
:where(#{$root}-pb-end, #{$root}-tb-end) {
558+
display: flex;
559+
justify-content: flex-end;
560+
align-items: center;
561+
}
562+
563+
:where(#{$root}-pb-start, #{$root}-tb-start, #{$root}-pb-end, #{$root}-tb-end, #{$root}-pb-middle) {
550564
flex-grow: 1;
551565
flex-basis: 33.33%;
552566
min-height: 20px;
567+
height: 54px;
568+
padding: var(--spacing-small) 0;
553569
}
554570

555-
:where(#{$root}-pb-start) {
556-
margin-block: var(--spacing-medium);
571+
:where(#{$root}-pb-start, #{$root}-tb-start) {
557572
padding-inline: var(--spacing-medium);
573+
display: flex;
574+
align-items: center;
558575
}
559576

560577
#{$root}-clear-selection {
@@ -565,6 +582,15 @@ $root: ".widget-datagrid";
565582
color: var(--link-color);
566583
padding: 0;
567584
display: inline-block;
585+
586+
&:focus:not(:focus-visible) {
587+
outline: none;
588+
}
589+
590+
&:focus-visible {
591+
outline: 1px solid var(--brand-primary, $brand-primary);
592+
outline-offset: 2px;
593+
}
568594
}
569595

570596
@keyframes skeleton-loading {
@@ -578,3 +604,23 @@ $root: ".widget-datagrid";
578604
transform: rotate(1turn);
579605
}
580606
}
607+
608+
@container widget-datagrid-footer (width < 500px) {
609+
#{$root}-paging-bottom {
610+
flex-direction: column;
611+
:where(#{$root}-pb-start, #{$root}-pb-end, #{$root}-pb-middle) {
612+
width: 100%;
613+
justify-content: center;
614+
}
615+
}
616+
}
617+
618+
@container widget-datagrid-header (width < 500px) {
619+
#{$root}-padding-top {
620+
flex-direction: column-reverse;
621+
:where(#{$root}-tb-start, #{$root}-tb-end) {
622+
width: 100%;
623+
justify-content: center;
624+
}
625+
}
626+
}

packages/modules/data-widgets/src/themesource/datawidgets/web/_export-alert.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
display: flex;
2121
padding: 4px;
2222
&:focus-visible {
23-
outline: 1px solid $brand-primary;
23+
outline: 1px solid var(--brand-primary, $brand-primary);
2424
}
2525
}
2626
}

packages/modules/data-widgets/src/themesource/datawidgets/web/_gallery.scss

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,18 @@ $gallery-screen-md: $screen-md;
7575
}
7676

7777
.widget-gallery-filter,
78-
.widget-gallery-empty,
79-
.widget-gallery-pagination {
78+
.widget-gallery-empty {
8079
flex: 1;
8180
}
8281

82+
&-top-bar {
83+
container: widget-gallery-header / inline-size;
84+
}
85+
86+
&-footer {
87+
container: widget-gallery-footer / inline-size;
88+
}
89+
8390
/**
8491
Helper classes
8592
*/
@@ -91,20 +98,30 @@ $gallery-screen-md: $screen-md;
9198
width: inherit;
9299
}
93100

94-
:where(.widget-gallery-footer-controls) {
101+
:where(.widget-gallery-footer-controls, .widget-gallery-top-bar-controls) {
95102
display: flex;
96103
flex-flow: row nowrap;
104+
align-items: center;
97105
}
98106

99-
:where(.widget-gallery-fc-start) {
100-
margin-block: var(--spacing-medium);
101-
padding-inline: var(--spacing-medium);
107+
:where(.widget-gallery-fc-end, .widget-gallery-tb-end) {
108+
display: flex;
109+
justify-content: flex-end;
110+
align-items: center;
102111
}
103112

104-
:where(.widget-gallery-fc-start, .widget-gallery-fc-middle, .widget-gallery-fc-end) {
113+
:where(.widget-gallery-fc-start, .widget-gallery-tb-start, .widget-gallery-fc-end, .widget-gallery-tb-end) {
105114
flex-grow: 1;
106115
flex-basis: 33.33%;
107116
min-height: 20px;
117+
height: 54px;
118+
padding: var(--spacing-small) 0;
119+
}
120+
121+
:where(.widget-gallery-fc-start, .widget-gallery-tb-start) {
122+
padding-inline: var(--spacing-medium);
123+
display: flex;
124+
align-items: center;
108125
}
109126

110127
.widget-gallery-clear-selection {
@@ -115,4 +132,33 @@ $gallery-screen-md: $screen-md;
115132
color: var(--link-color);
116133
padding: 0;
117134
display: inline-block;
135+
136+
&:focus:not(:focus-visible) {
137+
outline: none;
138+
}
139+
140+
&:focus-visible {
141+
outline: 1px solid var(--brand-primary, $brand-primary);
142+
outline-offset: 2px;
143+
}
144+
}
145+
146+
@container widget-gallery-footer (width < 500px) {
147+
.widget-gallery-footer-controls {
148+
flex-direction: column;
149+
:where(.widget-gallery-fc-start, .widget-gallery-fc-end, .widget-gallery-fc-middle) {
150+
width: 100%;
151+
justify-content: center;
152+
}
153+
}
154+
}
155+
156+
@container widget-gallery-header (width < 500px) {
157+
.widget-gallery-top-bar-controls {
158+
flex-direction: column-reverse;
159+
:where(.widget-gallery-tb-start, .widget-gallery-tb-end) {
160+
width: 100%;
161+
justify-content: center;
162+
}
163+
}
118164
}
Loading

packages/pluggableWidgets/datagrid-dropdown-filter-web/src/hocs/withParentProvidedEnumStore.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function withParentProvidedEnumStore<P extends { filterable: boolean }>(
2222

2323
function useEnumFilterAPI(): Result<EnumFilterProps, APIError> {
2424
const ctx = useFilterAPI();
25-
const slctAPI = useRef<EnumFilterProps>(undefined);
25+
const slctAPI = useRef<EnumFilterProps | undefined>(undefined);
2626

2727
if (ctx.hasError) {
2828
return error(ctx.error);

packages/pluggableWidgets/datagrid-web/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
### Added
1010

11+
- We added configurable selection count visibility and clear selection button label template for improved row selection management.
12+
1113
- We fixed an issue where missing consistency checks for the captions were causing runtime errors instead of in Studio Pro
1214

1315
## [3.6.1] - 2025-10-14
-687 Bytes
Loading
-559 Bytes
Loading
-1.28 KB
Loading

0 commit comments

Comments
 (0)