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

Can't have multiple diagrams open at the same time #16

Closed
ozcanxbreeze opened this issue May 4, 2023 · 2 comments · Fixed by #44
Closed

Can't have multiple diagrams open at the same time #16

ozcanxbreeze opened this issue May 4, 2023 · 2 comments · Fixed by #44
Labels
bug Something isn't working

Comments

@ozcanxbreeze
Copy link
Contributor

When you open the graphical view of two different models, the application freezes most of the time.

@willem-xbreeze
Copy link

Lookin into the issue:
When two diagram views are opened within either the same model or two different models, the second one does not show all objects, but when looking in the DOM they appear to be there

@harmen-xb harmen-xb added the bug Something isn't working label Sep 20, 2023
@harmen-xb harmen-xb changed the title Application freezes when opening two grapihical views Can't have multiple diagrams open at the same time Nov 15, 2023
@harmen-xb
Copy link
Contributor

Steps to reproduce:

  1. Start CrossModel with yarn start:browser
  2. Open the yarn-example workspace
  3. Create a new diagram and drag some entities in them.
  4. Open a second diagram (the existing one).

At step 4 the diagram seems empty.

Now if you close both diagrams and open one of them you see some zooming happening. So it looks like there is something off with the zoom of the diagrams.

martin-fleck-at added a commit that referenced this issue Nov 30, 2023
- 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
harmen-xb added a commit that referenced this issue Dec 8, 2023
* Allow multiple diagrams to be opened

- 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

* Updated playwright config to have timeouts for action and navigation so tests fail on actions i.s.o. timeout.

* Added logging of the id of the node it couldn't find.

* Fix "Couldn't find node" when selecting something other than an entity

* Fix "Property widget starts flashing"

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.

* Fix Diagram context menu issue

- Ensure that the navigator tree always gets a URI of the selected node

* Improve update handling between editors

- 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

* Added example relationship and diagram to e2e-tests example worspace.
Added context menu tests on relationship and diagram files in the explorer view.

---------

Co-authored-by: Harmen Wessels <97173058+harmen-xb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants