Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Contrib > Added truncate and truncateAfter options to numeric pipe #1856

Merged
merged 7 commits into from
Jul 31, 2018

Conversation

Blackbaud-SteveBrush
Copy link
Member

Original contribution: #1823

Resolves: #1643

Jacob Wood and others added 2 commits July 12, 2018 11:15
To be consumed by future currency input control in development
Resolves: #1643
@blackbaud-johnly
Copy link
Contributor

Created #1857 to document the new options.

@codecov-io
Copy link

codecov-io commented Jul 30, 2018

Codecov Report

Merging #1856 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1856   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         412     414    +2     
  Lines        8614    8640   +26     
  Branches     1272    1278    +6     
======================================
+ Hits         8614    8640   +26
Impacted Files Coverage Δ
src/modules/numeric/numeric.pipe.ts 100% <100%> (ø)
src/modules/numeric/numeric.service.ts 100% <100%> (ø) ⬆️
src/modules/numeric/numeric.options.ts 100% <100%> (ø) ⬆️
src/modules/numeric/numeric.module.ts 100% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 264db4a...fabd8bd. Read the comment docs.

Copy link
Contributor

@blackbaud-conorwright blackbaud-conorwright left a comment

Choose a reason for hiding this comment

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

Just the one check for the default. Everything else looks fine 👍

@@ -2,4 +2,6 @@ export class NumericOptions {
public digits = 1;
public format = 'number';
public iso = 'USD';
public truncate = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure we want this to default to true? Won't that immediately truncate/"break" anyone currently using the skyNumeric filter?

Copy link
Member Author

Choose a reason for hiding this comment

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

@blackbaud-conorwright The “truncate” boolean is a new option, so we wouldn’t have to worry about a breaking change with that setting in particular.

Also, the pipe as it stands today truncates automatically; this would allow users to turn off the truncate ability altogether.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh alright. I know it's a new option and was worried that having a new option default to applying its effect would be a breaking change. Though if it was always truncating beforehand then this is correct. All good then 👍

@Blackbaud-SteveBrush Blackbaud-SteveBrush merged commit dbca363 into master Jul 31, 2018
@Blackbaud-SteveBrush Blackbaud-SteveBrush deleted the contrib-feature-numeric-truncate branch July 31, 2018 19:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants