Skip to content

docs(spec): Calendar weekday headers show abbreviated names where they fit - #9072

Merged
imdreamrunner merged 1 commit into
mainfrom
spec/calendar-weekday-abbreviated
Nov 3, 2026
Merged

imdreamrunner merged 1 commit into
mainfrom
spec/calendar-weekday-abbreviated

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

Which form of the weekday name Calendar's column headers show, per locale.

Existing authority searched

  • component:Calendar (current, docs/specs/components/Calendar/Calendar.spec.md): FR1 says only that weekday names come from the provider locale. architecture:internationalization INV8 covers where locale data comes from, not name width. No current record settles the form.
  • Code: Calendar's headers use the CLDR stand-alone short width in every locale, from a checked-in generated table (Su–Sa in English). The touch date field's sheet already uses the abbreviated width (Sun–Sat).
  • Open PRs: none edits the Calendar record or the weekday headers.

Decision

component:Calendar DD1: a locale's weekday headers show its stand-alone abbreviated names (CLDR abbreviated width) when every one of the seven is at most four characters, and its stand-alone short names (CLDR short width) otherwise. Names are shown whole, and the choice is per locale, so a header row never mixes the two.

Result across the 30 shipped locales:

  • Abbreviated (switch): en (Sun), es, fr, sv, no, ro, el, sr, tr, de, zh-TW.
  • Short (keep): pt-PT, ar, he, pl, da, vi.
  • No visible change (both widths match): pt-BR, af, ca, hu, it, cs, fi, nl, ru, uk, zh-CN, ja, ko.

FR1 points to DD1. The headers still show short names everywhere, so the DD1 row, Current-state impact, and a verification-map evidence gap record that as an implementation gap. This PR changes no code.

Rejected alternatives

  • Cutting each name to three characters, which misnames days in locales whose abbreviations differ. Kept as one Rejected: line in DD1.
  • Abbreviated names in every locale. In the date-picker popover the pt-PT and ar names (full words) overlap, he crowds, pl niedz. touches its neighbour, and vi Thứ 2 wraps. DD1's intent states why those locales keep short.

Claim scope and non-goals

  • Covers the visible header text only. The header's accessible name, typography, column width, and how an over-wide name lays out stay uncontracted.
  • Arabic's short names are already tight in the md column today; that layout question is outside this decision.
  • Danish's 5-character abbreviated names happen to fit; the rule keeps it on short for one simple, data-only threshold.
  • The implementation (the generator choosing a width per locale into the same checked-in table, plus the day-name tests) is a separate PR.

Evidence and implementation relationship

  • Design request. In English, two-letter names make Tu and Th, or Sa and Su, easy to confuse.
  • Real-browser screenshots of the DateInput popover in all 30 shipped locales, comparing short and abbreviated names, set the four-character threshold.

Writing rubric results

  • R1 narration: none; DD1, its implementation gap, and the Current-state impact line are in the present tense.
  • R2 research in the record: none; the locale survey and screenshots stay out of the record.
  • R3 evidence naming a change: none; the DD1 verification row names the test cases.
  • R4 rejected alternatives over one line or outside a decision: one, inside DD1, one line.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none; no open question added.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract: none named.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; no ownership collision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge: aligned
  • Prettier: clean
  • git diff --check: clean
  • pnpm specs:for --diff origin/main: routed architecture:internationalization (INV8: names still come from provider-locale data) and the other component claims; no conflict
  • Approval groups for this change: spec and design (the Design decisions block and the record body both change)

@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 3, 2026 9:38pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 30, 2026
@astracat-bot

astracat-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 3, 2026, 9:40 PM UTC

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current change has no visual or preview-producing scope. Visual checks are not applicable; preview links are not shown.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on an owner decision. DD1 adds a weekday-header rule that no current spec on main states yet: whole abbreviated names, including full words in Arabic and European Portuguese. An engineering owner records that decision by commenting /approve-spec 986546d4aabca741c217874492d0537e4ccab3ba on this pull request, and the author may do so if they are an engineering owner. Two record fixes are needed whatever the decision:

  • Calendar.spec.md line 59 still says the released default is preserved, although DD1 changes every Calendar's header text.
  • The DD1 verification row tests English and one other locale, but English and the Spanish locale the current tests use both have three-letter abbreviations, so a header cut to three characters would still pass; name a locale with longer abbreviations, such as pl or pt-PT.

