Skip to content

chore(Tokenizer): remove experimental.presentation; presentation is the only spelling - #9836

Merged
imdreamrunner merged 1 commit into
mainfrom
chore/tokenizer-drop-experimental-presentation
Nov 4, 2026
Merged

imdreamrunner merged 1 commit into
mainfrom
chore/tokenizer-drop-experimental-presentation

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

Remove Tokenizer's experimental prop now that presentation is a stable prop (#9796). The prop held only presentation. The staged promote-tokenizer-presentation codemod stays and now targets the removed spelling, so callers of 0.7.7 get an astryx upgrade step. The PR removes an experimental API, so it is neither a new feature nor a fix, and maintenance does not fit either.

User or maintainer impact

  • Builders. Only builders who adopted experimental={{presentation: x}} are affected. That spelling shipped in 0.7.7, a few hours before the stable prop merged. They pass presentation={x}, which takes the same values and behaves the same, or run astryx upgrade. Typed callers get a compile error until they move. For untyped callers, the field ignores experimental, renders the 'adaptive' default, and puts experimental="[object Object]" on the input.
  • Release notes. The next release announces one presentation prop, with no deprecated alias. The removal note names the replacement and astryx upgrade.

Problem and solution fit

  • Why remove the alias? The owner decided the next release ships only the stable prop. The experimental option was out for hours, so an alias would keep a second spelling in the API for almost no callers.
  • Why is this allowed in a patch? spec:AST-017/FR22: removing an explicitly experimental surface is an [experimental] patch change, and "a compatibility alias is optional". The spelling did ship in 0.7.7, and the rewrite to presentation is mechanical, so FR23 still asks for the codemod. It stays.
  • What changes for a caller:
// Before (0.7.7)
<Tokenizer experimental={{presentation: 'bottom-sheet'}} … />
// After
<Tokenizer presentation="bottom-sheet" … />

Authority

  • spec:AST-017/FR22 (experimental removal) and FR23 (promotion, and the codemod for a mechanical rewrite).
  • The owner's decision: "the experimental prop never actually release … same for tokenizer and powersearch. we shall just release the new prop."

Change and evidence

  • Tokenizer.tsx. The experimental prop, its resolution path and the precedence warning are removed. presentation defaults to 'adaptive' directly. The wider-ref overload stays, because the stable prop's sheet presentation still puts the trigger button in ref.
  • Tokenizer.doc.mjs. The experimental entries are removed (English, Chinese and dense).
  • Tests. The alias, empty-object and precedence-warning cases are removed, and the props-type test no longer compiles the deprecated spelling.
  • Codemod. promote-tokenizer-presentation stays registered in transforms/next, for the removed spelling. It rewrites only spread-free call sites. Any spread on the element, before or after experimental, leaves the call unchanged with a TODO, because a spread can carry its own presentation, also as undefined. Each TODO starts "experimental.presentation was removed in favor of presentation." and then names its case. A spread: "a spread may also set presentation". experimental={options}: "the value is not a literal object". A spread or computed key inside the object: "the object has a spread or a computed key". A repeated key: "the object sets presentation more than once". A Tokenizer that already passes presentation: "presentation is already set; remove experimental.presentation". Its tests cover both spread orders, and a second run changes nothing.
  • Changesets:
  • Record. component:Tokenizer drops the deprecated-alias sentences from the summary table, Compatibility, Public concepts, FR16, the verification row and DEC-3. Compatibility states that the experimental spelling is removed under FR22, and that astryx upgrade rewrites static uses and leaves a TODO where it cannot prove the rewrite (FR23). system_specs now lists spec:AST-017/FR22 in place of FR21.
  • api-report.md. Only the removed experimental line changes. A stale CodeBlock startLineNumber line that api:report regenerates on main is left out.
  • No use remains. grep -rn "experimental={{presentation\|experimental\.presentation" packages apps finds hits only in the codemod and its tests. There are none in Core, blocks, templates or stories.

Scope

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest. Tokenizer, PowerSearch, Table, BottomSheet, Field, Typeahead, internal/, adopters, slotPresence, touchTriggerTargets, the i18n PowerSearch end-to-end test, the CLI codemods, the CLI golden reads, experimental isolation and the single-bundle test: 172 files and 3,385 tests pass.
  • Interaction lane. The full Chromium interaction suite (the phone lane) passes: 513 passed, 7 skipped.
  • Typecheck. pnpm typecheck passes for every workspace.
  • Strict lint. It reports 0 errors. Prettier is clean.
  • Repository checks. check:changesets, check:sync, check:knowledge and sync-exports --check pass. Changeset coverage passes; this PR ships to @astryxdesign/core and @astryxdesign/cli, and a Changeset names each. codemod-verify.mjs passes, because no consumer file changes: the stories already use presentation.
  • Base. Rebased onto main after feat(PowerSearch): presentation is a stable prop, and adaptive is its default #9797 merged.
  • Bundle (gzip of the eager import). Tokenizer JS goes from 73,147 B to 72,885 B (−262 B), and PowerSearch JS from 199,861 B to 199,204 B. No style source changes.

Writing rubric results

docs/specs/components/Tokenizer/Tokenizer.spec.md:

  • R1 narration: the Compatibility bullet states that the experimental spelling is removed and how the removal is classified. Nothing else describes history.
  • R2 research: none.
  • R3 evidence: none names a PR.
  • R4 rejected alternatives: unchanged.
  • R5 change references: none.
  • R6 open questions: unchanged.

@vercel

vercel Bot commented Nov 3, 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 4, 2026 12:42am UTC

Request Review

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec 97fd425

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

astracat-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 4, 2026, 12:46 AM UTC

@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.

Removing Tokenizer's experimental spelling is covered by the release policy's experimental-change rule (AST-017 FR22) and the approved Tokenizer record. One change is needed before this can merge:

  • Restore the promote-tokenizer-presentation codemod, with its TODO reworded because the old spelling no longer works, and add a CLI Changeset that names it, because AST-017 FR23 still requires a codemod when an API moves out of the experimental object and the rewrite is mechanical, and experimental={{presentation}} shipped in @astryxdesign/core@0.7.7; if owners agree that FR22's softer rule should govern, amend FR23 instead.

Without the codemod, typed callers of the 0.7.7 spelling get a compile error with no astryx upgrade step. Untyped callers silently get the 'adaptive' default, and experimental="[object Object]" lands on the input.

[Automated review]

meta: promoteTokenizerPresentationMeta,
},
];
export default [];

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.

experimental={{presentation}} shipped in @astryxdesign/core@0.7.7, and AST-017 FR23 still requires a codemod when an API moves out of the experimental object and the rewrite is mechanical. Please keep promote-tokenizer-presentation registered here, reword its TODO (the old spelling no longer works), and add a CLI Changeset for it. Or, if owners agree, amend FR23.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 97fd425

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Tokenizer · Storybook 71.4 kB (−64 B) · 17.1 kB CSS (0) 2,116 (−12) ✓ · ✓ · ✓
PowerSearch 195.1 kB (−91 B) · 21.6 kB CSS (0) — — · — · —

Package size:

  • @astryxdesign/cli 3.32 MB packed (−1.8 kB); no new dependencies
  • @astryxdesign/core 6.26 MB packed (−941 B); no new dependencies

API changes: core +0 · ~0 · −1

Committed API report behind this build: core 1 row; run pnpm api:report.

1 API change (advisory)
Package Where Signature Usage
− core . · Components · component Tokenizer prop experimental?: { presentation?: TokenizerPresentation } @experimental <Tokenizer experimental={…} />

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@imdreamrunner
imdreamrunner force-pushed the chore/tokenizer-drop-experimental-presentation branch from 97fd425 to 93731ce Compare November 4, 2026 00:10
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec 93731ce

@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.

Removing Tokenizer's experimental spelling is covered by the release policy (AST-017 FR22 and FR23) and the approved Tokenizer record, and the kept codemod gives 0.7.7 callers an astryx upgrade step. Two wording fixes are needed before this can merge:

  • The description says untyped callers get React's unknown-prop warning, but none fires: the field silently ignores experimental, renders the 'adaptive' default and puts experimental="[object Object]" on the input, so please describe that instead.
  • The core Changeset says "astryx upgrade rewrites static uses", but the codemod leaves a Tokenizer that spreads props unchanged with a TODO (its own test covers both spread orders), so please add that caveat, for example "rewrites static uses and leaves a TODO where it cannot prove the rewrite".

Optional: the codemod's TODO ends with "(a spread may also set presentation)" even where no spread is involved, such as experimental={options}.

[Automated review]

'@astryxdesign/core': patch
---

[experimental] `experimental.presentation` is removed from Tokenizer, together with its `experimental` prop; use the stable `presentation` prop, which takes the same values. `astryx upgrade` rewrites static uses.

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.

astryx upgrade leaves a Tokenizer that spreads props unchanged with a TODO (the codemod test covers both spread orders), so "rewrites static uses" claims more than it does. Suggested: "astryx upgrade rewrites static uses and leaves a TODO where it cannot prove the rewrite, such as on a Tokenizer that spreads props."

'could not prove the rewrite. ';
' TODO(astryx upgrade): experimental.presentation was removed in favor of ' +
'presentation. Move the value to presentation; the codemod left this one ' +
'unchanged because it could not prove the rewrite (a spread may also set ' +

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.

Non-blocking: this TODO is also written for experimental={options} and for a Tokenizer that already passes presentation, where no spread is involved, so the "(a spread may also set presentation)" reason misleads there. Drop the parenthetical or give each case its own reason.

@imdreamrunner
imdreamrunner force-pushed the chore/tokenizer-drop-experimental-presentation branch from 93731ce to 5132931 Compare November 4, 2026 00:31
@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec 5132931

@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 is recommended. Removing Tokenizer's experimental spelling is covered by the release policy (AST-017 FR22 and FR23) and by the Tokenizer record approved at this head, and both earlier wording fixes are in.

Optional, in this pull request or a follow-up:

  • .changeset/cli-discover-lab-mobile-sheets-removed.md still says the removed Lab components' touch flows are "Core's Tokenizer and PowerSearch experimental.presentation sheets". The same release removes that spelling, so consider "presentation sheets".

[Automated review]

@imdreamrunner
imdreamrunner enabled auto-merge (squash) November 4, 2026 00:52
@imdreamrunner
imdreamrunner merged commit b5ce149 into main Nov 4, 2026
61 checks passed
cixzhang added a commit that referenced this pull request Nov 4, 2026
…ved experimental prop

#9808 added the test with experimental.presentation; #9836 removed that
prop. Each was green alone; together main typecheck fails (TS2769).
Same change as #9847, folded in here so one pull request turns main green.

Co-authored-by: Xinzi Zhou <2252473+imdreamrunner@users.noreply.github.com>
cixzhang added a commit that referenced this pull request Nov 4, 2026
…tion, and the recorded module resolutions follow core (#9851)

* test(cli): the recorded module resolutions follow useLightbox's doc and drop the deleted usePressPin

#9752 gave useLightbox its own doc; #9756 deleted the internal
Layer/usePressPin.ts. Each was green alone because PR checks skip this
fixture test; main test-node fails on both lines.

* test(Tokenizer): the sheet-row test passes presentation, not the removed experimental prop

#9808 added the test with experimental.presentation; #9836 removed that
prop. Each was green alone; together main typecheck fails (TS2769).
Same change as #9847, folded in here so one pull request turns main green.

Co-authored-by: Xinzi Zhou <2252473+imdreamrunner@users.noreply.github.com>
@github-actions
github-actions Bot deleted the chore/tokenizer-drop-experimental-presentation branch November 4, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 51329316 Deployed Nov 4, 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.

1 participant