camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 479 forks source link

Canvas Live Reload from changed file - Development Tool (fluentAPI) #879

Open StephenOTT opened 6 years ago

StephenOTT commented 6 years ago

I am looking to build a development plugin for the Camunda Fluent API, which will continually output the bpmn xml of a fluent API build.

I was going to build a renderer, but this seemed a better thing to add directly into modeler given all of the tools are already built into it.

What would it take to have a "live reload" type of feature in modeler:

Currently when the source xml changes the modeler will ask if you want to reload the file, this is a good thing given the possibility of accidental changes (i know i have done this many times, and the modal saved me, allowing me to save ;) ). But what about if we want the automatic reload without the warning/modal popup?

Is this something that could be added as a optional feature in the menu to enable something like "File Change Auto Reload" ?

Thanks!

nikku commented 6 years ago

Why exactly would you like to life-reload the diagram? To perform modification in the modeler later? To simply visualize the modeled diagram?

StephenOTT commented 6 years ago

As I update the fluent API, I want the diagram to auto reload to show the output. The fluent APi code would be exporting a bpmn file that the modeler would have open

nikku commented 6 years ago

So you'd like to get a live preview of the things you're building using a DSL.

StephenOTT commented 6 years ago

@nikku It could be from the DSL / Fluent API. But thats not 100% the use case in every scenario.

Right now, the modeler will detect if a reload is applicable and ask the user. The extra configurable option would be to add a option that can be turned on that will auto reload when the change is detected.

This could be for checking the output of a Fluent API build, it could be for working with an existing model and making changes to it, etc.

It is not just about a "preview", it is about being able to inspect the various elements of the outputted build.

nikku commented 6 years ago

Moving to backlog, as a quick-view / reload mode seems like a valid feature request.

nikku commented 3 years ago

Could be implemented via a confirmation ("don't ask again") in the reload notification message, cf. https://www.electronjs.org/docs/api/dialog#dialogshowmessageboxbrowserwindow-options.