Contribute to ModUI
Use the ModUI checkout for dashboard compositions and schema builders. Its current package is @gxp-dev/mod-ui; old ComponentKit paths and global installation recipes belong to an earlier library design.
Set up the source checkout
Use the package manager/version recorded in package.json and the repository lockfile. The reviewed checkout uses pnpm@10.33.4.
pnpm install --frozen-lockfile
pnpm storybook
Storybook is the primary interactive component environment on port 6006. pnpm dev starts the Vite development entry where needed. Run finite checks before publishing a library change:
pnpm test:run
pnpm typecheck
pnpm build
These commands belong to the ModUI checkout, not the documentation site or an attendee app. Do not infer a test result from an old README's fixed test count.
Choose the owning layer
| Change | Starting point |
|---|---|
| Primitive visual/accessible interaction | src/components/ui/ |
| Typed field/card composition | src/components/compositions/ |
| Element/card schema or builder metadata | src/definitions/ |
| JSON dispatch, binding, display conditions | src/engine/ |
| Legacy conversion | src/adapters/ |
| Top-level page configuration | src/pages/ |
| Per-form/per-builder state | src/stores/ |
Props-based compositions use normal Vue props, model values and events. Keep schema dispatch and platform-specific authentication out of a composition. The engine supplies the bridge between named schema fields and store data.
Add or extend a composition
- Read the nearest existing composition, its test and Storybook story.
- Define typed props/model/events and implement meaningful interaction, labels, focus and disabled/error states.
- Add its schema definition/default/editor metadata if it participates in JSON rendering or a builder.
- Register the supported discriminator and loader path. Current native element types use dot notation; cards use
cardType. - Add the public export or explicit package subpath only if it is part of the supported consumer API.
- Extend the relevant adapter when legacy JSON must map to it. Test legacy and native shapes independently.
- Add source examples and verify the same behavior through composition, renderer and builder where applicable.
The public package export map is stricter than the source tree. Adding a file under src/ does not make @gxp-dev/mod-ui/src/... or an arbitrary component path importable. Keep package exports, Vite library entries and declaration output aligned.
State and visibility
Use the per-form store ID consistently. Check values, touched/dirty state, normalized errors and reset/disposal behavior. A builder's schema state and an application's submitted data are different outputs; do not serialize the whole builder store as a project record by accident.
Visibility evaluates client conditions/features/permissions from its supplied context. Define missing-context behavior and test it. This is not a server policy replacement, and it must not embed bearer secrets into a schema or component.
Styles, build and compatibility
Every public barrel imports the shared styles entry. The library build injects it once, while optional theme files are copied to declared theme subpaths. Test imports from the root and any affected supported subpath to detect missing styles/declarations. Do not add an undocumented root styles import to examples.
Review changes to schema names, default values, model/event payloads and adapter mapping as consumer compatibility changes. Build a representative consumer and verify an existing saved schema before release. Publish through the library's approved release workflow; changing the package version alone does not validate an installed platform integration.
Source review
Reviewed against ModUI a57bc7fe8eb3f1aec2581be52388520463a7d6bf: package.json, vite.config.ts, src/index.ts, category/explicit entry barrels, src/definitions/, src/engine/, src/adapters/ and source tests/stories on 2026-10-13. See Testing ModUI for validation scope.