Skip to content

Commit b630a80

Browse files
authored
fix(AnalyticalTable): update column header icons to align with latest spec (#6598)
1 parent 5127134 commit b630a80

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

packages/main/src/components/AnalyticalTable/ColumnHeader/ColumnHeader.module.css

+5
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@
4949
display: flex;
5050
justify-content: center;
5151
}
52+
53+
.icon {
54+
height: 0.8125rem;
55+
width: 0.8125rem;
56+
}

packages/main/src/components/AnalyticalTable/ColumnHeader/index.tsx

+19-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { VirtualItem, Virtualizer } from '@tanstack/react-virtual';
2+
import IconDesign from '@ui5/webcomponents/dist/types/IconDesign.js';
23
import iconFilter from '@ui5/webcomponents-icons/dist/filter.js';
34
import iconGroup from '@ui5/webcomponents-icons/dist/group-2.js';
45
import iconSortAscending from '@ui5/webcomponents-icons/dist/sort-ascending.js';
@@ -112,15 +113,17 @@ export const ColumnHeader = (props: ColumnHeaderProps) => {
112113
style.textAlign = column.hAlign.toLowerCase() as any;
113114
}
114115

115-
if (column.isSorted) margin++;
116-
if (column.isGrouped) margin++;
117-
if (isFiltered) margin++;
116+
if (column.isSorted) margin += 0.8125;
117+
if (column.isGrouped) margin += 0.8125;
118+
if (isFiltered) margin += 0.8125;
118119

119120
if (margin === 0) {
120121
return style;
121122
}
122123

123-
if (margin > 0) margin += 0.5;
124+
if (margin > 0) {
125+
margin += 0.75;
126+
}
124127

125128
style.marginInlineEnd = `${margin}rem`;
126129

@@ -218,11 +221,20 @@ export const ColumnHeader = (props: ColumnHeaderProps) => {
218221
className={classNames.iconContainer}
219222
data-component-name={`AnalyticalTableHeaderIconsContainer-${columnId}`}
220223
>
221-
{isFiltered && <Icon name={iconFilter} aria-hidden />}
224+
{isFiltered && (
225+
<Icon design={IconDesign.NonInteractive} name={iconFilter} aria-hidden className={classNames.icon} />
226+
)}
222227
{column.isSorted && (
223-
<Icon name={column.isSortedDesc ? iconSortDescending : iconSortAscending} aria-hidden />
228+
<Icon
229+
design={IconDesign.NonInteractive}
230+
name={column.isSortedDesc ? iconSortDescending : iconSortAscending}
231+
aria-hidden
232+
className={classNames.icon}
233+
/>
234+
)}
235+
{column.isGrouped && (
236+
<Icon design={IconDesign.NonInteractive} name={iconGroup} aria-hidden className={classNames.icon} />
224237
)}
225-
{column.isGrouped && <Icon name={iconGroup} aria-hidden />}
226238
</div>
227239
</div>
228240
{hasPopover && popoverOpen && (

0 commit comments

Comments
 (0)