[Automated review]

@@ -57,8 +57,8 @@ keyboard model that moves through days; date fields compose it.
## Compatibility and migration

- Released default preserved: `yes`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

DD1 changes every Calendar's weekday headers from the short to the abbreviated names, with no prop to keep the short form, and line 45 already says the record departs from shipped behavior for that. This line should say so too, for example "yes, except DD1: no", naming the header change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in fd7a6ba: the row now requires a locale whose abbreviated names run past three characters, such as pl or pt-PT.

| FR6 | `Calendar.test.tsx` navigation, bound, theming-target ("renders the astryx-calendar-nav target on both month-nav buttons", "reflects the disabled nav state as a data attribute at the range edges", "keeps the default nav rendering unchanged (still a ghost icon button)"), and RTL month-navigation cases | Previous and Next; at `min` and `max`; `dir="rtl"` | A button enabled past a bound, a missing `calendar-nav` target or state attribute, or a lost shared chevron wrapper fails. Evidence gap: no test asserts focus kept at a bound (the FR6 gap), the mirrored chevron pixels, or the press under reduced motion. | `audit:Calendar/behavior` |
| FR7 | `Calendar.test.tsx` month-change announcement cases ("does not announce on initial render", "announces the new month politely when clicking next", "announces the next month when paging the grid with PageDown", "announces both months in a two-month view", "does not announce when selecting a date leaves the visible month unchanged") and range announcement cases ("announces the start pick and prompts for an end date", "announces the completed range in chronological order for a reverse pick") | Month buttons, Page keys, handle; single and two months; range start, complete, cleared | A missing, extra, or out-of-order announcement fails. Evidence gap: no test reaches the cleared-start announcement (the cleared-range case sets no `minRangeSpan`). | `audit:Calendar/accessibility` |
| FR2 (size) | Evidence gap: no test asserts day-button size or text growth | — | — | `audit:Calendar/layout` |
| DD1 | Evidence gap: the `Calendar.test.tsx` day-name cases ("displays day names", "uses the provider locale for stand-alone short day names", "rotates localized day names by numeric weekday index") assert the short names | English and one other locale; `weekStartsOn` rotation; with week numbers | A header showing a short name, or a name cut to three characters, fails. | `audit:Calendar/layout` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

English and es-ES (the locale the existing day-name cases use) both have three-letter abbreviated names, so a header cut to three characters would pass this row. Naming a second locale with longer abbreviations, such as pl or pt-PT, makes the stated failure detectable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in fd7a6ba: the row now requires a locale whose abbreviated names run past three characters, such as pl or pt-PT.

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 30, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on a spec owner deciding DD1 as the governing spec for Calendar's weekday headers: no current spec on main states that rule yet, and it shows whole abbreviated names, including full words in Arabic and European Portuguese that overrun the 32px day column. To settle it, an engineering owner comments /approve-spec fd7a6bae09fa026c2d5f78bf8f1604a87e714465 on this pull request (the author may do so as an engineering owner), or the owners ask for a shorter form in those locales; the repository's design-decision routing also asks for a design owner's review. The two record fixes from the earlier review are in, and nothing else needs to change.

[Automated review]

@github-actions
github-actions Bot deleted the branch spec-backfill/Calendar October 31, 2026 06:09
@imdreamrunner
imdreamrunner changed the base branch from spec-backfill/Calendar to main November 1, 2026 17:00
@imdreamrunner
imdreamrunner force-pushed the spec/calendar-weekday-abbreviated branch from fd7a6ba to c740152 Compare November 1, 2026 17:00

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on a spec owner deciding DD1 as the governing spec for Calendar's weekday headers: no current spec states the abbreviated-width rule yet, and it shows whole names, including full words in Arabic and European Portuguese that are wider than the 32px day column. To settle it, an engineering owner comments /approve-spec c74015220a9aa3e3ce184fc8e500fdb196f01d8a on this pull request (the author may do so as an engineering owner), or the owners ask for a shorter form in those locales; the repository's design-decision routing also asks for a design owner's review. Nothing else in the record needs to change.

[Automated review]

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec c740152

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 2, 2026
@imdreamrunner
imdreamrunner force-pushed the spec/calendar-weekday-abbreviated branch from c740152 to f00e24d Compare November 2, 2026 21:13
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

