using figure
placeholders to get hard copy placeholders, can break the web experience for altair
#1157
Labels
enhancement
New feature or request
Currently the figure directive has a
:placeholder:
option that I have been using in the following ways:ipywidgets
notebook output, I can provide an image to use in a myst website on immediate load, where no output is otherwise available, and this will also be used in hard copy pdf exportHowever, in case 2 the interactive Altair outputs are no longer rendered by myst-theme, and the placeholder is used instead, meaning I need to connect to a kernel (if possible/enabled) and execute the figure/notebook before I can interact with the plot. this defeats the object of the altair plot.
Proposal
We add a
:hard-copy:
option to the figure such that we can satisfy case 2. without having to accept the:placeholder:
behaviour, which is desirable in case 1.:hard-copy:
should be preferred over:placeholder:
in pdf/doc builds if both are set, and:placeholder:
would be used in absence of explicit:hard-copy:
Additional notes
I have considered that the theme could use logic to somehow prioritise altair/vega's mimetype over the static image or placeholder. While that is possible, it leads in to very specific prioritisation and other/future jupyter outputs that warrant the same changes would require theme updates to support. A new option communicates the author's intent better too.
The text was updated successfully, but these errors were encountered: