Repository navigation
feat(core, ui-react)!: field inputs and cells move out of the config into the renderers module (R2 fields) - #32
Merged
Conversation
🦋 Changeset detectedLatest commit: 654a6db The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 59 minutes. View limit details
TanStack is on CodeRabbit Free, which includes PR summaries. Ask your admin to upgrade for code reviews.
|
This was referenced Nov 6, 2026
Merged
cursor
Bot
force-pushed
the
cursor/renderer-binding-d21e
branch
from
November 6, 2026 14:50
b29bfb8 to
a50f376
Compare
cursor
Bot
force-pushed
the
cursor/field-renderers-d21e
branch
from
November 6, 2026 14:50
ff0c8c7 to
8c41fab
Compare
jherr
force-pushed
the
cursor/field-renderers-d21e
branch
from
November 6, 2026 15:07
8c41fab to
654a6db
Compare
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.
Implements cms-refactor-plan.md § Track R2 (item 9) for fields. This is decided question 22:
Field.inputleaves the config through the same binding channel as block renderers. It's in its own PR because admin custom inputs break. It also applies item 10's props-over-providers rule.Merge chain: step 8 of 24. Base:
main. Merge it right after #31. The branch ismain3b4a112, then one commit for each PR before this one in the merge order, then this PR's own commit8c41fab(tree4999fff).What
Fields and field types are data only in
@tanstack/cms-core.Field.inputis now a string naming an input in the app's renderers.FieldTypeDefinitiondropsinputandcell.defineCollection,defineBlock,defineFieldTypeanddefineCmsreject the old forms. Each error gives the field's path and names the replacement.CmsRenderersgainsinputsandfieldTypes.fieldTypescovers custom types only; a built-in name throws.Resolution order:
A named input that isn't bound logs one warning and falls back.
Props.
FieldInput,CollectionSectionandcolumnFields(collection, session, renderers?)takerenderers. The admin routes already importapp-renderers, so the module named increateRoutesreaches the edit and content routes.Docs.
collections-and-fields.mdgains a "Custom inputs and cells" section, and thecms-ui-reactandcms-corereferences are updated. The upgrade guide gains §23, and the migration docs and the Payload skill now point atdefineRenderers.Changeset:
field-renderers-module.md, minor and breaking in pre-mode, forcms-coreandcms-ui-react.No app, starter, example, template, CLI or
cms-skillsfile sets a field input, so no app code changes.Breaking changes
Field.inputchanges from a component to a string name. Move the component intodefineRenderers({ inputs: { <name>: Component } })and setinput: '<name>'.defineFieldType({ input, cell })is removed. Move those todefineRenderers({ fieldTypes: { <type>: { input, cell } } }).rendererstoFieldInput,CollectionSectionandcolumnFields.There's no codemod; upgrading §23 shows before and after.
Assumptions (tasks 8–12 defaults)
Field.inputstays, as a string name, so the override stays per-field and serializable.fieldTypestakes custom types only.columnFieldstakesrenderersas an optional third argument.FieldInputPropsandFieldCellPropsstay exported from core.Divergence from plan
defineCmsDefinitiondoesn't run the field check, because the definition file has to keep type-only imports.defineCollectionanddefineCmscatch the old forms.How verified
CI is down because GitHub Actions is out of billing, so I ran everything locally. I rebased this head, together with #25, #28 and R2 blocks, onto #24's main-based head
2850c54.pnpm test:ci: passes except thecms-api:test:oxlintfailure thatmainalready has.test:dts,test:dialects: clean.test:scripts: 93/93.test:definitions: 26/26.The worker also ran the ui-react unit tests (111/111) and core (595 passed, 30 skipped).
Merge chain (local verification, CI down)
This PR's commits are squashed into one commit on the linear merge chain. That commit holds this PR's own changes, resolved against every PR before it, with the integration rehearsal's fixes for this PR applied. No conflicts.
The chain tip's tree is exactly the integration rehearsal plus #46 (
c4e6d7c), and the tip passes the full local suite. I simulated merging every PR in order, with a merge commit or a fast-forward at each step, and every step is clean. A plain squash of the next PR would conflict, because the squash commit isn't an ancestor of the next branch. To squash instead, first rebase the branch's one commit onto the newmain; that rebase is always clean.