apache / incubator-kie-issues

Apache License 2.0
12 stars 1 forks source link

Add "Generate form code for human interactions" command in the BPMN VS Code extension #1498

Open ljmotta opened 1 week ago

ljmotta commented 1 week ago

Add the form generation command to the BPMN VS Code extension using the "jbpm-form-generator" package introduced in https://github.com/apache/incubator-kie-issues/issues/1493. The command should be named "Generate form code for human interactions". It will use the compiled JSON Schemas to generate the form code into the "src/resources/forms" folder.

The command should be interactive, giving the user the option to generate a Patternfly or Bootstrap code. Also, it should give the option to select which human interactions are desired.

jomarko commented 6 days ago

@ljmotta hi, thank you, I would like to ask about the command name:

I do not have a strong opinion about the points I bring. I am probably fine if we do not change the name. However, sharing the fact, that me, I would try to search in list of VSCode commands by keywords mention in first or second point.

ljmotta commented 6 days ago

@jomarko I understand what you mean. I was relying on a prefix to give the context of the command, as you're right, the form code generation is exclusively for workflow projects. I just checked, and all our KIE VS Code extensions doesn't use a prefix, which is a common approach across other community extensions (e.g. Prettier, Go, TypeScript, ESLint, etc...). For this case, I'll add the prefix to the BPMN VS Code using its extension name (KIE BPMN Editor), and we should create a separated issue to tackle this on other extensions.

Now, with the prefix in place, the current command name would be: KIE BPMN Editor: Generate form code for human interactions, and I guess you're right too to include de jbpm as we need to use the compiled JSON Schemas. Maybe KIE BPMN Editor: Generate form code for human interactions from jBPM project. WDYT?

jomarko commented 2 days ago

@ljmotta thank you, the last proposal KIE BPMN Editor: Generate form code for human interactions from jBPM project sounds to me quite long. I mean, would it fit the menu [1]? However, I am not an expert in other extension commands, maybe it is totally common to use also long command name. I like the proposal to contain a lot of information, what the command actually does and if it fits the menu [1], then I am fine with it.

For example, Devbox: Generate a Dockerfile from devbox.json is 46 characters long while KIE BPMN Editor: Generate form code for human interactions from jBPM project is 76 characters long.

[1] image

jaimeizuz commented 2 days ago

Hi @ljmotta

Sorry if this is not the best place to expose this. I was wondering if the scope of this issue might reach DMN too in some way.

I've seen many DMN developers using VS Code, most of them not very skilled from a technical point of view (poor knowledge on Java, Maven, OpenAPI...) and there's something they've been missing: user-friendly forms to test both DMN models and individual decision nodes.

Do you think that this initiative could also be applied to DMN?

Best regards,

Jaime