Repository navigation
P4 (part 4): rename source to bare canonical names + invert compat generator - #2932
Merged
ejhammond merged 3 commits intoJun 19, 2026
Merged
Conversation
- Flip all XDS<Cap>/useXDS<Cap> identifiers to bare across 554 core source files - git mv 377 files (XDS*.tsx/.ts/useXDS*.ts -> bare filenames) - Invert compat generator: emit XDS* aliases FROM bare canonical (prefixedName/collectExistingPrefixedNames); regenerate 102 barrels - Remove 5 now-redundant self-referential @deprecated alias decls (StackAlignment/CenterAxis/SideNavCollapseState/TopNavSlot/TopNavSlotContext) - Rewrite compat-aliases.test.tsx for the inverted direction (XDS* alias -> bare canonical) Remaining tsc errors (2 collisions, flip-induced, need disambiguation): - Token: component (now bare) collides with CodeBlock's tokenizer Token type - HeadingLevel: generator over-emits XDSHeadingLevel alias in both Text + Heading barrels (Text re-exports Heading's types) WIP commit for durability; not yet building clean.
Resolves all flip-induced collisions; @xds/core typecheck passes (0 errors).
Fixes since the WIP commit:
- Generator: skip aliasing names re-exported from a sibling module (../X) to
avoid duplicate XDS* aliases at the root export * barrel.
- Barrel intra-block duplicate specifiers deduped (Center/Layout/Stack).
- compat-aliases.test.tsx rewritten for the inverted (bare-canonical) direction.
- UseXDS<Cap> -> Use<Cap> across core (47 files) — the flip's \bXDS regex
missed mid-word Use*XDS* convention names; regen produced correct single
XDS* aliases.
- Disambiguated 3 genuine name collisions the rename surfaced (all zero
fbsource consumers), keeping the prominent component name canonical:
* CodeBlock tokenizer 'Token' type -> SyntaxToken (Token = the UI component)
* defineSyntaxTheme 'SyntaxTheme' interface -> SyntaxThemeDefinition
(SyntaxTheme = the provider component)
* theme/types 'HeadingLevel' ('h1'..'h6' tags) -> HeadingTag
(HeadingLevel = the Heading component's numeric 1-6 prop type)
Module augmentation preserved (XDS* aliases are re-export form; verified
consumers augmenting XDS*VariantMap flow to the bare canonical interface).
ejhammond
requested review from
cixzhang,
imdreamrunner,
josephfarina,
marie-lucas,
nynexman4464 and
thedjpetersen
as code owners
June 19, 2026 04:42
|
@ejhammond must be a member of the Meta Open Source team on Vercel to deploy. Learn more about collaboration on Vercel and other options here. |
The snapshot file + keys moved with the XDSFormLayout->FormLayout rename; the data-style-src paths and describe-block keys update to the bare name. Content otherwise matches (dual astryx-/xds- classes from the earlier dual-emit work).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ejhammond
added a commit
that referenced
this pull request
Jun 19, 2026
…nerator (#2932) * P4 (part 4) WIP: source rename to bare canonical + inverted generator - Flip all XDS<Cap>/useXDS<Cap> identifiers to bare across 554 core source files - git mv 377 files (XDS*.tsx/.ts/useXDS*.ts -> bare filenames) - Invert compat generator: emit XDS* aliases FROM bare canonical (prefixedName/collectExistingPrefixedNames); regenerate 102 barrels - Remove 5 now-redundant self-referential @deprecated alias decls (StackAlignment/CenterAxis/SideNavCollapseState/TopNavSlot/TopNavSlotContext) - Rewrite compat-aliases.test.tsx for the inverted direction (XDS* alias -> bare canonical) Remaining tsc errors (2 collisions, flip-induced, need disambiguation): - Token: component (now bare) collides with CodeBlock's tokenizer Token type - HeadingLevel: generator over-emits XDSHeadingLevel alias in both Text + Heading barrels (Text re-exports Heading's types) WIP commit for durability; not yet building clean. * P4 (part 4): complete source rename to bare canonical — tsc clean Resolves all flip-induced collisions; @xds/core typecheck passes (0 errors). Fixes since the WIP commit: - Generator: skip aliasing names re-exported from a sibling module (../X) to avoid duplicate XDS* aliases at the root export * barrel. - Barrel intra-block duplicate specifiers deduped (Center/Layout/Stack). - compat-aliases.test.tsx rewritten for the inverted (bare-canonical) direction. - UseXDS<Cap> -> Use<Cap> across core (47 files) — the flip's \bXDS regex missed mid-word Use*XDS* convention names; regen produced correct single XDS* aliases. - Disambiguated 3 genuine name collisions the rename surfaced (all zero fbsource consumers), keeping the prominent component name canonical: * CodeBlock tokenizer 'Token' type -> SyntaxToken (Token = the UI component) * defineSyntaxTheme 'SyntaxTheme' interface -> SyntaxThemeDefinition (SyntaxTheme = the provider component) * theme/types 'HeadingLevel' ('h1'..'h6' tags) -> HeadingTag (HeadingLevel = the Heading component's numeric 1-6 prop type) Module augmentation preserved (XDS* aliases are re-export form; verified consumers augmenting XDS*VariantMap flow to the bare canonical interface). * P4 (part 4): regenerate FormLayout snapshot after rename The snapshot file + keys moved with the XDSFormLayout->FormLayout rename; the data-style-src paths and describe-block keys update to the bare name. Content otherwise matches (dual astryx-/xds- classes from the earlier dual-emit work).
This branch had an error being deployed
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.
What
Completes P4 — the source-of-record rename. Bare names (
Button,useTheme,ButtonVariantMap) are now canonical in source; theXDS*names become generated compat re-export aliases.XDSButton.tsx→Button.tsx,useXDSTheme.ts→useTheme.ts, etc.)XDS*/useXDS*identifiers flipped to bare across core sourceXDS*aliases from bare canonical (Button as XDSButton), with a guard to skip names re-exported from sibling modules (avoids duplicate rootexport *aliases). 102 barrels regenerated.declare module { interface XDSButtonVariantMap }augmentations flow through the re-export alias to the canonical bare interface (the re-export form preserves augmentability; a type alias would not).Collisions disambiguated
The rename surfaced 3 genuine pre-existing name clashes (component-canonical-bare vs an unrelated bare type). All have zero fbsource consumers; resolved by keeping the prominent component name canonical and giving the data type a specific name:
Token(UI component) vsToken(CodeBlock tokenizer type)SyntaxTokenSyntaxTheme(provider component) vsSyntaxTheme(defineSyntaxTheme interface)SyntaxThemeDefinitionHeadingLevel(Heading numeric 1–6) vsHeadingLevel(theme 'h1'..'h6' tags)HeadingTagValidation
@xds/coretsc: 0 errorsScope notes
Package scope stays
@xds/*; layer names unchanged (xds-base/xds-theme) per P0 decision 4. Stacks on the dual-emit work (#2928, already merged). CI doesn't auto-run on integration PRs; validated locally as above.