hackoregon / civic

The frontend monorepo for the CIVIC platform.
http://civicplatform.org
MIT License
60 stars 26 forks source link

Improvements to civicFormat #1221

Open jaronheard opened 4 years ago

jaronheard commented 4 years ago

Is your feature request related to a problem? Please describe. As a user of the civicFormat utility, there are a couple of pain points that I'd like address

  1. It's hard to remember what each formatting utility does
  2. The numeric and dollars utilities do a lot of rounding (1,342,043 displays as 1.3 million), and it would be nice to have those same utilities but without the rounding as an option

Describe the solution you'd like

  1. exactDollars & exactNumeric utilities that display the whole numbers.
  2. A story that shows the use of each civicFormat utility applied to a range of different values

Describe alternatives you've considered You could add a custom precision, or solve for the common use cases.

Additional context Was working on openelectionsportland.org