Skip to content

Conversation

martinRenou
Copy link
Member

@martinRenou martinRenou commented Jan 18, 2024

Fix #253

This only works with JupyterLab 4.1.0 which ships a recent enough version of Lumino.

Screenshot from 2024-01-18 12-55-13

@martinRenou martinRenou marked this pull request as draft January 18, 2024 11:58
@martinRenou martinRenou force-pushed the image_renderer branch 3 times, most recently from dcccd84 to c400ed7 Compare January 18, 2024 14:25
@martinRenou
Copy link
Member Author

martinRenou commented Jan 18, 2024

This only works with JupyterLab 4.1.0b1 which ships a recent enough version of Lumino.
We need a strategy for it to fail for older versions.

We cannot fail Python side:

  • There is no guaranty the kernel runs in the same environment/machine where JupyterLab runs, so we can't find the JupyterLab version
  • There is no guaranty the client is JupyterLab, it could be classic Notebook/VSCode etc.

I decided to fail JavaScript side in the case where the import of ImageRenderer fails:

  • This will always work in classic Notebook/VSCode because we ship the right version of Lumino in that case.

Screenshot from 2024-01-18 15-24-34

@martinRenou
Copy link
Member Author

We can probably wait before merging/releasing this, as JupyterLab 4.1 is not even out yet.

@martinRenou martinRenou marked this pull request as ready for review February 6, 2024 15:39
@martinRenou
Copy link
Member Author

Visual regression tests will be fixed by #482

@martinRenou martinRenou merged commit 0de0cd2 into jupyter-widgets:main Feb 29, 2024
@martinRenou martinRenou deleted the image_renderer branch February 29, 2024 10:57
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.

Include jpeg in cell?
2 participants