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

Fix sequence rendering #24

Merged
merged 4 commits into from
Oct 22, 2020
Merged

Fix sequence rendering #24

merged 4 commits into from
Oct 22, 2020

Conversation

JoeMcB
Copy link
Contributor

@JoeMcB JoeMcB commented Oct 22, 2020

Resolves #23

Issue
Extension appeared to be using legacy webview resource access with missing security permissions:
image

Solution
Rebuilt using local content access defined in docs.

image

@AleksandarDev AleksandarDev merged commit 4dcf725 into AleksandarDev:master Oct 22, 2020
@AleksandarDev
Copy link
Owner

@JoeMcB Thank you for your contribution.

@JoeMcB
Copy link
Contributor Author

JoeMcB commented Oct 23, 2020

Looks like I missed one of the recommendations for that ticket ( "Switch to use the Webview.cspSource property in content security policies.") just FYI.

@JoeMcB
Copy link
Contributor Author

JoeMcB commented Oct 23, 2020

Just tried the updated dist. Looks like something's up between developer mode src location and what's getting packaged.

This path is 404ing: vscode-webview-resource://c220cb0b-3345-40a5-a328-c3af433e8d6e/file///c%3A/Users/josep/.vscode/extensions/aleksandardev.vscode-sequence-diagrams-0.4.1/src/deps/js-sequence-diagrams/sequence-diagram-snap-min.js
The file is actually located at vscode-webview-resource://c220cb0b-3345-40a5-a328-c3af433e8d6e/file///c%3A/Users/josep/.vscode/extensions/aleksandardev.vscode-sequence-diagrams-0.4.1/dist/src/deps/js-sequence-diagrams/sequence-diagram-snap-min.js

Difference is dist folder in production.

I'll dig back in when I can; new to extension work so apologies for the half-fix.

EDIT: Appears to an artifact of a build step? microsoft/vscode#105514

EDIT 2: Upon further investigation, I think there's a disconnect between the build task (compiling typescript to out) and the publish script (which compiles to dist). These need to be in sync for whatever path the assetPath function compiles if the extension works in dev mode and release. Should be easy to fix but I don't want to mess with your build setup @AleksandarDev

@yzalvov
Copy link

yzalvov commented Nov 8, 2020

@JoeMcB looks like I might have a relative problem (details are here #23 (comment) ). Kindly advise what should I dig for?

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.

Plugin not rendering the diagram
3 participants