Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rendering of code blocks in JupyterLab 4.3.0+ #1104

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented Nov 12, 2024

Description

Fixes #1090. For additional context, please review the thread there.

Testing instructions

  1. First, on the main branch, upgrade JupyterLab in your environment to v4.3.0 by running conda update jupyterlab.
  2. Ask Jupyter AI to generate code, and verify you see the bug in Code blocks are sometimes rendered without a background #1090.
  3. Then, switch to this branch, run jlpm && jlpm build.
  4. Restart JupyterLab, and verify that the bug is fixed.
  5. Downgrade JupyterLab to v4.2.0 by running conda install jupyterlab==4.2.0.
  6. Restart JupyterLab, and verify that the bug is still fixed. This asserts that the changes don't break rendering for JupyterLab <4.3.0.

Demo

Screenshot 2024-11-11 at 4 15 29 PM

@dlqqq dlqqq added the bug Something isn't working label Nov 12, 2024
@dlqqq dlqqq changed the title Fix rendering of code blocks in jupyterlab>=4.3.0 Fix rendering of code blocks in JupyterLab >=4.3.0 Nov 12, 2024
@dlqqq dlqqq changed the title Fix rendering of code blocks in JupyterLab >=4.3.0 Fix rendering of code blocks in JupyterLab 4.3.0+ Nov 12, 2024
Copy link
Collaborator

@srdas srdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is good.

  1. Upgraded JupyterLab in your environment to v4.3.0, the bug appears using the old code.
  2. Using the new branch, rebuilt the code.
  3. Restarted JupyterLab and verified that the bug is fixed.
  4. Downgraded to jupyterlab 4.2 and the bug is fixed.
  5. Upgraded back to jupyter lab 4.3 and the bug remains fixed.
    All looks good now.
    Downgrade JupyterLab to v4.2.0 by running conda install jupyterlab==4.2.0.
    Restart JupyterLab, and verify that the bug is still fixed. This asserts that the changes don't break rendering for JupyterLab <4.3.0.

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from me too

@dlqqq
Copy link
Member Author

dlqqq commented Nov 12, 2024

TY everybody! Merging.

@dlqqq dlqqq merged commit c62abb8 into jupyterlab:main Nov 12, 2024
13 checks passed
@dlqqq
Copy link
Member Author

dlqqq commented Nov 12, 2024

@meeseeksdev please backport to v3-dev

@dlqqq
Copy link
Member Author

dlqqq commented Nov 12, 2024

cc @jtpio @brichet re: jupyter-chat

dlqqq added a commit that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code blocks are sometimes rendered without a background
3 participants