Skip to content

scratch CI check (do not merge) - #3

Closed
rishilifts wants to merge 30 commits into
v7from
scratch-5526-check2
Closed

rishilifts wants to merge 30 commits into
v7from
scratch-5526-check2

Conversation

@rishilifts

Copy link
Copy Markdown
Owner

Fork-only CI run for rjsf-team#5526

rishilifts and others added 29 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.
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Size limit report

Sizes are minified + brotli, measured by size-limit at 8302ba8.

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.75 kB 7.75 kB =
@rjsf/antd (without dependencies) 7.32 kB 7.32 kB =
@rjsf/chakra-ui 18.04 kB 18.04 kB =
@rjsf/chakra-ui (without dependencies) 11.79 kB 11.79 kB =
@rjsf/core 35.70 kB 35.67 kB -0.03 kB
@rjsf/core/markdown 25.53 kB 25.53 kB =
@rjsf/core/testing 65.11 kB 64.99 kB -0.11 kB
@rjsf/core: Form 35.44 kB 35.34 kB -0.10 kB
@rjsf/daisyui 55.33 kB 55.33 kB =
@rjsf/daisyui (without dependencies) 12.35 kB 12.35 kB =
@rjsf/fluentui-rc 6.23 kB 6.23 kB =
@rjsf/mantine 15.06 kB 15.06 kB =
@rjsf/mantine (without dependencies) 10.68 kB 10.68 kB =
@rjsf/mui 7.37 kB 7.37 kB =
@rjsf/react-bootstrap 7.95 kB 7.95 kB =
@rjsf/react-bootstrap (without dependencies) 5.54 kB 5.54 kB =
@rjsf/shadcn 44.78 kB 44.78 kB =
@rjsf/shadcn (without dependencies) 10.52 kB 10.52 kB =
@rjsf/utils 34.54 kB 35.01 kB +0.47 kB
@rjsf/utils (without dependencies) 28.88 kB 29.43 kB +0.55 kB
@rjsf/utils: getUiOptions 0.64 kB 0.65 kB +0.01 kB
@rjsf/validator-ajv8 38.08 kB 38.08 kB =
@rjsf/validator-ajv8 (without dependencies) 2.63 kB 2.63 kB =
@rjsf/validator-ajv8: createPrecompiledValidator 1.25 kB 1.25 kB =
@rjsf/validator-ata 110.61 kB 110.61 kB =
@rjsf/validator-ata (without dependencies) 2.38 kB 2.38 kB =
@rjsf/validator-ata: createPrecompiledValidator 1.25 kB 1.25 kB =
@rjsf/validator-cfworker 7.22 kB 7.22 kB =
@rjsf/validator-cfworker (without dependencies) 2.30 kB 2.30 kB =

@rishilifts rishilifts closed this Oct 20, 2026
@rishilifts
rishilifts deleted the scratch-5526-check2 branch October 20, 2026 13:35
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