Skip to content

feat(schema): support ReactNode labels via module augmentation#118

Merged
ladparth merged 14 commits intomainfrom
feat/react-schema-module-augmentation
Apr 9, 2026
Merged

feat(schema): support ReactNode labels via module augmentation#118
ladparth merged 14 commits intomainfrom
feat/react-schema-module-augmentation

Conversation

@ladparth
Copy link
Copy Markdown
Contributor

@ladparth ladparth commented Apr 9, 2026

Description

This PR implements a robust architectural solution for supporting rich React elements (tooltips, icons, etc.) directly in BuzzForm schemas using Global Module Augmentation. This allows the core to remain framework-agnostic while giving React users a first-class experience with full type safety.

Key Changes

Core (form-core)

  • Introduced FrameworkOverrides interface to support global module augmentation for UI-specific text types.
  • Transitioned all field and tab collections (fields, tabs) to readonly to enforce schema immutability.
  • Broadened utilities (walkFields, extractDependencies) to handle generic walkable field shapes.

React Adapter (form-react)

  • Augmented core types with ReactNode for label and description.
  • Re-exported all essential core utilities (defineSchema, InferType, etc.) to provide a single import path for users.
  • Fixed a critical infinite recursion bug in resolveDynamicPaths when encountering React internal objects.
  • Moved core and TanStack dependencies to direct dependencies for a 'one-line install' experience.

Docs / Web (apps/web)

  • Updated all documentation (schema.mdx, custom-fields.mdx, installation.mdx, migration.mdx) to prioritize the new import path and showcase ReactNode capabilities.
  • Refactored registry components (Array, Tags, `Select`, Password) to use a nested ui.labels object for better organization and translatability.
  • Updated examples (login-form, register-form) to utilize tooltips inside field labels.

Other

  • Updated AI skill rules (buzzform) to enforce new architectural guidelines.

Type of change

  • feat (New feature)
  • fix (Bug fix)
  • docs (Documentation changes)
  • refactor (Refactoring code without changing behavior)
  • chore (Maintenance, CI/CD, or Ops-related changes)

Related Issues

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

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

Project Deployment Actions Updated (UTC)
buzzform Ready Ready Preview, Comment Apr 9, 2026 1:52am

@ladparth ladparth merged commit bdcbbd8 into main Apr 9, 2026
3 checks passed
@ladparth ladparth deleted the feat/react-schema-module-augmentation branch April 9, 2026 01:57
@github-actions github-actions Bot mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant