-
Notifications
You must be signed in to change notification settings - Fork 17
fix: format bytes columns and avoid refetch on column toggle #3149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
src/utils/tableUtils/getRequiredDataFields.ts, line 7 (link)logic: potential runtime error if column doesn't exist in columnsToFields
columnFieldswill be undefined if the column key doesn't exist, causingforEachto throw. Add null check:
23 files reviewed, 2 comments
src/utils/utils.ts
Outdated
| } | ||
|
|
||
| export function bytesToMB(bytes?: number | string, fractionDigits?: number) { | ||
| function formatMbWithMaxFractionDigits(value: number, fractionDigits?: number): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not formatBytes from src/utils/bytesParsers/formatBytes.ts suit you? It has precision and it properly formats number inside
|
|
||
| //sort ids to prevent refetch if only order was changed | ||
| const columnsIds = columns.map((column) => column.name).toSorted(); | ||
| const columnsIds = React.useMemo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be if !useColumnsIdsInRequest, columnsIds will be []? To avoid nullish coalescing in getNodes фтв getGroups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
23 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
18 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
17 files reviewed, 2 comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
17 files reviewed, no comments
Stand: https://nda.ya.ru/t/VsEVE-UU7Nw5yn
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 62.33 MB | Main: 62.32 MB
Diff: +1.00 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information