feat(schema): Collapsing Wrapped Primitives — processing.collapsePrimitiveWrapper (ADR-058)#166
Open
nathanacurtis wants to merge 9 commits into
Open
feat(schema): Collapsing Wrapped Primitives — processing.collapsePrimitiveWrapper (ADR-058)#166nathanacurtis wants to merge 9 commits into
nathanacurtis wants to merge 9 commits into
Conversation
…apse Adds ADR 058 proposing a new boolean field `Config.processing.wrapperCollapse` (optional, default false) that enables stripping plain container wrappers around a single text/glyph child and promoting the leaf to spec root. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gibility detail - Add bulleted real-world cases (Heading, Paragraph, Body, Icon) to context - Rename field from wrapperCollapse to collapsePrimitiveWrapper — verb-noun form consistent with inferNumberProps; update all options rationale - Add explicit collapse eligibility and blocking rules to context section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds optional boolean field to Config.processing (default false) that enables stripping plain container wrappers around a single text/glyph child and promoting the leaf to spec root. All-or-nothing across variants. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g loader Adds collapsePrimitiveWrapper to the specs init YAML template (commented out, matching the inferNumberProps pattern) and to ConfigLoader validation so non-boolean values fall back to false. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Config.processing.collapsePrimitiveWrapper?: boolean(defaultfalse) — when true, a component whose root is a plain container wrapping a singletextorglyphchild (no meaningful container styles, no slot bindings) is collapsed: the wrapper is stripped and the leaf becomes the spec rootResolvedConfig.processing.collapsePrimitiveWrapper: booleanandDEFAULT_CONFIGentryworkspace.schema.jsonupdated with corresponding boolean propertyspecs inittemplate andConfigLoadervalidation wired upconfig/collapse-primitive-wrapper.mdpage + nav +schema/config.mdreference tableCloses ADR-058. All three validation gates pass (tsc, schema validation, test-d.ts compilation).
Test plan
tsc -p tsconfig.build.json --noEmitpassesvalidate-schema.sh --schema-dir packages/schema/schemapasses (5/5)tsc --noEmit --strict tests/*.test-d.tspassesnpm testinpackages/cli)specs initoutput containscollapsePrimitiveWrappercomment block🤖 Generated with Claude Code