bpmn-io / dmn-js

View and edit DMN diagrams in the browser.
https://bpmn.io/toolkit/dmn-js/
Other
287 stars 136 forks source link

Add placeholder for the name field #879

Open barmac opened 1 month ago

barmac commented 1 month ago

What should we do?

Add placeholder for the name field in boxed expression editor.

Why should we do it?

Guide users.

lmbateman commented 1 month ago

How about this for the placeholder wording?

image

barmac commented 1 month ago

I'm not sure if this not too verbose. Perhaps simple "Name" could serve the purpose well enough. WDYT? Thanks for the colors proposal. Regarding the different kinds (FEEL, Java, PMML), there is no place for an expression if we follow the spec (https://github.com/bpmn-io/dmn-js/issues/857). So in the end only a FEEL expression can be given.

lmbateman commented 1 month ago

I like to include a verb to prompt the user to do something. How about, "Enter name"?

For the expression box, I think it would be nice to keep "Enter FEEL expression" so the user knows what language to use. If you think that they'll already know to use FEEL from working with BPMN, then we could leave it out.

Also, what happens if the user enters an expression in a different language? Will they get an error? (And if so, does it direct them to use FEEL?)

barmac commented 1 month ago

We can't tell for sure whether they are trying to write in a different language or they just made a syntax error. They will see an error anyway if the expression is invalid.