refactor(views): ListView's aria and sharing are the spec sub-shapes (#2890) - #2949
Merged
Conversation
…pes (#2890) Last rename batch in the ListView vocabulary migration. `aria` is now the spec's AriaPropsSchema: `label` → `ariaLabel`, `describedBy` → `ariaDescribedBy`, folded at the ListView boundary like every other legacy key. Two things fall out of adopting the spec shape: `role` becomes authorable (the region hardcoded `role="region"`; it now reads `aria.role` and falls back), and `aria.live` stays as a documented local extension — no spec counterpart, and dropping it would silently disable a shipped capability. `sharing` is now the spec's ViewSharingSchema ({ type, lockedBy }), imported by reference; the local four-key object is gone. `visibility` collapses onto the two ownership kinds the spec models (only `private` is personal), and a bare `enabled: true` maps to `personal` — the badge the user already saw, since the old title fell back to 'private'. Visible change: the share badge tooltip shows the spec ownership type, so `visibility: 'team'` reads "Sharing: collaborative". The four-value audience has no spec home and nothing but that tooltip consumed it; keeping a second audience enum alive would re-open the fork this issue closes. Also fixes the spec bridge, which was doing the opposite of its job: given a spec-shaped `sharing`, transformListView DOWNGRADED it — inventing a legacy `visibility` and an `enabled` flag the renderer then had to fold back. Both sides speak ViewSharing now, so it passes through. `conditionalFormatting` and `exportOptions` are deliberately NOT folded: both objectui shapes are supersets carrying capability the spec cannot express (the {field, operator, value} rule form; maxRecords / includeHeaders / fileNamePrefix). Folding them onto the narrower spec shapes would delete working features — they want promotion upstream, not a rename. Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
#2890 scope A step 5 — the last rename batch.
aria→ the spec'sAriaPropsSchemalabel→ariaLabel,describedBy→ariaDescribedBy, folded at the ListView boundary like every other legacy key. Two things fall out of adopting the spec shape:rolebecomes authorable. The list region hardcodedrole="region"; it now readsaria.roleand falls back toregion.aria.livestays as a documented local extension — it has no spec counterpart, and dropping it would silently disable a shipped capability. It wants promotion, not deletion.sharing→ the spec'sViewSharingSchema{ type, lockedBy }, imported by reference — the local four-key object is gone. The legacy pair folds in:visibilitycollapses onto the two ownership kinds the spec models: onlyprivateispersonal;team/organization/publicare allcollaborative.enabled: truemaps topersonal— the badge the user already saw, since the old tooltip fell back to'private'.visibility: 'team'now reads "Sharing: collaborative" instead of "Sharing: team". The four-value audience has no spec home and nothing but that tooltip consumed it — keeping a second audience enum alive would re-open the fork this issue closes.The spec bridge was doing the opposite of its job
Given a spec-shaped
sharing,transformListViewdowngraded it — inventing a legacyvisibilityaudience and anenabledflag that the renderer then had to fold back intotype. Both sides speakViewSharingnow, so it passes through. Its two tests flipped from asserting the downgrade to asserting pass-through.What is deliberately NOT folded
conditionalFormattingandexportOptions. Both objectui shapes are supersets carrying capability the spec cannot express — the{ field, operator, value }rule form, andmaxRecords/includeHeaders/fileNamePrefix. Folding them onto the narrower spec shapes would delete working features. They want promotion upstream, not a rename; recorded as such rather than forced.Verification
normalize-list-view.test.ts+6: ARIA spelling fold, canonical-wins +rolepreserved, all four visibility values → ownership type, bareenabled: true,enabled: falsestays badge-less,lockedBypreserved with explicittypewinning.ListView.test.tsx: the sharing tooltip test asserts the spec vocabulary.anchors.page-seed.test.ts) fails only in whole-repo ordering — it passes in isolation and per-package both with and without this change.turbo run type-check15/15; ESLint 0 errors.🤖 Generated with Claude Code