Skip to content

Verify #5526 fixes (scratch, do not merge) - #8

Closed
rishilifts wants to merge 37 commits into
v7from
verify-5526-20261025
Closed

rishilifts wants to merge 37 commits into
v7from
verify-5526-20261025

Conversation

@rishilifts

Copy link
Copy Markdown
Owner

Scratch PR to run CI on the fourth review round fixes for rjsf-team#5526. Not for merging.

rishilifts and others added 30 commits October 14, 2026 02:43
Documented the new `itemLabel` array option and updated related examples. Fixed issues with the playground crashing on invalid JSON editor values.
…ared warn suppression

Replaced console warning spy with console suppression utility in getTemplate tests.
Refactor getTemplate to improve template handling and add warnings for non-component overrides.
Refactor getTemplates function to include fieldLabel parameter and use resolveTemplate for template resolution.
Removed unresolved component description mapping.
Added tests to validate warning messages for invalid templates and registry options in getTemplate and getTemplates functions.
This function provides a description for unresolved components, detailing the given value, what it resolved to, and the context of the lookup.
Fixed invalid template overrides being returned as components and updated various schema handling functions to comply with the latest specifications. Introduced breaking changes in error handling for array fields and upgraded ajv-formats.
…ui:globalOptions

The override warnings now fire only in getTemplate()/getTemplates() when the
caller passes a warnSource, and only SchemaField passes one: a lazy
entryLabelForLog() thunk, so an items mistake warns once per uiSchema entry
rather than once per row, and the field's own options, so an own mistake is
told apart from one inherited from ui:globalOptions. The other getTemplates()
callers resolve silently, which removes the second, unlabelled warning.

An invalid own override now falls back to a valid ui:globalOptions template
before the registry's own, as resolveUiField() does for ui:field. A string
registry entry is described as the value it is, not looked up by name. The
registry's templates are checked once per registry, cached in a WeakMap, and
each warning's message is built once per (name, value, entry).

isTemplateName() and resolveTemplate() move to an internal module excluded
from the lib wildcard, and TEMPLATE_NAMES is typed against the declared keys
of TemplatesType so a template added there fails to compile until listed.
The changelog covers the new describeUnresolvedComponent export and
warnSource parameter and the ui:field got-null wording, as do the docs.
Three tests: a ui:globalOptions template named by string is resolved when a
field-level override is invalid; one naming no registered template falls
through to the registry; the ui:globalOptions warning logs once across
fields. Restores the 100% branch coverage the threshold checks.
The keyed dedupe for the invalid-override warnings was a second Set that
resetLogOnce() could not clear and that never dropped anything. It now
lives in loggedMessages.ts, the two-generation store logOnce() uses, so
resetLogOnce() clears it, memory stays capped, and the message is still
built only the first time a key is seen. testSetup no longer needs its
own reset.

The key now tells values apart the way describeUnresolvedComponent()
does (string text, element, null, typeof), so editing {} to <MyTemplate />
logs again. warnOnInvalidRegistryTemplate() checks isTemplateName() again,
so a custom-named registry entry that isn't a component stays silent.
The isTemplateName() comment moves to getTemplate(), where the check is.
…ent the helpers

An own null for a template override now renders the registry's template
without a warning and without falling back to ui:globalOptions, the way a
falsy own ui:field opts out; '', 0 and false still warn.

utility-functions.md gains describeUnresolvedComponent() and describes the
two fields of TemplateWarnSource where warnSource is documented.
…() and drop the registry-template warning

- warnOnInvalidOverride() now dedupes through logOnce() on the message itself, so loggedMessages.ts, its package.json
  exclusion and the hand-built key are gone
- The registry-template warning never fired from the getTemplates() loop every caller uses, so it is dropped along
  with its changelog and docstring sentences; the Form-level registry check moves to the follow-up PR
- FallbackField now passes getUiOptions() the merged global options, so an invalid own ui:UnsupportedFieldTemplate
  no longer changes which template renders compared with leaving the value out
- The repeated registry lookup in getTemplate() goes through one lookupTemplate() helper
- testing/testSetup.ts restored to its v7 version, taking it out of the PR
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Size limit report

Sizes are minified + brotli, measured by size-limit at 8f3c81d.

A package listed twice is measured both as installed and, on the second row, as its own code with its dependencies excluded. Peer dependencies are always excluded.

Check Base PR Δ
@rjsf/antd 7.72 kB 7.72 kB =
@rjsf/antd (without dependencies) 7.26 kB 7.26 kB =
@rjsf/chakra-ui 18.07 kB 18.07 kB =
@rjsf/chakra-ui (without dependencies) 11.84 kB 11.84 kB =
@rjsf/core 38.63 kB 38.61 kB -0.02 kB
@rjsf/core/markdown 25.53 kB 25.53 kB =
@rjsf/core/testing 68.49 kB 68.40 kB -0.09 kB
@rjsf/core: Form 38.33 kB 38.27 kB -0.06 kB
@rjsf/daisyui 55.39 kB 55.39 kB =
@rjsf/daisyui (without dependencies) 12.44 kB 12.44 kB =
@rjsf/fluentui-rc 6.26 kB 6.26 kB =
@rjsf/mantine 14.79 kB 14.79 kB =
@rjsf/mantine (without dependencies) 10.46 kB 10.46 kB =
@rjsf/mui 7.44 kB 7.44 kB =
@rjsf/react-bootstrap 7.97 kB 7.97 kB =
@rjsf/react-bootstrap (without dependencies) 5.56 kB 5.56 kB =
@rjsf/shadcn 44.70 kB 44.70 kB =
@rjsf/shadcn (without dependencies) 10.53 kB 10.53 kB =
@rjsf/utils 47.55 kB 47.72 kB +0.18 kB
@rjsf/utils (without dependencies) 41.98 kB 42.18 kB +0.20 kB
@rjsf/utils: getUiOptions 0.72 kB 0.72 kB =
@rjsf/validator-ajv8 38.56 kB 38.56 kB =
@rjsf/validator-ajv8 (without dependencies) 3.12 kB 3.12 kB =
@rjsf/validator-ajv8: createPrecompiledValidator 1.44 kB 1.44 kB =
@rjsf/validator-ata 110.67 kB 110.67 kB =
@rjsf/validator-ata (without dependencies) 2.44 kB 2.44 kB =
@rjsf/validator-ata: createPrecompiledValidator 1.30 kB 1.30 kB =
@rjsf/validator-cfworker 7.59 kB 7.59 kB =
@rjsf/validator-cfworker (without dependencies) 2.74 kB 2.74 kB =

…plate names and warn for ui:CyclicSchemaExpandTemplate
@rishilifts
rishilifts force-pushed the verify-5526-20261025 branch from 01ad06d to 8f3c81d Compare October 25, 2026 02:44
@rishilifts rishilifts closed this Oct 25, 2026
@rishilifts
rishilifts deleted the verify-5526-20261025 branch October 25, 2026 02:57
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