Repository navigation
Fade inline images and Mermaid diagrams in from their spinner - #119
Merged
Merged
Conversation
A Markdown image or Mermaid diagram that finished loading replaced its spinner box in one frame. Now its pixels fade in over the dim role, as the agent image gallery's do: reduced under Reduce Motion, and no fade when the image was already decoded when the view first showed. Verified on the emulator against session-lab (files checkpoint with 3 s file latency, cold start; math-diagrams checkpoint, cold start): frame by frame the image and diagram pass through partly transparent frames in light and dark, and show at once with animations off. scripts/check.sh :feature:transcript :feature:media passes.
Closed
This branch was previously deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A Markdown image or a Mermaid diagram in the transcript replaced its loading spinner box in one frame once it loaded.
Now its pixels fade in over the dim role, as the agent image gallery's already do. Under Reduce Motion the fade uses the reduced curve, and an image that was already decoded when the view first showed doesn't fade.
Verified on the emulator against session-lab:
scripts/check.sh :feature:transcript :feature:mediapasses.Not checked on a phone.
Left alone: the tool image tile still appears fully drawn, because in a live reply it mounts before the list has scrolled to it, so a fade there finishes out of sight. The box still changes height when the image or diagram loads, since the real size isn't known until then.
The video shows v0.8.0 (left) and this branch (right) loading an inline image and a Mermaid diagram, at real speed and at 1/4 speed.
before-after.mp4