-
Notifications
You must be signed in to change notification settings - Fork 413
feat: adds support to additional properties on material renderer #2494
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
feat: adds support to additional properties on material renderer #2494
Conversation
…derers Co-authored-by: lucasoares <[email protected]>
…lated imports - Deleted the additional-properties-material example file and its associated code. - Updated the additional-properties example to include new properties for handling arrays of values by key. - Removed import references to additional-properties-material in index files. - Enhanced MaterialAdditionalPropertiesRenderer to support dynamic titles and improved rendering logic for additional properties. - Modified MaterialObjectRenderer to conditionally skip JsonFormsDispatch when only additional properties are present, improving rendering efficiency.
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@lucasoares Thanks a lot for your proposal! |
The code is essentially complete. it’s not a partial implementation for what I proposed to do. It represents the full feature, including basic tests and comprehensive examples that confirm it's working as intended. When I mentioned it was an experiment, I meant that I'm not fully familiar with the JSONForms code structure and conventions so I had to use the copilot for the initial version, and I didn't have enough time to study them in detail to ensure full alignment. That said, the implementation works and I'm currently using it in my own product. Regarding the CLA, I can't sign it on behalf of Copilot, but I have rebased the branch and signed it myself if you'd like to move forward with the PR. I'm happy to make any adjustments needed to align the code with the JSONForms codebase and style guidelines. |
@lucasoares I see that is fine then. I think I misunderstood. The CLA is still shown as incomplete though. I think you need to open a new PR with a squashed commit that is authored by you. |
Fixes #2492
This is a draft PR initially generated with Copilot and then reworked manually.
I'm not familiar with the jsonforms codebase and don't have much time right now to dive deeply into it. I did a bit of work on top of what Copilot generated, but I didn’t spend too much time polishing it. The goal was mainly to provide a working version of additionalProperties rendering with the Material renderer.
Everything appears to be working: adding and removing data inside both the object and its arrays. That said, this was mostly an experiment to see if Copilot could handle the issue (I may end up using this version in a fork). For this to be production-ready, it will likely need to be redone properly using this as a reference. Since I have 0 context of jsonforms code, I couldn’t provide more detailed instructions for further development.
Schema example:
Rendered form:
All actions are working: you can add and remove data inside both the object and the arrays.