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

docs(common): update currencyPipe default digitsInfo values #27417

Closed
wants to merge 1 commit into from
Closed

docs(common): update currencyPipe default digitsInfo values #27417

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 3, 2018

Change the docs to reflect the actual default values

Fixes #27414

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The docs say the digitsInfo has a minFractionDigits of 0 and a maxFractionDigits of 3.

Issue Number: #27414
Related to: #27079

What is the new behavior?

The docs say the digitsInfo has a minFractionDigits of 2 and a maxFractionDigits of 2.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Tests already exist to prove the scenarios for the defaults.
I apologize for a second PR for the same kind of issue, but I did not notice this until after the other PR. Would you rather have this added to the first PR?

Change the docs to reflect the actual default values

Fixes #27414
@brandonroberts brandonroberts added type: bug/fix comp: docs action: review The PR is still awaiting reviews from at least one requested reviewer area: common Issues related to APIs in the @angular/common package effort1: hours target: patch This PR is targeted for the next patch release risk: low state: community Someone from the Angular community is working on this issue or submitted this PR labels Dec 4, 2018
@ngbot ngbot bot added this to the Backlog milestone Dec 4, 2018
@ocombe
Copy link
Contributor

ocombe commented Dec 4, 2018

Thanks for catching this as well!

@@ -179,9 +179,9 @@ export class CurrencyPipe implements PipeTransform {
* - `minIntegerDigits`: The minimum number of integer digits before the decimal point.
* Default is `1`.
* - `minFractionDigits`: The minimum number of digits after the decimal point.
* Default is `0`.
* Default is `2`.

Choose a reason for hiding this comment

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

This doesn't sound right, from my testing it is 0, as in the docs: https://stackblitz.com/edit/angular-hqmbt7?file=src%2Fapp%2Fapp.component.html

* - `maxFractionDigits`: The maximum number of digits after the decimal point.
* Default is `3`.
* Default is `2`.
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't sound right, from my testing it is 3, as in the docs: https://stackblitz.com/edit/angular-hqmbt7?file=src%2Fapp%2Fapp.component.html

Choose a reason for hiding this comment

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

Oh wait, this is about the currency pipe, right? So indeed this change seems good: https://stackblitz.com/edit/angular-hqmbt7?file=src%2Fapp%2Fapp.component.html

@pkozlowski-opensource pkozlowski-opensource removed the action: review The PR is still awaiting reviews from at least one requested reviewer label Dec 14, 2018
Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM

@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Dec 14, 2018
@pkozlowski-opensource
Copy link
Member

Merge assistance as this needs g3 presubmit...

@pkozlowski-opensource pkozlowski-opensource removed their assignment Dec 14, 2018
@mhevery mhevery closed this in d0d351c Dec 14, 2018
mhevery pushed a commit that referenced this pull request Dec 14, 2018
Change the docs to reflect the actual default values

Fixes #27414
PR Close #27417
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
…27417)

Change the docs to reflect the actual default values

Fixes angular#27414
PR Close angular#27417
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package cla: yes effort1: hours merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note risk: low state: community Someone from the Angular community is working on this issue or submitted this PR target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
4 participants