Skip to content

Commit 793d87e

Browse files
authored
Merge branch 'main' into deps/pnpm-action-setup-2.x
2 parents e6e1ee7 + 87f4c96 commit 793d87e

File tree

54 files changed

+953
-684
lines changed

Some content is hidden

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

54 files changed

+953
-684
lines changed

packages/modules/data-widgets/CHANGELOG.md

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

77
## [Unreleased]
88

9+
## [2.8.5] DataWidgets - 2023-08-10
10+
11+
### Fixed
12+
13+
- We fixed an issue where a data grid's border went missing if the Hiding property (found in Column capabilities) was set to No.
14+
15+
### [2.6.0] DatagridDateFilter
16+
17+
#### Changed
18+
19+
- We changed the DOM Structure for date filter to appear inline with the container in order to make the component more accessible.
20+
21+
### [2.5.0] DatagridDropdownFilter
22+
23+
#### Changed
24+
25+
- We changed the DOM Structure for dropdown filter to appear inline with the container in order to make the component more accessible.
26+
27+
### [2.8.0] Datagrid
28+
29+
#### Changed
30+
31+
- We improved accessibility of the Datagrid widget.
32+
33+
- We changed the DOM Structure for filter options to appear inline with the container in order to make the component more accessible.
34+
35+
#### Fixed
36+
37+
- We fixed table header sticky position incorrectly overlap with dropdown.
38+
39+
### [1.3.4] Gallery
40+
41+
#### Fixed
42+
43+
- We improved accessibility of the Gallery widget.
44+
45+
### [1.1.2] TreeNode
46+
47+
#### Fixed
48+
49+
- We fixed Atlas icon unable to be shown on tree node.
50+
51+
- We fixed an issue where tree child not directly refreshed after updating the data.
52+
953
## [2.8.4] DataWidgets - 2023-07-13
1054

1155
### [2.7.5] Datagrid

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,34 @@
2828
}
2929

3030
.table-bordered-all {
31-
.th {
32-
border-top-width: 1px;
33-
border-top-style: solid;
31+
.th,
32+
.td {
3433
border-left-width: 1px;
3534
border-left-style: solid;
3635

3736
// Column for the visibility when a column can be hidden
3837
&.column-selector {
3938
border-left-width: 0;
39+
}
40+
41+
&:last-child,
42+
&.column-selector {
4043
border-right-width: 1px;
4144
border-right-style: solid;
4245
}
4346
}
47+
.th {
48+
border-top-width: 1px;
49+
border-top-style: solid;
50+
}
4451

4552
.td {
4653
border-bottom-width: 1px;
4754
border-bottom-style: solid;
48-
border-left-width: 1px;
49-
border-left-style: solid;
5055

5156
&.td-borders {
5257
border-top-width: 1px;
5358
}
54-
55-
// Column for the visibility when a column can be hidden
56-
&.column-selector {
57-
border-left-width: 0;
58-
border-right-width: 1px;
59-
border-right-style: solid;
60-
}
6159
}
6260
}
6361

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ $item-min-height: 32px;
174174
background: $background-color;
175175
border-radius: 8px;
176176
box-shadow: 0 2px 20px 1px rgba(5, 15, 129, 0.05), 0 2px 16px 0 rgba(33, 43, 54, 0.08);
177-
overflow-x: hidden;
178177
max-height: 40vh;
179178
z-index: 102;
180179
}
@@ -183,7 +182,6 @@ $item-min-height: 32px;
183182
background: $background-color;
184183
border-radius: 8px;
185184
box-shadow: 0 2px 20px 1px rgba(5, 15, 129, 0.05), 0 2px 16px 0 rgba(33, 43, 54, 0.08);
186-
overflow-x: hidden;
187185
max-height: 40vh;
188186
z-index: 140;
189187

@@ -214,6 +212,7 @@ $item-min-height: 32px;
214212

215213
.dropdown-container {
216214
flex: 1;
215+
position: relative;
217216

218217
.dropdown-triggerer {
219218
caret-color: transparent;
@@ -231,7 +230,7 @@ $item-min-height: 32px;
231230

232231
.dropdown-list {
233232
position: absolute;
234-
width: max-content;
233+
min-width: 100%;
235234
left: 0;
236235
margin: 0 $spacing-small;
237236
padding: 0;
@@ -279,10 +278,6 @@ $item-min-height: 32px;
279278
}
280279
}
281280

282-
.date-filter-container {
283-
z-index: 102;
284-
}
285-
286281
/**
287282
Icons
288283
*/
@@ -352,13 +347,13 @@ div:not(.table-compact) > .table {
352347
.th {
353348
.filter-selector {
354349
.filter-selectors {
355-
margin: 0 $spacing-medium;
350+
margin: 0;
356351
}
357352
}
358353

359354
.dropdown-container {
360355
.dropdown-list {
361-
margin: 0 $spacing-medium;
356+
margin: 0;
362357
}
363358
}
364359
}

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ $brand-primary: #264ae5 !default;
1717
$brand-light: #e6eaff !default;
1818
$grid-selected-row-background: $brand-light;
1919

20+
.sticky-sentinel {
21+
&.container-stuck {
22+
& + .table {
23+
.th {
24+
position: -webkit-sticky; /* Safari */
25+
position: sticky;
26+
z-index: 50;
27+
}
28+
}
29+
}
30+
}
31+
2032
.table {
2133
position: relative;
2234
border-width: 0;
@@ -46,10 +58,7 @@ $grid-selected-row-background: $brand-light;
4658
border-width: 0;
4759
border-color: $grid-border-color;
4860
padding: $spacing-medium;
49-
position: -webkit-sticky; /* Safari */
50-
position: sticky;
5161
top: 0;
52-
z-index: 50;
5362
min-width: 0;
5463

5564
/* Clickable column header (Sortable) */

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,13 @@ $border-color: #d7d7d7 !default;
9494
}
9595

9696
.react-datepicker__day--in-range:not(.react-datepicker__day--range-start, .react-datepicker__day--range-end),
97-
.react-datepicker__day--in-selecting-range:not(.react-datepicker__day--in-range, .react-datepicker__month-text--in-range, .react-datepicker__quarter-text--in-range, .react-datepicker__year-text--in-range, .react-datepicker__day--selecting-range-start) {
97+
.react-datepicker__day--in-selecting-range:not(
98+
.react-datepicker__day--in-range,
99+
.react-datepicker__month-text--in-range,
100+
.react-datepicker__quarter-text--in-range,
101+
.react-datepicker__year-text--in-range,
102+
.react-datepicker__day--selecting-range-start
103+
) {
98104
background-color: $day-range-background;
99105
color: $day-range-color;
100106

@@ -136,5 +142,5 @@ Space between the fields and the popup
136142
*/
137143
.react-datepicker-popper[data-placement^="bottom"] {
138144
margin-top: unset;
139-
padding-top: 8px;
145+
padding-top: 0;
140146
}

packages/pluggableWidgets/datagrid-date-filter-web/CHANGELOG.md

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

77
## [Unreleased]
88

9+
## [2.6.0] - 2023-08-10
10+
11+
### Changed
12+
13+
- We changed the DOM Structure for date filter to appear inline with the container in order to make the component more accessible.
14+
915
## [2.5.2] - 2023-06-21
1016

1117
### Fixed

packages/pluggableWidgets/datagrid-date-filter-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@mendix/datagrid-date-filter-web",
33
"widgetName": "DatagridDateFilter",
4-
"version": "2.5.2",
4+
"version": "2.6.0",
55
"description": "",
66
"copyright": "© Mendix Technology BV 2023. All rights reserved.",
77
"private": true,

packages/pluggableWidgets/datagrid-date-filter-web/src/components/DatePicker.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
import DatePickerComponent from "react-datepicker";
1515
import classNames from "classnames";
1616
import { isDate, isValid } from "date-fns";
17-
import { createPortal } from "react-dom";
1817
import replaceAllInserter from "string.prototype.replaceall";
1918
import { doubleMonthOrDayWhenSingle } from "../utils/utils";
2019
import CalendarIcon from "./CalendarIcon";
@@ -44,17 +43,13 @@ export const DatePicker = forwardRef(
4443
(props: DatePickerProps, ref: MutableRefObject<DatePickerComponent> | null): ReactElement => {
4544
const [open, setOpen] = useState(false);
4645
const buttonRef = useRef<HTMLButtonElement>(null);
47-
const portalRef = useRef<HTMLDivElement>(null);
46+
const dateFilterContainerRef = useRef<HTMLDivElement>(null);
4847
const id = useMemo(() => `datepicker_` + Math.random(), []);
49-
const Portal = createPortal(
50-
<div ref={portalRef} id={id} className="date-filter-container" style={{ position: "fixed" }} />,
51-
document.body
52-
);
5348

5449
const buttonClick = useCallback(() => {
5550
setOpen(open => !open);
5651
setTimeout(() => {
57-
(portalRef.current?.querySelector(".react-datepicker > button") as HTMLElement)?.focus();
52+
(dateFilterContainerRef.current?.querySelector(".react-datepicker > button") as HTMLElement)?.focus();
5853
}, 10);
5954
}, []);
6055

@@ -68,7 +63,7 @@ export const DatePicker = forwardRef(
6863

6964
return (
7065
<Fragment>
71-
{Portal}
66+
<div ref={dateFilterContainerRef} id={id} className="date-filter-container" />
7267
<span className="sr-only" id={`${props.id}-label`}>
7368
{props.screenReaderInputCaption}
7469
</span>

packages/pluggableWidgets/datagrid-date-filter-web/src/components/__tests__/__snapshots__/DatagridDateFilter.spec.tsx.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ exports[`Date Filter with single instance with multiple attributes renders corre
2222
</button>
2323
</div>
2424
</div>
25+
<div
26+
class="date-filter-container"
27+
id="datepicker_0.123456789"
28+
/>
2529
<span
2630
class="sr-only"
2731
id="DateFilter1-label"
@@ -89,6 +93,10 @@ exports[`Date Filter with single instance with single attribute renders correctl
8993
</button>
9094
</div>
9195
</div>
96+
<div
97+
class="date-filter-container"
98+
id="datepicker_0.123456789"
99+
/>
92100
<span
93101
class="sr-only"
94102
id="DateFilter1-label"

packages/pluggableWidgets/datagrid-date-filter-web/src/components/__tests__/__snapshots__/DatePicker.spec.tsx.snap

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
exports[`Date picker component renders correctly 1`] = `
44
[
5+
<div
6+
class="date-filter-container"
7+
id="datepicker_0.123456789"
8+
/>,
59
<span
610
class="sr-only"
711
id="undefined-label"
@@ -48,6 +52,10 @@ exports[`Date picker component renders correctly 1`] = `
4852

4953
exports[`Date picker component renders correctly when is not adjustable 1`] = `
5054
[
55+
<div
56+
class="date-filter-container"
57+
id="datepicker_0.123456789"
58+
/>,
5159
<span
5260
class="sr-only"
5361
id="undefined-label"
@@ -94,6 +102,10 @@ exports[`Date picker component renders correctly when is not adjustable 1`] = `
94102

95103
exports[`Date picker component renders correctly with a11y properties 1`] = `
96104
[
105+
<div
106+
class="date-filter-container"
107+
id="datepicker_0.123456789"
108+
/>,
97109
<span
98110
class="sr-only"
99111
id="undefined-label"
@@ -142,6 +154,10 @@ exports[`Date picker component renders correctly with a11y properties 1`] = `
142154

143155
exports[`Date picker component renders correctly with different locale and date format 1`] = `
144156
[
157+
<div
158+
class="date-filter-container"
159+
id="datepicker_0.123456789"
160+
/>,
145161
<span
146162
class="sr-only"
147163
id="undefined-label"

0 commit comments

Comments
 (0)