opencaesar / oml-vision

A VS Code extension providing UI viewpoints for OML models
Other
4 stars 2 forks source link

Context Menu to show related elements #59

Closed UTNAK closed 2 months ago

UTNAK commented 2 months ago

Checklist before submitting a feature request

Is your feature request related to a problem? If yes, describe the problem

As a systems engineer, it's nice to have a context menu to show related elements to explore models.

Describe the desired feature

When I click the nodes in diagram views, I would like to see the related elements of a node like this.

スクリーンショット 2024-05-02 6 31 25

Here is an example sparql query to get the related elements.

スクリーンショット 2024-05-02 6 31 41

Additional context

This is inspired by the new feature of a modal function of the oml-vision.

pogi7 commented 2 months ago

@UTNAK Do you think it makes sense to also add search capability like the following:

image

Related elements may be a lot for the modal to render as the model grows and having a search capability will help users look for information they need.

I also feel that pagination is a good feature to have as well.

image

UTNAK commented 2 months ago

@UTNAK Do you think it makes sense to also add search capability like the following:

Yes, I agree with you, @pogi7!!

pogi7 commented 2 months ago

@UTNAK I feel that since this query is very generic it can be used in a lot of different OML models. I feel that this modal should open on a double click. I can test with you to see if this user experience meets your business needs. (Also I feel that it would be nice to add a double click feature somewhere in the diagram view :) )

The query can be simplified to this

SELECT *
  WHERE {
    BIND(<${iri}> as ?subject)
    ?subject ?verb ?object .
  }

where the iri is a generic iri related to the selected model element. We can add a filter to your query as well, but I don't think we need that at the moment.