quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
315 stars 26 forks source link

VSCode Extension : Preview not working as expected for websites #472

Open declann opened 3 months ago

declann commented 3 months ago

Bug description

The extension Preview button doesn't correspond to what I expect from quarto preview (since it does quarto preview path/to/file.qmd)

I don't use the extension because quarto preview behavior is a better workflow for me when working with websites.

Perhaps Preview is an ambiguous UI and either behavior is arguably correct. But I am stating specifically what I expected, plus behavior from vanilla quarto preview. (and this despite the title - so feel free to close if you disagree)

I don't use the extension because I cannot reproduce the experience of quarto preview inside it when working with websites, which is my preferred workflow.

ref #6440

Steps to reproduce

First turn on Render on Save in extension

then

quarto create
# then select project, website, name: the-website
cd the-website
code .
# press Preview button on index.qmd
# edit abount.qmd

Expected behavior

Preview pane redirects to re-rendered about.qmd

Actual behavior

nothing: no render or redirect

Your environment

vscode 1.90.2

on ubuntu 22.04

Quarto check output

Quarto 1.5.47
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK

extension v1.113.0

mcanouil commented 3 months ago

FYI, the behaviour described here.

https://github.com/quarto-dev/quarto/assets/8896044/f16f3e7b-e5ae-423d-bd87-4c30c797a757

While if no file (thus the project) is provided to quarto preview

https://github.com/quarto-dev/quarto/assets/8896044/4c8c1d69-39c4-4ad5-8582-031ed5c050be

Note that the command Quarto: Preview does the same thing as the button. What's missing is the equivalent of Quarto: Render Project but for preview, i.e., Quarto: Preview Project which could obey the "render in save" option ("watch inputs").