chialiyun / DiagramsPreviewerVSCExt

Visual Studio Code Extension to preview Diagrams (Diagram as a Code)
MIT License
6 stars 0 forks source link

On save focus shifts to Mac Preview application window #8

Closed dineshdh closed 8 months ago

dineshdh commented 9 months ago

When working in VSCode and I save changes to the python file, it updates the rendered diagram in the Diagrams Preview tab in VSCode, but then proceeds to open the previewDiagram.png and changes focus from VSCode to the mac Preview application. Makes the whole extension unusable

I noticed this only happens with the C4 example, not with things like the Quick Start example

dineshdh commented 9 months ago

previewDiagram.py seems to be missing show=False with C4 diagrams

Actual

with Diagram("Container diagram for Internet Banking System", direction="TB",  graph_attr=graph_attr,filename="previewDiagram",):

Expected

with Diagram("Container diagram for Internet Banking System", direction="TB", show=False, graph_attr=graph_attr,filename="previewDiagram",):
chialiyun commented 9 months ago

Hi @dineshdh, thank you for reporting this with great details! We are sorry for the issue and will be working on the bug fix. 🙏

chialiyun commented 9 months ago

Hi @dineshdh, we have fixed the issue and published a new version. Would you like to give v1.0.7 (link to extension) a try? Feel free to reach out again if the issue is still occurring for you.

chialiyun commented 8 months ago

Closing this since we have not hear any issues relating to this for quite sometime. 😄