Shopify / quilt

[⚠️ Deprecated] A loosely related set of packages for JavaScript/TypeScript projects at Shopify
MIT License
1.7k stars 220 forks source link

Formatting percentage ranges #2822

Closed karrocon closed 1 month ago

karrocon commented 1 month ago

Overview

We're using @shopify/react-i18n to format various text elements in our application. We have encountered a specific need to format percentage ranges in a concise and readable manner.

Type

Motivation

What inspired this feature request? What problems were you facing, or what else makes you think this should be in quilt?

We have a requirement to format ranges of tax rates as 5.25-10%. Currently, we do not have a utility method in @shopify/react-i18n to handle this specific formatting. Adding this feature would streamline our code and ensure consistency across our application.

Area

Scope


Checklist

karrocon commented 1 month ago

Closing as we've agreed on resolving this locally for our use-case. Feel free to re-open this once there's a real use-case out there