You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notebook cells can produce raster image outputs such as image/png, but presentation and dashboard rendering paths did not handle image MIME types. In those layouts, image output could appear as raw base64 text instead of an image.
This is especially visible when plotting libraries save or display generated charts as image output and the notebook is switched into presentation mode.
Approach
Teach every presentation/dashboard output rendering path to treat image/* MIME types as data URI images, matching the behavior users already get in the regular notebook cell renderer.
Notable changes
Render image/* outputs as <img> elements in PresentationView.razor.
Render image/* outputs as <img> elements in DashboardCell.razor.
Add equivalent image output rendering to the HTML-producing PresentationLayout.
Preserve the existing handling for HTML, Markdown, plain text, and fallback MIME types.
PresentationLayout.cs uses StringComparison.OrdinalIgnoreCase on the StartsWith check, but DashboardCell.razor and PresentationView.razor use the default (culture-sensitive) comparison. Worth aligning on OrdinalIgnoreCase everywhere so MIME type matching is consistent across the three paths.
Apologies for the conflict noise. We just merged a .gitattributes and line-ending normalization commit on main, which converted every text file from CRLF to LF. That intersects with all five of your recent PRs (#48, #49, #50, #51, #52), so each shows as conflicting even though most of the conflicts are line-ending only.
Easiest path per branch:
git fetch origin main
git rebase -Xrenormalize origin/main
git push --force-with-lease
The -Xrenormalize flag tells Git to canonicalize line endings on both sides before merging, which auto-resolves the line-ending conflicts. Anything that genuinely overlaps with other changes on main will still need manual resolution, but for these PRs that should be minimal.
Rebased this branch onto current main with -Xrenormalize, force-pushed, and aligned the Blazor MIME checks to use StringComparison.OrdinalIgnoreCase as suggested. GitHub now reports it as mergeable.
Apologies for this, I hope I've done it right this time :D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Notebook cells can produce raster image outputs such as
image/png, but presentation and dashboard rendering paths did not handle image MIME types. In those layouts, image output could appear as raw base64 text instead of an image.This is especially visible when plotting libraries save or display generated charts as image output and the notebook is switched into presentation mode.
Approach
Teach every presentation/dashboard output rendering path to treat
image/*MIME types as data URI images, matching the behavior users already get in the regular notebook cell renderer.Notable changes
image/*outputs as<img>elements inPresentationView.razor.image/*outputs as<img>elements inDashboardCell.razor.PresentationLayout.Validation
dotnet build src/Verso.Blazor.Shared/Verso.Blazor.Shared.csproj --no-restoredotnet build src/Verso/Verso.csproj --no-restoreManual check
A notebook cell that outputs
image/pngnow displays the image in presentation mode and dashboard cells instead of showing the base64 payload.Review notes
This PR is scoped to rendering existing image outputs. It does not change execution, serialization, or output generation.