Skip to content
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

Use invariant culture when generating CSS numeric values #1049

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

tlmii
Copy link
Member

@tlmii tlmii commented Nov 27, 2023

Fixes #841

It looks like the cause of this issue was the CSS numeric values being localized to include commas instead of decimal point. CSS requires it be a decimal point, but by default both ToString() and string interpolation will use the current culture.

I changed the one line that appears to be the culprit in TraceDetail.razor and one more in TraceDetail.razor.cs that could be generating invalid values. For the latter, it was string interpolation, where the guidance in .NET 6+ is to use string.Create.

I added #1048 to discuss the long term issues here because I think the string interpolation variant of this issue may not be as easy to solve.

@tlmii tlmii merged commit c2b1b8f into dotnet:main Nov 27, 2023
3 checks passed
@tlmii tlmii deleted the dev/culture-issue-on-traces branch November 27, 2023 23:06
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trace timeline seems wrong
2 participants