Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Relationship dialog needs improvement #45

Open
3 tasks done
mike1813 opened this issue Jun 21, 2023 · 4 comments · May be fixed by #230
Open
3 tasks done

Add Relationship dialog needs improvement #45

mike1813 opened this issue Jun 21, 2023 · 4 comments · May be fixed by #230
Assignees
Labels
enhancement New feature or request important Likely to affect a lot of system models or system-modeller users or

Comments

@mike1813
Copy link
Member

mike1813 commented Jun 21, 2023

Most asserted relationships are created by clicking a handle on one asset, then clicking on the asset with which it should have the new relationship. Where there are multiple possible relationships (in either direction), a drop-down selection is provided. This has some nice properties:

  • both assets are already selected, so we don't have too many possible relationships to worry about
  • possible relationships are listed alphabetically, but with relationships from the first asset above relationships going the other way
  • hovering over each option causes a tooltip to appear describing what the relationship means in that context.

It is also possible to create relationships from the asset properties panel. To do this, one must open the folded list of inbound or outbound relationships, click on the 'add' button, and select the relationship type and the other asset involved (in that order). This has some not so nice properties:

  • The relationship type must be selected first, before the two assets are known, so lots of relationship types may be chosen.
  • The possible relationships types are not listed in alphabetic order, so finding the one you want is difficult.
  • There is no tooltip explaining what each relationship type means.
  • Some distinct relationship types use the same label, and only that is displayed, so without a tooltip it is impossible to tell them apart.
  • Once the relationship type is chosen, the asset selection tool is populated, but they are also not listed in alphabetic order.

The whole process is very difficult.

For example, if one wants to create a Process-receives-Data relationship, one can select the Process, but the list of possible relationships to any other asset in the system is huge. If the system model includes a Sensor, two 'receives' relationship types, one of which refers to the Process-receivesFromSensor-Data type (which uses the label 'receives'). Either can be selected, but you only find out which is which when you look for a relatable asset (with one you want you see a list of Data assets, but with the other, a list of Sensors). And you may not even get that far unless you know what each relationship type means.

I propose the following improvements:

  • Reverse the order so users select the other asset first, rather than the relationship type.
  • Ensure the options are listed alphanumerically, restricted to those assets that could have a relationship with the selected asset.
  • Make the selection of relationship type work the same way as the relationship type selector used in the canvas.

This means by the time one is choosing the relationship type:

  • Both assets are known, so we won't have too many options. Because we have separate 'add' buttons for inbound and outbound relationships, we'll know the direction and can eliminate backward relationships (unlike the situation in the canvas).
  • Because we know both assets, we'll have all the information used in the canvas relationship type selector, so it should be possible to display them in the same way, and include the tooltip.

This dialog is the only way to create asserted relationships involving inferred assets. At present, that leads to a crash (explained in issue #44), but once that bug is fixed, some users may start wanting to use this feature. In future we may want to use this dialog also as the way to add relationships that are by default hidden in the canvas view, which certainly would help reduce the visual complexity of using system-modeller. In short, although this feature is rarely used, it is likely to become far more important in future.

@mike1813 mike1813 added the enhancement New feature or request label Jun 21, 2023
@mike1813
Copy link
Member Author

Both assets are known, so we won't have too many options. Because we have separate 'add' buttons for inbound and outbound relationships, we'll know the direction and can eliminate backward relationships (unlike the situation in the canvas).

On reflection, that would not be the best idea. The reason we show relationships in both directions in the canvas is because users aren't always aware which way round the relationship is encoded in the domain model. They know which assets are involved, but not necessarily the direction of the relationship they want.

@mike1813
Copy link
Member Author

I should also say that the example of a 'difficult' relationship cited is based on the domain-network knowledge base.

@mike1813 mike1813 added the important Likely to affect a lot of system models or system-modeller users or label Jan 8, 2025
@mike1813
Copy link
Member Author

mike1813 commented Jan 8, 2025

Reviewed by @mike1813 : this is an enhancement which does seem quite important. The current interface is seriously clunky, yet it is the only way to add certain relationships.

Realistically, it would be sufficient if users had to choose whether a new relationship should be inbound or outbound (as is currently the case), so the drop-down selection boxes can be populated accordingly (but with the options sorted alphabetically so it is easy to find the one you want). It should then be possible to specify the other asset first, and have the relationship options filtered based on that, emulating the process supported when adding relationships between asserted assets in the canvas.

It would be OK not to allow users to choose the relationship type first and then select an asset. That is the way it works at present but usually one knows the asset before the relationship type, so if we must force users to do things in a specific order, it should be the one used in the canvas.

@kenmeacham kenmeacham self-assigned this Jan 16, 2025
kenmeacham added a commit that referenced this issue Jan 23, 2025
kenmeacham added a commit that referenced this issue Jan 23, 2025
…Canvas to Modeller, so that they can be reused in AddRelationModal (via DetailPane)
kenmeacham added a commit that referenced this issue Jan 23, 2025
…cted first, then the allowed connection/relation types
kenmeacham added a commit that referenced this issue Jan 27, 2025
kenmeacham added a commit that referenced this issue Jan 27, 2025
…ex to ensure that tooltip is displayed at the top
@kenmeacham kenmeacham linked a pull request Jan 27, 2025 that will close this issue
@kenmeacham
Copy link
Contributor

This is how it looks now:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request important Likely to affect a lot of system models or system-modeller users or
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants