Repository navigation
fix(Calendar): day and week numbers use the locale's digits - #9610
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DateRangeInput | 72.1 kB (+79 B) · 11.9 kB CSS (0) | — | — · — · — |
| DateInput · Storybook | 106.0 kB (+62 B) · 15.4 kB CSS (0) | 3,791 (+3) | ✓ · ✓ · ✓ |
| DateTimeInput | 162.6 kB (+58 B) · 17.1 kB CSS (0) | — | — · — · — |
7 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Calendar · Storybook | 54.7 kB (+57 B) · 10.4 kB CSS (0) | 1,649 (+3) | ✓ · ✓ · ✓ |
| PowerSearch | 194.4 kB (+50 B) · 21.6 kB CSS (0) | — | — · — · — |
| lab/MobilePowerSearch | 218.8 kB (+44 B) · 1.2 kB CSS (0) | — | — · — · — |
| Timestamp | 21.3 kB (+1 B) · 10.0 kB CSS (0) | — | — · — · — |
| lab/Comments | 259.2 kB (0) · 2.5 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 254.1 kB (0) · 2.4 kB CSS (0) | — | — · — · — |
| lab/Schedule | 62.0 kB (−1 B) · 3.9 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 6.23 MB packed (+469 B); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: core 2 rows; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Current run: CI concluded cancelled; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Looks good: Calendar's day and week numbers and the touch month panes now use the locale's digits through one shared helper, as component:Calendar FR1 requires, and the new fa-IR and ar-EG test cases fail without the change. The remaining step is the repository's spec-owner gate for the record edit: an engineering owner (you can do this yourself) comments /approve-spec with the head SHA.
[Automated review]
|
/approve-spec a9a20c4 |
There was a problem hiding this comment.
Looks good: Calendar's day and week numbers, and the touch month panes, now use the locale's digits through one shared helper, as the Calendar contract (FR1) requires. The new fa-IR and ar-EG cases fail without the change and pass with it, and Latin-digit locales render as before. No changes are needed.
[Automated review]
User impact
Under a locale whose numbering system is not Latin, such as
fa-IRorar-EG, Calendar's month heading shows the locale's digits (اکتبر ۲۰۲۶), but the day cells and week numbers show1 2 3…. The touch calendar's month panes in DateInput do the same. People reading Persian or Arabic-Indic digits get a mixed grid, and the day numbers do not match the heading above them.Problem and solution fit
A shared date helper now formats a day or week number in the provider locale's digits. Calendar's grid and the touch month panes use it.
Expected behavior and authority
component:CalendarFR1: "Day and week numbers MUST use the locale's digits (architecture:internationalizationINV8)." The record listed the ASCII digits as an implementation gap. This PR removes that gap from FR1, the contract table, and Current-state impact, and adds the new test to the verification map.architecture:internationalization: INV8 puts locale-sensitive formatting in shared helpers, and INV10 says a locale changes numbering, not the calendar.Smallest restoration
utils/plainDate.tsformats the number withIntl.NumberFormat, using the explicit locale and no grouping. The component does not callIntlitself.fa-IR, whose date formatters default to the Persian calendar.Evidence
fa-IRandar-EG, October 15, 2026 renders as15in Calendar and in the touch month pane.۱۵underfa-IRand١٥underar-EG, in both places. Week numbers follow the same digits.enstill renders15, and week numbers stay40–44.Calendar.test.tsxandDateInputTouch.test.tsxlocale-digit cases, andplainDate.test.tshelper cases, including the Gregorian day underfa-IR. Thefaandarcases fail with the rendering change reverted.Writing rubric results
Screenshots
Real Chromium against Storybook, October 2026 with week numbers.
fa-IRar-EGfa-IR, touch month paneenis unchanged:Scope
Testing
pnpm exec vitest run --project ui packages/core/src/Calendar packages/core/src/utils/plainDate.test.ts packages/core/src/DateInput: 700 passed.pnpm check:knowledge: passes.fa-IR,ar-EG, anden.