Repository navigation
Verify #5526 fixes (scratch, do not merge) - #8
Closed
rishilifts wants to merge 37 commits into
Closed
rishilifts wants to merge 37 commits into
rishilifts wants to merge 37 commits into
Conversation
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.
…r the template-override warnings
…() 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
…override warnings, as done in rjsf-team#5491
Size limit reportSizes are minified + brotli, measured by size-limit at 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.
|
…plate names and warn for ui:CyclicSchemaExpandTemplate
rishilifts
force-pushed
the
verify-5526-20261025
branch
from
October 25, 2026 02:44
01ad06d to
8f3c81d
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.
Scratch PR to run CI on the fourth review round fixes for rjsf-team#5526. Not for merging.