eclipse-sirius / sirius-web

Sirius Web: open-source low-code platform to define custom web applications supporting your specific visual languages
https://eclipse.dev/sirius/sirius-web.html
Eclipse Public License 2.0
79 stars 52 forks source link

Several issues with the new support for arbitrary objects in the explorer #3913

Open pcdavid opened 2 months ago

pcdavid commented 2 months ago

Not sure if they are general issues of #3777 or specific to the way we excercised is with EMF Settings, but I noticed several issues. I'll add them all here, feel free to open separate issues for the ones the are actually relevant (and nor a misunderstanding on my part):

When expanding an Entity definition, I see a new 'superTypes' child, but it has no proper icon:

Capture d’écran du 2024-08-29 16-19-47

When I select the new node, I don't get anything in the Details view except "No object selected".

When the virtual node is visible multiple times, selecting one shows all the corresponding tree items as selected, it's confusing:

Capture d’écran du 2024-08-29 16-27-53

This is probably more specific to the way the new capability is used in the ExplorerDescriptionProvider, but now the same elements can appear multiple times in the explorer, and they have the same issue when one "instance" is selected:

Capture d’écran du 2024-08-29 16-26-08

I have not checked (yet), but I suspect that if I create a reference loop with A extends B extends A (semantically invalid, but technically possible) and then try to "Expand All" on A, then I would trigger some kind of infinite loop.

pcdavid commented 2 months ago

The "superTypes" nodes have a "Delete" action in their context menu but it does nothing. I suppose either the nodes should not be deletable, or "deleting" them should clear the setting.

Edit: it looks like invoking the Delete operation on these elements causes this error:

2024-08-29T14:27:01.912Z  WARN 1 --- [nio-8080-exec-1] o.e.s.c.g.controllers.GraphQLController  : {
  "errors" : [ {
    "message" : "Exception while fetching data (/deleteTreeItem) : Cannot deserialize value of type `java.util.UUID` from String \"setting:9047707f-3376-4c30-bace-e610d0cb7824::superTypes\": UUID has to be represented by standard 36-char representation\n at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: org.eclipse.sirius.components.collaborative.trees.dto.DeleteTreeItemInput[\"treeItemId\"])",
    "locations" : [ {
      "line" : 2,
      "column" : 3
    } ],
    "path" : [ "deleteTreeItem" ],
    "extensions" : {
      "classification" : "DataFetchingException"
    }
  } ],
  "data" : {
    "deleteTreeItem" : null
  }