Skip to content

Support children in schematic sections#2791

Draft
MustafaMulla29 wants to merge 2 commits into
mainfrom
agent/support-schematic-section-children
Draft

Support children in schematic sections#2791
MustafaMulla29 wants to merge 2 commits into
mainfrom
agent/support-schematic-section-children

Conversation

@MustafaMulla29

Copy link
Copy Markdown
Contributor

Summary

  • make descendants inherit the enclosing schematic section name while preserving an explicit schSectionName override
  • treat schematic-only containers such as <schematicsection> and <schematicsheet> as transparent when finding direct schematic layout children
  • keep nested section children in section-aware auto-layout and manual-placement handling
  • add a visual regression test covering nested children in two schematic sections

Why

Although React could attach children beneath <schematicsection>, section membership was only read from each component's own schSectionName prop. The section wrapper also hid those source components from layout code that scanned only direct group children. As a result, nesting components inside a section did not assign or lay them out as members of that section.

Impact

Users can group components naturally by nesting them inside <schematicsection>, matching the container-style API already provided by <schematicsheet>. Existing explicit schSectionName usage continues to take precedence.

Dependency

Depends on tscircuit/props#749 for the public children prop type and schema.

Validation

  • 21 focused schematic section and schematic sheet tests
  • bunx tsc --noEmit
  • bun run build
  • visual snapshot inspected for separated and labeled nested sections

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Jul 23, 2026 2:20pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant