xwikisas / application-diagram

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

Create Diagram page from template doesn't work anymore #172

Closed CamiAndrei closed 3 years ago

CamiAndrei commented 3 years ago

Up to version 1.15.1 there was the possibility to create a diagram with "Create" -> "Diagram" From the version 1.15.2 the Diagram Template is not visible in the list.

Version 1.15.1 Screenshot from 2020-10-15 14-28-36 Version 1.15.2 Screenshot from 2020-10-15 14-25-32

lucaa commented 3 years ago

Actually, the issue was never fixed. The change in 33b0e3e is actually only making the template available in the create forms of other paths on the wiki. However, as soon as the template is chosen , the path where the page is created changes to Diagram and setting it manually to something else does not work (there is error on creation mentioning a restriction) - which was not the behaviour on version 1.15.1 cited in the ticket.

For the actual fix: the easiest fix seems to be to add the "Use creation restrictions as suggestions" to the current settings, so that the Diagram space is only a suggestion but not a restriction. However, this would create the following interaction:

This is not the behaviour we used to have before: before, you could just choose the Diagram template and the page was simply created in the current path. This is the desired behaviour, we should try to obtain this.

oanalavinia commented 3 years ago

Before the upgrade to 9.11 parent there was a small app that preselected the template #13 (diagram template was available on all spaces and the app made it preselected inside Diagram space), but it was removed since it's purpose was just to be a workaround for an issue with template provider on an older version. But it seemed like the same behavior can't be achieved only from Template Provider. So there are 2 choices:

  1. use the suggestion of @lucaa to keep these changes + "Use creation restrictions as suggestions" , meaning that when you want to create a Diagram outside Diagram space, you have to manually change back the parent every time.
  2. add back the Default Page Template Application for having the behavior prior to this issue
lucaa commented 3 years ago

use the suggestion of @lucaa to keep these changes + "Use creation restrictions as suggestions" , meaning that when you want to create a Diagram outside Diagram space, you have to manually change back the parent every time.

I don't understand, I specifically asked for that to not happen (having to change the parent back every time), so at least for me that's a -1.

oanalavinia commented 3 years ago

I just wanted to underline the fact that if we don't want the outcome of the fix that you suggested, the only fix is to add back the dependency to Default Page Template Application. (until there is a way to specify from Template Provider the spaces where you want the template to be preselected)

oanalavinia commented 3 years ago

I added back the dependency to application-defaultPageTemplate to avoid any side effects