Repository navigation
fix(app-admin): resolve $. rule targets inside list items - #5793
Merged
Merged
Conversation
Rules with `$.field` targets on fields inside object lists and dynamic zone templates resolved against the list path without an item selector, so the target was never found: `==` rules never matched and `!=` rules always did. List item children now get a lazily computed scope path that includes the item's index, used by `$.` rule targets and `field.parent()` callbacks. Also fixes the datetime issues surfaced while verifying against a client model: - CMS form: a list-only renderer (e.g. `dateTimeInputs`) on a single-value field falls back to the field type's single-value renderer instead of crashing with "t.map is not a function". - app-admin: datetime subtype methods keep the list renderer on list fields. - api-headless-cms: `.datetime()` defaults to `.withTimezone()`, so a field without an explicit subtype gets a consistent format across GraphQL, storage and the Admin UI. - handler-graphql: register the `DateTimeZ` scalar in the main schema, where model field types are also rendered. - Skill: datetime fields must declare a subtype. Adds a RulesCatalog extension model covering rule operators, nesting, lists and dynamic zones, used to verify rule evaluation in the entry form. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
Summary
$.fieldrule targets inside object lists and dynamic zone templates never resolved (no item selector in the path), so==rules never matched and!=rules always did. List item children now get an index-aware scope path, also used byfield.parent()in callbacks.t.map is not a function, e.g.dateTimeInputswithout.list())..datetime()defaults to.withTimezone();DateTimeZis registered in the main GraphQL schema (model field types are rendered there too).extensions/models/RulesCatalog.tscatalogs rule operators across fields, nesting, lists and dynamic zones.Testing
🤖 Generated with Claude Code