Skip to content

UI-framework-agnostic core with a component adapter registry #3

Closed

Description

@n4ff4h

Separate form behaviour (binding, old input, errors, ids, labels, value precedence) from rendering. Each component renders through an adapter: <FormsProvider ui={onu}>. An adapter maps every form component (Text, Select, Checkbox, …) to a UI implementation. Individual components can be overridden per app or per form: <FormsProvider ui={onu} components={{ Select: MySelect }}>.

Done when: the core has no import of Onu, and the existing component tests pass through the Onu adapter.

Activity

  1. added
    next-genNext-gen Javaabu packages
    featurePackage feature from the spec
    on Nov 4, 2026
  2. n4ff4h commented on Nov 4, 2026

    @n4ff4h
    CollaboratorAuthor

    Done on next-gen (d134eb5). src/core has no Onu import. It holds binding, old input, errors, ids, labels, value precedence, submission and strings.

    Each component resolves its slots as: <FormsProvider components> (or <Form components>), then <FormsProvider ui>, then the HTML base adapter. A slot an adapter leaves out falls back to plain HTML.

    Decisions:

    • The core owns every value. Slots are controlled: value + onValueChange, or native props with a composed onChange for Input/Textarea.
    • FormData stays the source of truth on submit, as in Blade.
    • Button colours stay Blade colour names (primary, outline-secondary). Each adapter maps them to its own variants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurePackage feature from the specnext-genNext-gen Javaabu packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions