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

Diagrams are not filled in for imported and extended reactors. #341

Closed
edwardalee opened this issue May 19, 2021 · 4 comments
Closed

Diagrams are not filled in for imported and extended reactors. #341

edwardalee opened this issue May 19, 2021 · 4 comments
Assignees
Labels
bug Something isn't working diagrams Problems with diagram synthesis
Milestone

Comments

@edwardalee
Copy link
Collaborator

In the patterns branch, the programs example/C/src/Patterns/Loop_01_Single.lf and Loop_02_SingleDelay.lf do not get the contents rendered. These import reactors that extend other reactors.

@edwardalee edwardalee added bug Something isn't working diagrams Problems with diagram synthesis labels May 19, 2021
@lhstrh lhstrh added this to the 0.1.0 Beta milestone May 26, 2021
@lhstrh
Copy link
Member

lhstrh commented Jun 23, 2021

Wasn't this fixed yet?

@edwardalee
Copy link
Collaborator Author

Yes it is fixed. However, clicking on imported components in the diagram should perhaps open the imported file and highlight the component definition. It does not currently do that.

@lhstrh
Copy link
Member

lhstrh commented Jan 10, 2022

@a-sr: is there a reasonably easy fix to implement the behavior that @edwardalee describes? If so, could you push one?

If this is somehow difficult, I propose we close this issue and create a separate one for the click behavior. We can do that as part of a future milestone.

@a-sr
Copy link
Collaborator

a-sr commented Jan 13, 2022

The current behavior is implemented in the klighd framework and it is not really a bug but intended this way.
The basic UX concept is that the editor defines the context for the diagram view. If the selection of a diagram element that is defined in a different resource would jump to the textual source, it would switch to the respective editor and display the diagram for that editor, losing the previous context.
I think this behavior would be annoying because it happens rather often that you select elements without the intent to look at the source code, e.g. to navigate in the model, highlight them for presentation, or expand them.

I could try to add an alternative action, e.g. ctrl+click, to navigate to the source code of reactors in other files. This way, losing context would be intentional but still inconsistent with the default.

@lhstrh I agree, if we want this behavior, we should add a new ticket because this will take some careful consideration in order to provide a pleasant user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working diagrams Problems with diagram synthesis
Projects
None yet
Development

No branches or pull requests

3 participants