This PR adds a component to format numbers in a consistent way. The intention is to centralise the logic for formatting numbers that lives in t-big-number, into a simple component. This will allow report authors to get consistent number formatting wherever they use this component. It will replace the logic in t-big-number in a separate PR.
This component will format the number to the 'en' locale until it reaches a threshold, and then it will be formatted using the 'compact' notation.
Notes for the reviewer
To test this component you can go follow the following steps
What this does
This PR adds a component to format numbers in a consistent way. The intention is to centralise the logic for formatting numbers that lives in t-big-number, into a simple component. This will allow report authors to get consistent number formatting wherever they use this component. It will replace the logic in
t-big-number
in a separate PR.This component will format the number to the 'en' locale until it reaches a threshold, and then it will be formatted using the 'compact' notation.
Notes for the reviewer
To test this component you can go follow the following steps
config.yml
file and replace the branch for topcoat-public with this branch name:Build and Sync Modules
(the cloud icon) in the left hand menut-formatted-number
in a report. Below is an example of usage in theenterprise_analytics.html
Missed anything?
More information
Screenshots / GIFs
Before
After