-
Notifications
You must be signed in to change notification settings - Fork 29
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(form): Enable 'Required' field feature in the canvas form #1283
Conversation
I am wondering if for data formats and alike we should also show the other fields which belong to the choice you make. Maybe worth a discussion. |
I have a mixed feeling on that and therefore I stressed on checking the behavior of those special editors fields. @lordrip What do you think? |
We also need to keep in mind that some components doesn't have any required field so showing the 'Required' tab by default when user selects a node can show and empty form like this. @lhein |
In case of no required or modified fields (empty tabs) we should display a label instead stating that there are no fields matching this criteria. |
In regards to showing dependant required fields: For But at the same time, we need to consider what this would mean for other properties since this would mean that a complex object will show all its properties. This wouldn't be my favorite solution as I feel it a bit strange, but nevertheless, I'll share it, we might add an additional step to my previous suggestion that checks whether the Let me elaborate with a few examples: Example 1We show {
"properties": {
"name": {
"type": "string"
},
"age": {
"type": "integer"
},
"isStudent": {
"type": "boolean"
}
},
"required": ["name", "age"]
} Example 2We show {
"properties": {
"expression": {
"type": "object",
"properties": {
"operator": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": ["value"]
}
},
"required": ["expression"]
} Example 3We show all properties, as expression doesn't define any required property {
"properties": {
"expression": {
"type": "object",
"properties": {
"operator": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": []
}
},
"required": ["expression"]
} |
This approach looks quite confusing to me as a user, I might feel like all the fields are required but that is not the real case. Moreover, so far, we've followed the approach to load the object field completely is the object is marked as required so following the same approach would be kind of consistent IMO. |
dada36d
to
a13bdfe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I like the form header being sticky and how we can navigate from the empty tab to All
👌
Maybe we should rephrase the "No field found matching this criteria. Please switch to the tab." wording, but until we have another proposal, let's keep it as it is.
f5701ee
to
1323efb
Compare
Fixes #1265
Notes of what has changed:
Notes of what needs to be added further: