Git Product home page Git Product logo

Comments (14)

timkpaine avatar timkpaine commented on June 2, 2024 5

its widespread :-(

from jupyterlab-celltags.

telamonian avatar telamonian commented on June 2, 2024 2

Glad to hear it. One nice side effect of prepping a new release was that I also cleared out this repo's PR backlog!

from jupyterlab-celltags.

choldgraf avatar choldgraf commented on June 2, 2024 1

It seemed from the comments in this thread that all we had to do was add default to the image calls, so I did that in

#195

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...

from jupyterlab-celltags.

telamonian avatar telamonian commented on June 2, 2024 1

I figured out exactly why this bug happened when it happened. In Jupyterlab v1.1, in the build system, the Webpack loader for .svg files changed from url-loader to raw-loader. The loader determines the details of the implementation of the require function. For the url-loader, this statement:

require('<path-to-svg>/foo.svg')

used to return a string, but for the raw-loader it returns a module object. The .default property of that module object is a string with the raw contents of the imported .svg. That's why you now have to add the .default to get the import to work correctly.

from jupyterlab-celltags.

rftw avatar rftw commented on June 2, 2024 1

I figured out exactly why this bug happened when it happened. In Jupyterlab v1.1, in the build system, the Webpack loader for .svg files changed from url-loader to raw-loader. The loader determines the details of the implementation of the require function. For the url-loader, this statement:

require('<path-to-svg>/foo.svg')

used to return a string, but for the raw-loader it returns a module object. The .default property of that module object is a string with the raw contents of the imported .svg. That's why you now have to add the .default to get the import to work correctly.

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

from jupyterlab-celltags.

telamonian avatar telamonian commented on June 2, 2024 1

@rftw A new release (v0.2.0) of @jupyterlab/celltags has now been published that includes the fixes for this issue. If you uninstall/reinstall celltags, it should now be fixed for you

from jupyterlab-celltags.

choldgraf avatar choldgraf commented on June 2, 2024

I've got the same issue!

from jupyterlab-celltags.

choldgraf avatar choldgraf commented on June 2, 2024

@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?)

from jupyterlab-celltags.

blink1073 avatar blink1073 commented on June 2, 2024

@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:

image

from jupyterlab-celltags.

telamonian avatar telamonian commented on June 2, 2024

@blink1073 Celltags uses a different means of inlining SVGs than what I worked on. I'm not super familiar with the require function or with babel, so I can't comment on what broke. This relied on the fact that, by convention, require-ing an .svg would load the whole thing as a raw string. At some point the convention changed (I think ES5 vs ES6), so now you need the

require('<path-to-svg>/foo.svg').default

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.

from jupyterlab-celltags.

DancingQuanta avatar DancingQuanta commented on June 2, 2024

I have this issue too!

from jupyterlab-celltags.

choldgraf avatar choldgraf commented on June 2, 2024

It worked for me, hooray!

from jupyterlab-celltags.

rftw avatar rftw commented on June 2, 2024

Yup! working now. Thank you for fixing it

from jupyterlab-celltags.

Zsailer avatar Zsailer commented on June 2, 2024

This is awesome, thanks @telamonian!

from jupyterlab-celltags.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.