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

Fix number abbreviation when the number is n-thousand #2261

Merged
merged 1 commit into from
Aug 16, 2020
Merged

Fix number abbreviation when the number is n-thousand #2261

merged 1 commit into from
Aug 16, 2020

Conversation

matteocontrini
Copy link
Contributor

Changes proposed in this pull request:

This commit fixes the method abbreviateNumber so that it behaves as stated in the JSDoc.

Previously, an input of 1234 would have produced 1K. With this change, the output will be 1.2K.

Reviewers should focus on:

/

Screenshot

/

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

This commit fixes the method `abbreviateNumber` so that it behaves as stated in the JSDoc.

Previously, an input of `1234` would have produced `1K`. With this change, the output will be `1.2K`.
@askvortsov1
Copy link
Sponsor Member

We'll merge this after the rewrite is merged.

@askvortsov1 askvortsov1 added this to the 0.1.0-beta.14 milestone Aug 16, 2020
@askvortsov1
Copy link
Sponsor Member

Actually, as there's no conflict, might as well merge this now.

@askvortsov1 askvortsov1 merged commit a9eb148 into flarum:master Aug 16, 2020
askvortsov1 pushed a commit that referenced this pull request Sep 6, 2020
This commit fixes the method `abbreviateNumber` so that it behaves as stated in the JSDoc.

Previously, an input of `1234` would have produced `1K`. With this change, the output will be `1.2K`.
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