-
Notifications
You must be signed in to change notification settings - Fork 165
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
Fix number formatting #408
Fix number formatting #408
Conversation
Only places I could find which used the locale-dependant call to |
For now I've implemented static number formatting, but perhaps this could be included in the site configuration and passed along where necessary |
Thank you for catching this! Instead of requiring the use of |
8a37ee6
to
97e5594
Compare
I've implemented it as an extension on FormatStyle directly, much cleaner this way. Also took the liberty of using up to 3 decimal places for opacity, but kept the rest single-decimal precision. Could make the default 3 decimal places always? |
Awesome! Could we make the extension a little more concise? nonLocalizedDecimal(_ decimalPlaces: Int = 1) ?
I like the way you have it 🙂 |
Let me know 🙏 |
Also I see that we might be having a race condition since the changes to the PublishingContext were made, as last tests failed with |
How about |
Yes, the way we're currently approaching tests doesn't play nice with |
b5222f5
to
157829f
Compare
Done, using |
Excellent—thank you! |
I wonder if there are many other places where we use the user's localized number formatting instead of a static
en-US
format. Will double check the codebase and report back