xwikisas / application-diagram

Create various types of diagrams using draw.io
GNU Lesser General Public License v2.1
0 stars 8 forks source link

Automatically generate diagram references when adding a diagram macro in a page #216

Open aubincleme opened 2 years ago

aubincleme commented 2 years ago

Currently, when a diagram macro is added to a page, the default reference for the diagram (if the reference argument of the macro is empty) will be .Diagram, corresponding to the terminal page Diagram under the current non-terminal page.

This works very well, however users can be confused of having to provide a reference to a diagram when inserting a new diagram to a page : for an end-user it's not clear why a diagram would be stored in a separate page than the current document.

In order to circumvent the issue, we could automatically generate a unique diagram reference when inserting the diagram macro in WYSIWYG, much like what we do when inserting a mention to a user (a unique ID for the mention is generated).

michitux commented 7 months ago

This would be really nice, in particular as it is currently impossible for a user who isn't familiar with document references to insert two different diagrams in a page as there is no picker to select/generate a document reference.