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 disappear when their window is maximized #2157

Closed
melaasar opened this issue Nov 11, 2020 · 2 comments
Closed

Diagrams disappear when their window is maximized #2157

melaasar opened this issue Nov 11, 2020 · 2 comments

Comments

@melaasar
Copy link

Describe the bug

When a VSCode extension that supports an Xtext language with Sprotty diagrams is deployed to gitpod, and a Sprotty diagram is opened in a window (by right clicking on a DSL model and choosing "Open in Diagram"), which renders fine, and then the window title bar is double clicked to maximize, the diagram rendering disappears, i.e., it becomes black. Restoring the window to its regular size (by double clicking again) does not restore the diagram rendering. The only solution at this point is to close the window and reopen it with "Open in Diagram" action again. This behavior is only in Gitpod. The same behavior does NOT occur in desktop VSCode (it works as expected there).

Example of extensions that demonstrate this behavior:
https://github.com/eclipse/sprotty-vscode
https://github.com/opencaesar/oml-vscode

P.S.: The behavior was first observed in the OML vscode extension, but then also confirmed to be reproducible on the sprotty-vscode extension.

Steps to reproduce

  1. Start gitpod.io on a repo with relevant files for the extension (e.g., for OML, try: https://gitpod.io/#https://github.com/opencaesar/core-vocabularies)
  2. Navigate in Explorer to a model in repo, e.g., src/ontology.iupac.org/metrology/diagrams/core.oml
  3. Right click on the file and choose Open in Diagram. The diagram should open in an editor and render fine.
  4. Double click the core.oml window to maximize it. Notice how the diagram rendering disappears.
  5. Double click on the core.oml window again to restore size. The diagram still does not render

Note: have the Output view open during steps 4 and 5. Clear it just before doing 4. You notice that there is no chatter with the server during those 2 steps (as expected). The issue appears to be local to the client.

Expected behavior

In steps 4 and 5 above, the diagram rendering (from 3) should persist and does not disappear.

Example repository

https://gitpod.io/#https://github.com/opencaesar/core-vocabularies

@melaasar melaasar changed the title Diagrams disappear when their window is expanded Diagrams disappear when their window is maximized Nov 11, 2020
@JanKoehnlein
Copy link
Contributor

Had a short look at it: It's a mismatch in the behavior of Theia and VS Code. In the latter, there is no such thing as "Maximize" so it works. In Theia on maximization, the iframe containing the webview is being reloaded. This breaks the protocol between the sprotty VS Code extension and the sprotty webview, as the extension doesn't resend the diagram identifier. I think it can be solved in sprotty-vscode, so I create an issue there.

@JanKoehnlein
Copy link
Contributor

Should be fixed by switching to latest sprotty-vscode-* packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants