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
Number formatting using Intl.* APIs #14174
Number formatting using Intl.* APIs #14174
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.
Just a little spelling nit. But, also, a place missed is line 654 of compare.tsx
for the squashing dialog.
As for it working, I switched my region to Sweden, Spain, and France. It worked as expected for Sweden, but not for Spain or France. But, I figure the is the same issue that Sergio mentioned in slack so I am assuming not something for this PR.
app/src/lib/format-number.ts
Outdated
import QuickLRU from 'quick-lru' | ||
import { getFormattingLocales } from './formatting-locale' | ||
|
||
// Initializing a nuumber formatter is expensive but formatting is relatively |
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.
// Initializing a nuumber formatter is expensive but formatting is relatively | |
// Initializing a number formatter is expensive but formatting is relatively |
So this will also be affected by #14173 (comment). Given that we're switching to @sergiou87 @tidy-dev One thing that will change with this PR though is the compact format of commits > 1000. I think that's okay though even though that'll use |
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.
✨ Makes sense. :)
…-links Commit attribution descriptive links
Bumps [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) from 0.4.19 to 0.5.0. - [Release notes](https://github.com/Leonidas-from-XIV/node-xml2js/releases) - [Commits](Leonidas-from-XIV/node-xml2js@0.4.19...0.5.0) --- updated-dependencies: - dependency-name: xml2js dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
as it never had a "Visual Studio" prefix, which is a registered name
fix VSCodium name
Add icons for tabs in Repository settings dialog
…-0.5.0 Bump xml2js from 0.4.19 to 0.5.0
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Add support for VimR code editor on macOS.
…tip-on-checkbox-focus Open the changed file header tool tip on checkbox focus
Too many popups
Changes and History tab panels are syntaxed as such for screen readers
…ard-accessible Use toggle tip component for commit summary length hint
Tooltip for Committing Message Avatar is a toggle tip
Undo Confirmation Modal is an Alert Dialog
Shared formatter caching
Closes #1245
Description
Back in 2017 I wrote "I'm leaning towards trying to solve this properly." in response to our first attempt at fixing #1245 (#1257). Now, 5-ish years later technology has finally caught up to where we're able to do this with a relatively small amount of support logic 🎉Turns out ☝️ was a little bit premature, see #14173 (comment)
This builds upon #14173 and adds region-aware formatting of numbers.
I also took this opportunity to render the number of commits ahead/behind in a compact format (i.e number > 1000 will render as 1K). Hovering will get you the exact number but if you're behind by 1000 or more you likely don't care about the exact number.
There's a good chance I've missed a number of (pun intended) places where we present numbers to the user but that's okay, we can fix that incrementally.
Screenshots
Release notes
Notes: no-notes