Icons are not rendered correctly #194
Comments
I've got the same issue! |
its widespread :-( |
@timkpaine ah that's a bummer :-/ I wonder if this is a good opportunity for someone to write a short Discourse post on what the problem is so that other extension developers can discover the fix? I assume it's the same problem across all of them (and I'm guessing it's some kind of dependency version bump issue?) |
@telamonian, I think this is related to jupyterlab/jupyterlab#6034, mind taking a look? It says "Could not load the image" when I hover over the image src below: |
@blink1073 Celltags uses a different means of inlining SVGs than what I worked on.
form that @jebovic mentioned in their original post. As an alternative, the problem could potentially be fixed using some of the machinery that jupyterlab/jupyterlab#6034 adds. The best way to expose said machinery to external extensions hasn't really been worked out, but this could be a chance to do so. I'll look into it. |
It seemed from the comments in this thread that all we had to do was add No idea if that's right or not, because I'm not a javascript developer, but if that's all the fix needs can we get it merged? This extension's UI is broken right now... |
I have this issue too! |
I figured out exactly why this bug happened when it happened. In Jupyterlab require('<path-to-svg>/foo.svg') used to return a string, but for the |
How can I install the new version of cell tags? I tried installing jupyterlab and jupyterlab/celltags but the icons are still not rendering properly |
@rftw A new release ( |
It worked for me, hooray! |
Yup! working now. Thank you for fixing it |
Glad to hear it. One nice side effect of prepping a new release was that I also cleared out this repo's PR backlog! |
This is awesome, thanks @telamonian! |
Hi,
I'm trying to install the extension on the last version of jupyterlab (v1.1.1).
As you can see on the screenshot below, icons are not rendered anymore.
After investigation, it seems that the upgrade of babel from version 5 to 6 is responsible of this issue. It's certainly updated in the dependency tree of other packages and extensions in the Jupyter environment.
The require function behavior has changed, and the call to the "require" function (here: https://github.com/jupyterlab/jupyterlab-celltags/blob/master/src/components/tag.tsx#L117) now returns an object, and not a string as expected.
From web browser :
From the code, this call returns an object :
src={require('../../static/add_blue.svg')}
The fix which returns what's expected for a src attribute :
src={require('../../static/add_blue.svg').default}
Another solution would be to use this plugin : https://www.npmjs.com/package/babel-plugin-add-module-exports
Regards,
Jérémy
The text was updated successfully, but these errors were encountered: