feat: granular number and date formatting options for tags#741
Open
alexiglesias93 wants to merge 3 commits intomasterfrom
Open
feat: granular number and date formatting options for tags#741alexiglesias93 wants to merge 3 commits intomasterfrom
alexiglesias93 wants to merge 3 commits intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds granular formatting options for number and date values in tags by introducing support for Intl.NumberFormat and Intl.DateTimeFormat options through HTML attributes.
- Adds 38 new formatting attribute constants to support all Intl formatting options
- Refactors tag value formatting logic to use a dedicated formatValue function with comprehensive options
- Implements fallback error handling for locale formatting failures
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/list/src/utils/constants.ts | Defines new formatting attribute constants for number and date formatting options |
| packages/list/src/filter/tags.ts | Refactors formatting logic to support granular options and adds error handling |
| .changeset/fast-onions-march.md | Documents the feature addition as a minor version change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables granular formatting of number and date values in the tags.
Any tag value that has a
fs-list-formatdisplayattribute, can now also opt into all these attributes, which match the Intl.NumberFormat options for numbers and the Intl.DateTimeFormat() options:fs-list-formatdisplayfs-list-formatcompactdisplayfs-list-formatcurrencyfs-list-formatcurrencydisplayfs-list-formatcurrencysignfs-list-formatcalendarfs-list-formatdatestylefs-list-formatdayfs-list-formatdayperiodfs-list-formaterafs-list-formatformatmatcherfs-list-formatfractionalseconddigitsfs-list-formathourfs-list-formathour12fs-list-formathourcyclefs-list-formatlocalematcherfs-list-formatminutefs-list-formatmonthfs-list-formatmaximumsignificantdigitsfs-list-formatmaximumfractiondigitsfs-list-formatminimumfractiondigitsfs-list-formatminimumintegerdigitsfs-list-formatminimumsignificantdigitsfs-list-formatnotationfs-list-formatnumberingsystemfs-list-formatroundingpriorityfs-list-formatroundingincrementfs-list-formatroundingmodefs-list-formatsecondfs-list-formatsigndisplayfs-list-formatstylefs-list-formattimestylefs-list-formattimezonefs-list-formattimezonenamefs-list-formattrailingzerodisplayfs-list-formatunitfs-list-formatunitdisplayfs-list-formatusegroupingfs-list-formatweekdayfs-list-formatyear