Skip to content

Fix mo.ui.matplotlib rendering on browser zoom#9125

Merged
manzt merged 1 commit into
mainfrom
push-qkkkyvzztqpl
Apr 10, 2026
Merged

Fix mo.ui.matplotlib rendering on browser zoom#9125
manzt merged 1 commit into
mainfrom
push-qkkkyvzztqpl

Conversation

@manzt

@manzt manzt commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Browser zoom changes devicePixelRatio but the canvas buffer size wasn't updated to match, causing garbled/duplicated rendering. Adds a matchMedia listener to resize the canvas buffer on DPR transitions.

Screen.Recording.2026-04-10.at.11.34.37.AM.mov

Browser zoom changes `devicePixelRatio` but the canvas buffer size
wasn't updated to match, causing garbled/duplicated rendering. Adds a
`matchMedia` listener to resize the canvas buffer on DPR transitions.
Copilot AI review requested due to automatic review settings April 10, 2026 15:37
@manzt manzt requested a review from Light2Dark as a code owner April 10, 2026 15:37
@manzt manzt added the bug Something isn't working label Apr 10, 2026
@manzt manzt requested review from akshayka and removed request for Light2Dark and Copilot April 10, 2026 15:37
@vercel

vercel Bot commented Apr 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 10, 2026 3:37pm

Request Review

@codecov

codecov Bot commented Apr 10, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 11.88kB (0.05%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
marimo-esm 24.84MB 11.88kB (0.05%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: marimo-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/cells-*.js 384 bytes 703.39kB 0.05%
assets/index-*.js 12 bytes 601.48kB 0.0%
assets/index-*.css 290 bytes 362.29kB 0.08%
assets/JsonOutput-*.js -1 bytes 336.29kB -0.0%
assets/edit-*.js -42.36kB 329.61kB -11.39%
assets/layout-*.js 56.26kB 185.91kB 43.39% ⚠️
assets/slides-*.js 360 bytes 116.37kB 0.31%
assets/panels-*.js -3.15kB 45.36kB -6.5%
assets/button-*.js 93 bytes 3.93kB 2.43%

Files in assets/index-*.js:

  • ./src/plugins/impl/matplotlib/matplotlib-renderer.ts → Total Size: 16.84kB

@manzt manzt merged commit 976415d into main Apr 10, 2026
36 of 37 checks passed
@manzt manzt deleted the push-qkkkyvzztqpl branch April 10, 2026 16:08
@github-actions

Copy link
Copy Markdown

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.1-dev9

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.

2 participants