Skip to content

repl: Add SVG support to the REPL#44512

Open
auriium2 wants to merge 5 commits intozed-industries:mainfrom
auriium2:svg-support
Open

repl: Add SVG support to the REPL#44512
auriium2 wants to merge 5 commits intozed-industries:mainfrom
auriium2:svg-support

Conversation

@auriium2
Copy link
Contributor

@auriium2 auriium2 commented Dec 10, 2025

To move towards latex support and eventual full jupyter notebook support, this PR adds basic svg mimetype support using the svg renderer.

Changes:

  • Added a temporary cargo patch to jupyter_protocol (see this for why, tldr: jupyter_protocol crate was seeing image/svg mimetype as image first, but handler for image/ prefix specifically did not handle svg mimetype and so all image/svg mimetypes would be parsed as an 'other')
  • added a SVGView similar to the ImageView foundation, which uses the svg_renderer to render svgs
  • Added output type and mimetype arm in outputs.rs to handle the svg mimetype (not possible without patch since svg would be parsed as an other)

Partially addresses:

Caveats:

Before:
image

After:
image

Release Notes:

  • Added basic svg support to the repl

@cla-bot
Copy link

cla-bot bot commented Dec 10, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @auriium2 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Dec 10, 2025

Messages
📖

This PR includes links to the following GitHub Issues: #runtimed/runtimed#199
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against 37c0fe7

@auriium2
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 10, 2025
@cla-bot
Copy link

cla-bot bot commented Dec 10, 2025

The cla-bot has been summoned, and re-checked this pull request!

@auriium2 auriium2 changed the title repl: add basic svg support repl: Add svg support to the REPL Dec 10, 2025
@maxdeviant maxdeviant changed the title repl: Add svg support to the REPL repl: Add SVG support to the REPL Dec 10, 2025
@rgbkrk
Copy link
Collaborator

rgbkrk commented Dec 11, 2025

Dope.

@auriium2
Copy link
Contributor Author

Ready to go!

@rgbkrk rgbkrk added the area:repl repl, jupyter, notebooks, etc label Jan 7, 2026
@rgbkrk
Copy link
Collaborator

rgbkrk commented Jan 7, 2026

Please rebase this when you get a chance.

@rgbkrk
Copy link
Collaborator

rgbkrk commented Jan 7, 2026

Since we merged and shipped your work in the jupyter crates we should just bump the version of the jupyter packages here so you don't have to work around it.

@rgbkrk
Copy link
Collaborator

rgbkrk commented Feb 9, 2026

I brought in the latest package and can take over this PR with credit to you @auriium2

@auriium2
Copy link
Contributor Author

@rgbkrk Sounds good to me, been buried in research/school/other crap but i'll eventually be back with some more latex related stuff as well. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:repl repl, jupyter, notebooks, etc cla-signed The user has signed the Contributor License Agreement

Projects

Status: Community PRs

Development

Successfully merging this pull request may close these issues.

5 participants