Skip to content

Add graphical model view - #21

Open
e-filchenko-bosh wants to merge 8 commits into
eclipse-esmf:mainfrom
bci-oss:add-graphical-model-view
Open

Add graphical model view#21
e-filchenko-bosh wants to merge 8 commits into
eclipse-esmf:mainfrom
bci-oss:add-graphical-model-view

Conversation

@e-filchenko-bosh

Copy link
Copy Markdown
Contributor

Description

Adds the Graphical View user interface to the Semantic Models VS Code extension.

The change includes:

  • Open Graphical View command for Turtle files;
  • editor-title button and editor context-menu entry;
  • one Graphical View panel per Turtle document;
  • secure SVG rendering with zoom, scroll restoration, and last-good-result retention;
  • safe navigation from supported diagram headers and attribute rows to local Turtle source locations;
  • support for multilingual preferredName and description rows;
  • packaged local webview assets, including DOMPurify, font files, and the editor-title icon.

Dependencies

  • Requires the matching Graphical View LSP implementation from esmf-sdk.

Additional notes:

  • The view is read-only. It does not support diagram editing, remote navigation, arbitrary SVG links, or live updates while typing.


const packageJson = JSON.parse(readFileSync(join(extensionRoot, 'package.json'), 'utf8'));
if (packageJson.dependencies?.dompurify !== '3.4.13') {
throw new Error('DOMPurify must remain pinned exactly to 3.4.13.');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the logic behind this validation? potential unexpected behavior from modifying library version?

Comment thread src/webview/webview.js
typeof message.status.message === 'string'
) {
status.textContent = message.status.message;
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover return call probably

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

Successfully merging this pull request may close these issues.

2 participants