Repository navigation
Conversation
schloerke
force-pushed
the
schloerke/image-output-error
branch
from
November 9, 2026 21:41
f1ebbb4 to
176fb9d
Compare
An erroring render function left the last image on screen with no message. ImageOutput now swaps the image for the error message, with the same shiny-output-error classes Shiny's renderError() adds. The <img> alt comes from renderPlot(alt =) / @render.plot(alt=) instead of a hardcoded "". Fixes #327
schloerke
force-pushed
the
schloerke/image-output-error
branch
from
November 12, 2026 16:08
176fb9d to
fbbfd7f
Compare
This branch has not been 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.
Fixes posit-dev/shinyreact#327.
<ImageOutput>now hides the last image and shows the error message, like a regularplotOutput(). The message div gets the same classes Shiny'srenderError()adds (shiny-output-error,shiny-output-error-<type>), so Shiny's own CSS styles it. The image comes back when a value arrives again.<img>altnow comes fromrenderPlot(alt =)/@render.plot(alt=)instead of a hardcoded"".R sends a one-class error
typeas a plain string rather than an array, so the class list handles both shapes, the same way Shiny'sasArray()does.Silent errors (
req()) still show the loading placeholder, since they arrive as anullvalue, not an error.