-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow multiple diagrams to be opened #44
Conversation
- Fix TheiaJsonrpcGLSPClient to only have one handler for connection - Fix problem with filter with same ID being added multiple times - Add formatting of CSS files to prettier - Centralize ID handling for containers and global IDs -- Diagram elements need locally unique IDs -- Other elements need globally unique IDs Fixes #16
…so tests fail on actions i.s.o. timeout.
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.
Hi Martin,
Thanks for these changes. Codewise I don't see strange things.
I do see the PlayWright tests timed-out, so I updated the playwright config so it will really error on actions which take to long (like waitFor* actions). Otherwise it might end-up unnoticed.
While testing I experiences some issues. I wrote the issues in separate comments below. The first issue I related to this branch. The other two I am not sure, so I can also move them into separate issues to be solved later (depends on the time it costs to fix it).
Issue 1: Couldn't find nodeAlso I experience an error when modeling a new diagram, where I get an error that it couldn't find a node with the given id:
Steps to reproduce:
When I look in the diagram code I see the following contents:
When I compare this with the other diagram which is working, the When I remove the |
Issue 3: Property widget starts flashing (yes you read it correctly 😄 )At some point I saw the property widget started flashing, looks like it is re-rendering continuously. Steps to reproduce:
At this point on Chrome Windows the property widgets kind of starts flashing, where the contents looks to be reloaded every second. Once you go to the other diagram and click on an entity it works fine. If you then jump back to the new diagram and click on an entity it also works fine. |
Yes, I think that probably never worked. I just checked the code and it comes from the property view that requests an entity but when you click on an edge the server rightfully says that there is no node with the given ID because we clicked on an edge. I'll see what we can do to best prevent that. |
Problem: We open an entity through the property view. That triggers a rebuild of the entity document which triggers an update in all open diagrams that have that entity as they have a reference to it. The diagram update also resets the selection state in each diagram which in turn updates the property view again as it reacts to selection changes. This can lead to an update-cycle if there is more than one diagram open with the same entity. Fix: Since the property view reacts to selection changes and updates in the diagram trigger such a change, there is no need for the property view to listen actually participate in the model lifecycle itself. So there is no need to do the open/close since we do not need to listen to updates ourselves.
- Ensure that the navigator tree always gets a URI of the selected node
Hi @martin-fleck-at, I see you pushed some changes to fix the issues. I tested it and all issues indeed seem to be solved. A new issue I now see is that the property widget form is working with multiple diagrams open. But when having two diagrams open and change something using the property widget and press Save the entity file is updated, but then the property widget is emptied and the diagram is not updated. So something is not OK yet. |
@harmen-xb Interesting, I'll double check that, thank you for the quick review! |
- Ensure GLSP selection is forwarded again if active editor changes - Only update properties if selection of active widget changes - Add additional change reason for better update decision in GLSP
877dcf2
to
9d084d1
Compare
@harmen-xb I pushed another update that should fix that issue. Could you please have another look? |
Added context menu tests on relationship and diagram files in the explorer view.
@martin-fleck-at Thanks for the update! It now all seems the work correctly. To make sure the context menu's keep working I added some extra playwright tests on the context menu of relationship and diagrams. |
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.
All looks ok now.
Fix TheiaJsonrpcGLSPClient to only have one handler for connection
Fix problem with filter with same ID being added multiple times
Add formatting of CSS files to prettier
Centralize ID handling for containers and global IDs -- Diagram elements need locally unique IDs
-- Other elements need globally unique IDs
Fixes #16