Rebased onto main to clear a conflict with main's new FR1 month-label sentence and its verification row. DD1 and everything else this PR changes read exactly as at c740152; the spec gate fingerprints the whole record, so it needs the design approval again on this head.

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec f00e24d

@imdreamrunner
imdreamrunner marked this pull request as draft November 2, 2026 21:22
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/revoke-spec f00e24d

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

Back to draft and not for merge yet: DD1 needs per-locale tuning first. In several shipped locales the abbreviated names do not fit the 32px header column (pt-PT and ar are full words; he, pl, vi also overflow). I'll revise DD1 with a per-locale rule and ask for review again.

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 2, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This spec change is ready to merge: component:Calendar DD1 and the record lines that point to it have an engineering owner's spec approval for this commit, and the record passes knowledge validation. Nothing in the record needs to change. The follow-up implementation switches the headers to the abbreviated width and updates the three day-name tests that the DD1 verification row names.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the spec approval for this commit was withdrawn, and component:Calendar DD1 needs the per-locale rule described in the pull request conversation for abbreviated weekday names wider than the 32px header column, such as those in pt-PT, ar, he, pl and vi. After the revision, an engineering owner records approval by commenting /approve-spec <full head SHA> on the pull request (the author may do so as an engineering owner), and a design owner's approval is also expected because the Design decisions edit is mixed with other contract edits. Nothing else in the record needs to change.

[Automated review]

@imdreamrunner imdreamrunner changed the title docs(spec): Calendar weekday headers show the abbreviated names docs(spec): Calendar weekday headers show abbreviated names where they fit Nov 3, 2026
@imdreamrunner
imdreamrunner force-pushed the spec/calendar-weekday-abbreviated branch from f00e24d to 7527bd4 Compare November 3, 2026 20:02
@imdreamrunner
imdreamrunner marked this pull request as ready for review November 3, 2026 20:02
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

DD1 is tuned per locale: abbreviated names where all seven fit within four characters (English Sun), short names otherwise (pt-PT, ar, he, pl, da, vi). The description lists every shipped locale's result. Ready for design review again.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on a spec-owner decision: component:Calendar DD1 adds a per-locale rule for Calendar's weekday headers (abbreviated names where all seven are at most four characters, short names otherwise) that no current spec on main states yet.

  • To settle it, an engineering owner approves DD1 as written at this commit by commenting /approve-spec 7527bd439db38d43eab6e0bfdd5d73761f0cf5ea on this pull request (the author may do so as an engineering owner), and a design owner approves too, because the Design decisions edit is mixed with other contract edits.

DD1's locale examples match CLDR's data, and nothing else in the record needs to change.

[Automated review]

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec 7527bd4

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@imdreamrunner
imdreamrunner force-pushed the spec/calendar-weekday-abbreviated branch from 7527bd4 to fc608c9 Compare November 3, 2026 20:31
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec fc608c9

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved from the review side: component:Calendar DD1 and the record lines that point to it have an engineering owner's spec approval for this commit, and the record passes knowledge validation.

  • DD1's locale examples and its implementation gap (Su to Sa today) match the CLDR 48.2.0 weekday data the generator reads, and its verification row names locales that catch a three-character cut and a mixed header row.
  • Nothing renders differently until the implementation lands; that pull request carries the generator change and the day-name tests DD1's verification row lists.

[Automated review]

@imdreamrunner
imdreamrunner enabled auto-merge (squash) November 3, 2026 21:25
@imdreamrunner
imdreamrunner force-pushed the spec/calendar-weekday-abbreviated branch from fc608c9 to efeed80 Compare November 3, 2026 21:26
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec efeed80

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved from the review side: component:Calendar DD1 and the record lines that point to it have an engineering owner's spec approval for this commit, and the record passes knowledge validation.

  • DD1's locale lists and its implementation gap (Su to Sa today) match the CLDR 48.2.0 weekday data the generator reads, and its verification row names locales that catch a three-character cut and a mixed header row.
  • Nothing renders differently until the implementation lands; that pull request carries the generator change and the day-name tests DD1's verification row lists.

[Automated review]

@imdreamrunner
imdreamrunner merged commit 54cc2c2 into main Nov 3, 2026
86 of 92 checks passed
@github-actions
github-actions Bot deleted the spec/calendar-weekday-abbreviated branch November 4, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — efeed802 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants