Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Remove AJV usage from combinator mappers #2413

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lucas-koehler
Copy link
Contributor

  • Adapt algorithm to determine the fitting schema index for combinators to no longer use AJV
  • New heuristic uses identifying properties that should match a const value in the schema
  • Adapt MaterialOneOfRenderer.test.tsx to fit new heuristic
  • Describe changes and add examples to migration guide
  • Adapt some of the anyOf and oneOf examples to custom and new identification properties

In contrast to oneOf and anyOf rendererer, allOf renderers do not need the indexOfFittingSchema because all schemas apply at once.
Thus, remove using mapStateToCombinatorRendererProps from mapStateToAllOfProps and, with this, the unnecessary calculation of the index.

fix #2371

- Adapt algorithm to determine the fitting schema index for combinators to no longer use AJV
- New heuristic uses identifying properties that should match a const value in the schema
- Adapt MaterialOneOfRenderer.test.tsx to fit new heuristic
- Describe changes and add examples to migration guide
- Adapt some of the anyOf and oneOf examples to custom and new identification properties

#2371
In contrast to oneOf and anyOf rendererer, allOf renderers do not need the `indexOfFittingSchema` because all schemas apply at once.
Thus, remove using mapStateToCombinatorRendererProps from mapStateToAllOfProps and, with this, the unnecessary calculation of the index.

Part of #2371
Copy link

netlify bot commented Jan 31, 2025

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 07fe0f7
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/679ce5cb223dc30008a60e9d
😎 Deploy Preview https://deploy-preview-2413--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lucas-koehler lucas-koehler requested a review from sdirix February 4, 2025 09:33
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.

Remove AJV usage from combinator mappers
1 participant