-
Notifications
You must be signed in to change notification settings - Fork 481
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
Initial dynamic element template value is not pre-populated. #3327
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Nevermind #3327 (comment).
As no initial value is established there is nothing selected yet. Despite that we still render the first value in the dropdown. The obvious resolution is to not render a selection yet (#3029 (comment)). This is a visual glitch only; in the screen capture you shared |
It took me forever (unfortunately!) to reproduce the issue. The bug is unrelated to dropdowns, but due to the fact that we establish an empty binding for {
"$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json",
"name": "Condition (dropdown, no default)",
"id": "conditional-dropdown-no-default-value",
"appliesTo": [
"bpmn:Task"
],
"properties": [
{
"id": "operation",
"label": "operation",
"description": "Operation to be done",
"type": "Dropdown",
"choices": [
{
"name": "Action 1",
"value": "action1"
},
{
"name": "Action 2",
"value": "action2"
}
],
"binding": {
"type": "zeebe:property",
"name": "functionType"
}
}
]
} |
As discussed @smbea can you take this one over? I root caused it and from what it seems like we don't properly initialize |
When there is no default value, would the expected behaviour for inputs be:
Both would fix this issue. From the tests, it leads me to believe the first option is what is expected. |
We're actually inconsistent here? 🙈 I'd advocate for 2️⃣, and also align Rationale: Empty inputs are rejected by the engine. We should not allow that broken state to be created in the first palace. Probably 1️⃣ is an oversight on our end. We should not create empty |
We add it when the property is non-optional. We even have a test case for this (that ensures the problem we are fixing). But I guess we shouldn't add it ever if there is no value (it it's non optional)? We actually have a test case for optional/non-optional inputs ensuring the issue we are fixing 🤪 https://github.com/bpmn-io/bpmn-js-properties-panel/blob/2a77249f751b2f8739115bf4298355bd50d8bbb0/test/spec/provider/cloud-element-templates/cmd/ChangeElementTemplateHandler.spec.js#L2040 |
I have a fix for this issue if this is the route we want to go bpmn-io/bpmn-js-properties-panel#824. It also aligns the behaviour with |
…eebe:output` Related to camunda/camunda-modeler#3327
Adresses visual template selection glitch: camunda/camunda-modeler#3327
Adresses visual template selection glitch: camunda/camunda-modeler#3327
Fixed via bpmn-io/bpmn-js-properties-panel@b3248fe in bpmn-js-properties-panel. Awaiting integration. |
Closes #3327 Closes #2304 Closes camunda/form-playground#20 Closes #3321
Closes #3327 Closes #2304 Closes camunda/form-playground#20 Closes #3321
Closes #3327 Closes #2304 Closes camunda/form-playground#20 Closes #3321
Closes camunda#3327 Closes camunda#2304 Closes camunda/form-playground#20 Closes camunda#3321
Adresses visual template selection glitch: camunda/camunda-modeler#3327
Describe the bug
Related to #3029 whenever I initially apply an element template the initial value is not applied.
Steps to reproduce
Consider following element template and video attached (works in web modeler and Desktop Modeler (nightly)):
Screen.Recording.2022-11-30.at.18.45.50.mov
Element template attached below ⬇️.
Expected Behavior
When initially applying an element template with a dynamic binding the valid effects (for which the condition is true) is applied.
Additional Context
Element template to reproduce this:
Originally posted by @igpetrov in #3029 (comment)
Depends on #3327.
The text was updated successfully, but these errors were encountered: