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

feat(zeebe): allow number and boolean everywhere #132

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

marstamm
Copy link
Member

@marstamm marstamm commented Feb 6, 2024

  • adds staticValue option for feel, only valid on Number and Boolean

related to camunda/camunda-modeler#3622

@marstamm marstamm requested a review from a team February 6, 2024 10:30
@marstamm marstamm self-assigned this Feb 6, 2024
@marstamm marstamm requested review from philippfromme and barmac and removed request for a team February 6, 2024 10:30
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Feb 6, 2024
Comment on lines 276 to 277
"optional",
"staticValue"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why can't this be "feel": "required"?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's because the number/boolean controls wouldn't be displayed, but in that case the template developer may want to express the semantics of the field: "This has to be an expression which returns boolean" for which { type: "Boolean", feel: "required" } makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

My initial reasoning was that "feel": "required" will always result in just a FEEL editor without further validation. It does no longer offer the Restrictions/UI of Number or Boolean fields. Therefore I think we should disallow it if the result we display would be a Text Input anyway.

You make a valid point and I see how this can offer more options, so I'll add adjust it

Copy link
Member

Choose a reason for hiding this comment

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

Did we consider static as a simpler version of staticValue? I'd imagine both would need explanation anyway, and in these cases I'd prefer the shorter form.

@@ -20,61 +20,16 @@ export const template = {
'type': 'zeebe:input',
'name': 'bar'
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The fixture name is now misleading. Let's add some absurd type instead, e.g. type: Car

Copy link
Member Author

Choose a reason for hiding this comment

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

Missed that one, I adjusted it for every other test. No idea why I did not do it with this one 🙈

adjusted and squashed with previous commits

Copy link
Contributor

@barmac barmac left a comment

Choose a reason for hiding this comment

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

Let's fix the remaining issue and feel free to merge this right away.

@marstamm marstamm force-pushed the allow-number-boolean-everywhere branch from 97699ca to c7c02ad Compare February 6, 2024 12:34
@marstamm marstamm merged commit 741d9df into main Feb 6, 2024
3 checks passed
@marstamm marstamm deleted the allow-number-boolean-everywhere branch February 6, 2024 12:45
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Feb 6, 2024
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.

3 participants