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

refactor(utils): Consolidate number formatting #9733

Merged
merged 4 commits into from
May 11, 2022

Conversation

Twixes
Copy link
Collaborator

@Twixes Twixes commented May 11, 2022

Changes

Stepping on toes a little bit to consolidate humanFriendlyNumber() and maybeAddCommasToInteger(), which were used almost interchangeably to format numbers following #9725. Only the former is now used. The comma is used as thousands separator. I was earlier in favor of using the space but sadly that doesn't look as readable in more cramped contexts (such as the trends tooltip).

@Twixes Twixes requested review from clarkus and liyiy May 11, 2022 10:11
Copy link
Contributor

@liyiy liyiy left a comment

Choose a reason for hiding this comment

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

🍏

@Twixes Twixes merged commit 2fb2303 into master May 11, 2022
@Twixes Twixes deleted the consolidate-number-formatting branch May 11, 2022 15:55
alexkim205 pushed a commit that referenced this pull request May 23, 2022
* refactor(utils): Consolidate number formatting

* Use unbreakable space

* Use comma as thousands separator

* Update utils.test.ts
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.

3 participants