Skip to content

feat: Nested group-array and group-array conditional schema #131

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SimoneErba
Copy link

@SimoneErba SimoneErba commented Feb 14, 2025

  • Added support for nested group arrays
  • Now the group array allows to have different schemas for its objects. For example if you have conditional properties. See issue. Added a new field "dynamicFields" that containes the schema of the items. The idea is to use items() if the schema will be the same for every item in the group array. So it is retro-compatible. But if you need the schema to change you can use dynamicFields[i] to get the schema of the item with index "i" (see the test that I added). So we will have one entry in dynamicFields for every item in the group array inserted by the user. At the begininng it will be empty and the user should use items() to get the schema of a new item. Then, when it changes the item, it should look in the dynamicFields to get the calculated schema.
  • removed nameKey because it wasn't used and it was causing problems in the nested group array

@sandrina-p
Copy link
Collaborator

Hi @SimoneErba, thanks a lot for your PR! We will review it this week. :)

@@ -1,6 +1,6 @@
{
"name": "@remoteoss/json-schema-form",
"version": "0.11.10-beta.0",
"version": "0.11.11-dev.20250220174843",
Copy link
Collaborator

@sandrina-p sandrina-p Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SimoneErba! I'm doing the review now, it includes testing this PR against our internal E2E tests, therefore this new commit to release a dev version. Don't worry, I'll revert it once we are done.

(I'm about to close my day, so I'll finish the review on Monday, I hope that's okay.)

Copy link
Collaborator

@sandrina-p sandrina-p Feb 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SimoneErba , forgive us our delay, we didn't find the time to review this because of other pressing priorities.

Is it okay to wait another week or so for it?

If you need it sooner, you can use this dev release as a temporary solution while this PR is in review.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sandrina-p yes no problem I will use the dev release

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SimoneErba! Unfortunately the team didn't find the time to review your PR. The reason is because we are building the next major version of JSF, which will include your feat/bugfix, and we want to focus on shipping it as soon as possible.

In the meantime, the dev release should unblock you. We hope that's okay for now.
Thank you!

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.

2 participants