Skip to content

Commit eebfcd4

Browse files
committed
refactor: apply feedback
1 parent df7029f commit eebfcd4

File tree

5 files changed

+25
-34
lines changed

5 files changed

+25
-34
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,7 @@ $root: ".widget-datagrid";
481481

482482
&-spinner {
483483
justify-content: center;
484-
485-
&-full-width {
486-
width: 100%;
487-
}
484+
width: 100%;
488485

489486
&-margin {
490487
margin: 52px 0;
@@ -563,7 +560,7 @@ $root: ".widget-datagrid";
563560
align-items: center;
564561
}
565562

566-
#{$root}-btn-invisible {
563+
#{$root}-btn-link {
567564
cursor: pointer;
568565
background: transparent;
569566
border: none;

packages/pluggableWidgets/datagrid-web/src/components/SelectAllBar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { If } from "@mendix/widget-plugin-component-kit/If";
22
import { observer } from "mobx-react-lite";
3-
import { createElement } from "react";
3+
import { ReactNode } from "react";
44
import { useDatagridRootScope } from "../helpers/root-context";
55

6-
export const SelectAllBar = observer(function SelectAllBar(): React.ReactNode {
6+
export const SelectAllBar = observer(function SelectAllBar(): ReactNode {
77
const { selectAllBarViewModel: vm } = useDatagridRootScope();
88

99
if (!vm.isBarVisible) return null;
@@ -14,14 +14,14 @@ export const SelectAllBar = observer(function SelectAllBar(): React.ReactNode {
1414
<If condition={vm.isSelectAllVisible}>
1515
<button
1616
disabled={vm.isSelectAllDisabled}
17-
className="widget-datagrid-btn-invisible"
17+
className="widget-datagrid-btn-link"
1818
onClick={() => vm.onSelectAll()}
1919
>
2020
{vm.selectAllLabel}
2121
</button>
2222
</If>
2323
<If condition={vm.isClearVisible}>
24-
<button className="widget-datagrid-btn-invisible" onClick={() => vm.onClear()}>
24+
<button className="widget-datagrid-btn-link" onClick={() => vm.onClear()}>
2525
{vm.clearSelectionLabel}
2626
</button>
2727
</If>

packages/pluggableWidgets/datagrid-web/src/components/WidgetFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const SelectionCounter = observer(function SelectionCounter() {
4747
<If condition={selectionCountStore.selectedCountText !== ""}>
4848
<span className="widget-datagrid-selection-count">{selectionCountStore.selectedCountText}</span>
4949
&nbsp;
50-
<button className="widget-datagrid-btn-invisible" onClick={selectActionHelper.onClearSelection}>
50+
<button className="widget-datagrid-btn-link" onClick={selectActionHelper.onClearSelection}>
5151
{selectionCountStore.clearSelectionText}
5252
</button>
5353
</If>

packages/pluggableWidgets/datagrid-web/src/components/__tests__/__snapshots__/Table.spec.tsx.snap

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ exports[`Table renders the structure correctly 1`] = `
8282
/>
8383
 
8484
<button
85-
class="widget-datagrid-btn-invisible"
85+
class="widget-datagrid-btn-link"
8686
/>
8787
</div>
8888
<div
@@ -176,7 +176,7 @@ exports[`Table renders the structure correctly for preview when no header is pro
176176
/>
177177
 
178178
<button
179-
class="widget-datagrid-btn-invisible"
179+
class="widget-datagrid-btn-link"
180180
/>
181181
</div>
182182
<div
@@ -303,7 +303,7 @@ exports[`Table renders the structure correctly with column alignments 1`] = `
303303
/>
304304
 
305305
<button
306-
class="widget-datagrid-btn-invisible"
306+
class="widget-datagrid-btn-link"
307307
/>
308308
</div>
309309
<div
@@ -401,7 +401,7 @@ exports[`Table renders the structure correctly with custom filtering 1`] = `
401401
/>
402402
 
403403
<button
404-
class="widget-datagrid-btn-invisible"
404+
class="widget-datagrid-btn-link"
405405
/>
406406
</div>
407407
<div
@@ -495,7 +495,7 @@ exports[`Table renders the structure correctly with dragging 1`] = `
495495
/>
496496
 
497497
<button
498-
class="widget-datagrid-btn-invisible"
498+
class="widget-datagrid-btn-link"
499499
/>
500500
</div>
501501
<div
@@ -589,7 +589,7 @@ exports[`Table renders the structure correctly with dynamic row class 1`] = `
589589
/>
590590
 
591591
<button
592-
class="widget-datagrid-btn-invisible"
592+
class="widget-datagrid-btn-link"
593593
/>
594594
</div>
595595
<div
@@ -683,7 +683,7 @@ exports[`Table renders the structure correctly with empty placeholder 1`] = `
683683
/>
684684
 
685685
<button
686-
class="widget-datagrid-btn-invisible"
686+
class="widget-datagrid-btn-link"
687687
/>
688688
</div>
689689
<div
@@ -781,7 +781,7 @@ exports[`Table renders the structure correctly with filtering 1`] = `
781781
/>
782782
 
783783
<button
784-
class="widget-datagrid-btn-invisible"
784+
class="widget-datagrid-btn-link"
785785
/>
786786
</div>
787787
<div
@@ -885,7 +885,7 @@ exports[`Table renders the structure correctly with header filters and a11y 1`]
885885
/>
886886
 
887887
<button
888-
class="widget-datagrid-btn-invisible"
888+
class="widget-datagrid-btn-link"
889889
/>
890890
</div>
891891
<div
@@ -983,7 +983,7 @@ exports[`Table renders the structure correctly with header wrapper 1`] = `
983983
/>
984984
 
985985
<button
986-
class="widget-datagrid-btn-invisible"
986+
class="widget-datagrid-btn-link"
987987
/>
988988
</div>
989989
<div
@@ -1118,7 +1118,7 @@ exports[`Table renders the structure correctly with hiding 1`] = `
11181118
/>
11191119
 
11201120
<button
1121-
class="widget-datagrid-btn-invisible"
1121+
class="widget-datagrid-btn-link"
11221122
/>
11231123
</div>
11241124
<div
@@ -1212,7 +1212,7 @@ exports[`Table renders the structure correctly with paging 1`] = `
12121212
/>
12131213
 
12141214
<button
1215-
class="widget-datagrid-btn-invisible"
1215+
class="widget-datagrid-btn-link"
12161216
/>
12171217
</div>
12181218
<div
@@ -1396,7 +1396,7 @@ exports[`Table renders the structure correctly with resizing 1`] = `
13961396
/>
13971397
 
13981398
<button
1399-
class="widget-datagrid-btn-invisible"
1399+
class="widget-datagrid-btn-link"
14001400
/>
14011401
</div>
14021402
<div
@@ -1490,7 +1490,7 @@ exports[`Table renders the structure correctly with sorting 1`] = `
14901490
/>
14911491
 
14921492
<button
1493-
class="widget-datagrid-btn-invisible"
1493+
class="widget-datagrid-btn-link"
14941494
/>
14951495
</div>
14961496
<div
@@ -1665,7 +1665,7 @@ exports[`Table with selection method checkbox render an extra column and add cla
16651665
/>
16661666
 
16671667
<button
1668-
class="widget-datagrid-btn-invisible"
1668+
class="widget-datagrid-btn-link"
16691669
/>
16701670
</div>
16711671
<div
@@ -1887,7 +1887,7 @@ exports[`Table with selection method rowClick add class to each selected cell 1`
18871887
/>
18881888
 
18891889
<button
1890-
class="widget-datagrid-btn-invisible"
1890+
class="widget-datagrid-btn-link"
18911891
/>
18921892
</div>
18931893
<div

packages/pluggableWidgets/datagrid-web/src/components/loader/SpinnerLoader.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@ import { ReactElement } from "react";
44
type SpinnerLoaderProps = {
55
size?: "small" | "medium" | "large";
66
withMargins?: boolean;
7-
fullWidth?: boolean;
87
};
98

10-
export function SpinnerLoader({
11-
size = "medium",
12-
withMargins = false,
13-
fullWidth = true
14-
}: SpinnerLoaderProps): ReactElement {
9+
export function SpinnerLoader({ size = "medium", withMargins = false }: SpinnerLoaderProps): ReactElement {
1510
return (
1611
<div
1712
className={classNames("widget-datagrid-spinner", {
18-
"widget-datagrid-spinner-margin": withMargins,
19-
"widget-datagrid-spinner-full-width": fullWidth
13+
"widget-datagrid-spinner-margin": withMargins
2014
})}
2115
aria-busy
2216
aria-live="polite"

0 commit comments

Comments
 (0)