Skip to content

Commit ebd21f2

Browse files
Copilothotlong
andcommitted
Address PR review feedback: improve theming, i18n, and accessibility
- Remove deprecated theme="legacy" prop from AG Grid - Use browser locale for currency formatting instead of hardcoded en-US - Add aria-label to jump-to-page input for accessibility Co-authored-by: hotlong <[email protected]>
1 parent f4995c9 commit ebd21f2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/ui/src/components/grids/AdvancedDataGrid.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ const NumberCellRenderer = (props: ICellRendererParams & { fieldType?: FieldType
157157
let formatted = num.toLocaleString()
158158

159159
if (fieldType === 'currency') {
160-
formatted = new Intl.NumberFormat('en-US', {
160+
// TODO: Make locale and currency configurable via field config
161+
// For now, use browser's default locale with USD
162+
formatted = new Intl.NumberFormat(undefined, {
161163
style: 'currency',
162164
currency: 'USD',
163165
}).format(num)
@@ -494,7 +496,6 @@ export function AdvancedDataGrid({
494496
style={{ height: typeof height === 'number' ? `${height}px` : height, width: '100%' }}
495497
>
496498
<AgGridReact
497-
theme="legacy"
498499
ref={gridRef}
499500
rowData={data}
500501
columnDefs={columnDefs}

packages/ui/src/components/grids/GridPagination.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export function GridPagination({
147147
className="h-8 w-16"
148148
placeholder={(currentPage + 1).toString()}
149149
disabled={disabled || totalPages === 0}
150+
aria-label="Jump to page number"
150151
/>
151152
</form>
152153

0 commit comments

Comments
 (0)