Skip to content

Conversation

@kunga
Copy link
Contributor

@kunga kunga commented Mar 28, 2024

No description provided.

@kunga kunga force-pushed the better-bytes-rendering branch from 66f0bea to b251244 Compare March 28, 2024 18:23
box-sizing: border-box;

// Make all numbers in the app monospace
font-variant-numeric: tabular-nums;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted font for TopShards table. It's different from font throughout the app. Instead I set monospace numbers everywhere in the app

it('should convert to size', () => {
expect(formatBytes({value: 100_000, size: 'b'})).toBe('100,000 B');
expect(formatBytes({value: 100_000_000_000_000, size: 'gb'})).toBe('100,000 GB');
expect(formatBytes({value: 100_000, size: 'b'})).toBe('100 000 B');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed broken tests

Comment on lines 4 to 11
import {Lang, i18n} from './i18n';

// Set space delimeter for all locales possible in project
Object.values(Lang).forEach((value) => {
if (numeral.locales[value]) {
numeral.locales[value].delimiters.thousands = ' ';
}
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You configured numeral almost correctly, but it seems you deleted "," in format string. In format "," is delimiter sign, not delimiter itself, so no delimiter was applied.

I made more simple delimiter override, so it should work and no so complex for future support

@artemmufazalov artemmufazalov force-pushed the better-bytes-rendering branch from 7e94038 to 8127004 Compare March 29, 2024 12:29
@artemmufazalov
Copy link
Member

Screen Shot 2024-03-29 at 15 27 23

@artemmufazalov artemmufazalov force-pushed the better-bytes-rendering branch from 8127004 to 23e0ef8 Compare March 29, 2024 12:43
@kunga
Copy link
Contributor Author

kunga commented Mar 29, 2024

Cool thanks for the improvements 🔥

@artemmufazalov artemmufazalov merged commit 5b42808 into ydb-platform:main Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants