Fix tiny, broken plots in Quarto and notebook consoles#14866
Conversation
|
E2E Tests 🚀 Why these tags?
More on automatic tags from changed files. |
nstrayer
left a comment
There was a problem hiding this comment.
forefront.plot.mov
Tested and things work as expected. One thing I noticed while testing that I couldn't tell if it was desired behavior or not. (Video above)
When you run a plot from the notebook after you've already done an existing plot from the console, the notebook plot shows up in both the notebook and the plots pane. It makes sense why it would happen, but I could see why maybe you'd want the plot to not steal the plots pane when you just run it in the notebook itself. I don't know if you still put it in the plots pane, but maybe go back and select a previous plot from the console or not. It's a tricky question.
That's a really good point. I did do this on purpose, with the theory that people might like to be able to browse the Plots pane to review/compare visualizations (@jthomasmock has mentioned this a few times) that originated in the notebook. In particular it can be useful to have the Plots pane side by side with the Notebook to compare a previous plot with a new one. But if you have the Plots pane up and the Console pane up and the Notebook up, it is a little infelicitous (© @jennybc) for the plot to show up in THREE PLACES AT ONCE. It makes sense for each individual location but all of them at once might be too much. We'll see what feedback we get! |
Fixes #11142
Fixes #11104
When you plot from a notebook console, the plot showed up as a tiny thumbnail, and the "Inspect" gesture that offered to open it in the Plots pane did nothing. This PR makes notebook console plots actually usable. They're now big enough to work with and Inspect works:
Summary
console.notebookPlotPreviewHeight, controls how tall the preview is (default 200px). Set it to 0 to turn previews off entirely. The preview resizes live when you change the setting.Release Notes
New Features
Bug Fixes
Validation Steps
@:quarto @:plots @:ark
Covered by the new e2e test
test/e2e/tests/quarto/quarto-inline-output-plot-attribution.test.tsand unit tests (positronPlotsService.vitest.ts,plotUtils.vitest.ts,activityOutputPlot.vitest.tsx).Manual check:
console.showNotebookConsoles).console.notebookPlotPreviewHeightto 0 (previews hidden) and to e.g. 300 (previews resize live).