-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Proxy Port Improvements #2842
Proxy Port Improvements #2842
Conversation
3aa2c9e
to
838a482
Compare
Hi @marek-piirikivi, I tried to test this by doing the following:
However, this doesn't seem to work for me. Am I testing this correctly or was it fixing some other use case? |
@danyeaw Could you tell me what symptoms there were? What happened? What you expected to happen? I'll check this out myself (did not have the time yet), but the fix is about reusing already existing elements from the model browser. It does not fix the problem that we have before about the problem with placing ports when there are multiple items that can hold the port on the diagram. It is known older problem that when there are multiple items which the port can belong to, that only the first found item gets the port - is this what you experienced? I can solve this within this merge request as well, but I see this as a separate problem. This change merely "adds block's property into the list that even can own a port that's dragged from the model btowser". 🙂 |
@marek-piirikivi Sorry for the confusion, it sounds like I was testing out a different use case, definitely don't expand this PR to fix that other thing. I reread the issue you linked to. With this PR, if I try this:
The port is not adding to the part again instead of the block. |
@danyeaw Are you sure you are looking at the correct changes? Here is a video - I tried to reproduce the issues, but maybe I am not understanding the use-case properly 🤔 gaphor-2023-11-21_06.46.29.mp4 |
838a482
to
3fdd3ff
Compare
😈 I did that. It was bugging me so much... even if I do not see the use-case for having the two items representing the same block on the same diagram. Removing unused elements with proxy port is still broken. When I delete it from any of the items referencing it, it removes it from everywhere. |
... I should add tests as well... 😅 |
3fdd3ff
to
14afc60
Compare
366cd7f
to
0b102ee
Compare
I made some updates:
From my point of view, I tried to brake the functionality, but couldn't - it behaves as I expect it to behave. Please review. 🙂 Here is a small demo as well (ignore jerky mouse movement - I am not very good with mouse, shaky hands) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marek-piirikivi!
I added additional check to see if there exists an item on the diagram that may own the proxy port.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #2612
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Additionally fixed proxy port drag icon. Automatically generated icon name is "proxy-port".