Skip to content

Conversation

@alexiglesias93
Copy link
Member

Enables granular formatting of number and date values in the tags.
Any tag value that has a fs-list-formatdisplay attribute, can now also opt into all these attributes, which match the Intl.NumberFormat options for numbers and the Intl.DateTimeFormat() options:

  • fs-list-formatdisplay
  • fs-list-formatcompactdisplay
  • fs-list-formatcurrency
  • fs-list-formatcurrencydisplay
  • fs-list-formatcurrencysign
  • fs-list-formatcalendar
  • fs-list-formatdatestyle
  • fs-list-formatday
  • fs-list-formatdayperiod
  • fs-list-formatera
  • fs-list-formatformatmatcher
  • fs-list-formatfractionalseconddigits
  • fs-list-formathour
  • fs-list-formathour12
  • fs-list-formathourcycle
  • fs-list-formatlocalematcher
  • fs-list-formatminute
  • fs-list-formatmonth
  • fs-list-formatmaximumsignificantdigits
  • fs-list-formatmaximumfractiondigits
  • fs-list-formatminimumfractiondigits
  • fs-list-formatminimumintegerdigits
  • fs-list-formatminimumsignificantdigits
  • fs-list-formatnotation
  • fs-list-formatnumberingsystem
  • fs-list-formatroundingpriority
  • fs-list-formatroundingincrement
  • fs-list-formatroundingmode
  • fs-list-formatsecond
  • fs-list-formatsigndisplay
  • fs-list-formatstyle
  • fs-list-formattimestyle
  • fs-list-formattimezone
  • fs-list-formattimezonename
  • fs-list-formattrailingzerodisplay
  • fs-list-formatunit
  • fs-list-formatunitdisplay
  • fs-list-formatusegrouping
  • fs-list-formatweekday
  • fs-list-formatyear

@alexiglesias93 alexiglesias93 requested a review from Copilot August 29, 2025 17:55
@vercel
Copy link

vercel bot commented Aug 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
attributes Ready Ready Preview Comment Sep 2, 2025 8:02am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant