S
Solara4mo ago
pnjun

MarkdownEditor not displaying in vscode notebook

when using solara.MarkdownEditor in a vscode notebook, nothing is displayed (normal markdown is shown though). The same code works fine if i run the notebook as a standalone app in the browser. Any idea what could be going on? Ps: great job on solara! I love it, and it's going to make making dashboard sooo much easier!
No description
5 Replies
iisakkirotko
iisakkirotko4mo ago
Hi @pnjun! Thanks a lot for the bug report. I'll take a look, seems like vscode is running into some issues with our internal cdn. Screenshot for reference: was unrelated, I think I took more of a look, and it seems that more than just the MarkdownEditor is affected. You can follow a github issue I created here
Monty Python
Monty Python4mo ago
iisakkirotko
<:issue_open:882464248951877682> [widgetti/solara] solara_cdn is broken in vscode
Seems like at some point we've had a regression - math rendering, mermaid, griddraggable, and other components that rely on our template this.getCdn / this.getJupyterBaseUrl machinery and requirejs are broken in vscode. It seems that vscode attempts to load resources with relative paths from the current directory, i.e. for a notebook in /Users/x/Code/example/, it will looks for the cdn in /Users/x/Code/example/_solara/cdn/. The error then reads something like:
Error: Unable to read file '/Users/x/Code/example/_solara/cdn/@widgetti/[email protected]/dist/index.min.js' (Error: Unable to resolve nonexistent file '/Users/x/example/_solara/cdn/@widgetti/[email protected]/dist/index.min.js')
Error: Unable to read file '/Users/x/Code/example/_solara/cdn/@widgetti/[email protected]/dist/index.min.js' (Error: Unable to resolve nonexistent file '/Users/x/example/_solara/cdn/@widgetti/[email protected]/dist/index.min.js')
Within the iframes that render cell contents, we have the following document.getElementsByTagName("base").length: 1, document.body.dataset.baseUrl: https://file%2B.vscode-resource.vscode-cdn.net/Users/x/.vscode/extensions/ms-toolsai.jupyter-2024.7.0-darwin-arm64/temp/scripts/973c83f5a03f3bf85c6238a4779b0ccaedd49c55474cf78b500e5991c6c563b4/jupyter/ document.baseURI: https://file+.vscode-resource.vscode-cdn.net/Users/x/Code/example/
Created
iisakkirotko
iisakkirotko4mo ago
Just a status update @pnjun, the fix should be released within a couple hours!
MaartenBreddels
MaartenBreddels4mo ago
Indeed, version 1.39.0
pnjun
pnjunOP4mo ago
Wow, that was fast, thank you so much! Playing around I found another issue with the Markdown editor, i will make a new post, hope it helps. Thanks again for the effort!
Want results from more Discord servers?
Add your server