Thanks to visit codestin.com
Credit goes to github.com

Skip to content

quarto preview does not update all pages when project-wide contents change #10392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
victorrssx opened this issue Jul 26, 2024 · 3 comments
Open
Labels
books bug Something isn't working preview issues related to the `preview` command
Milestone

Comments

@victorrssx
Copy link

victorrssx commented Jul 26, 2024

Bug description

The problem initially occurred at Quarto books that I've been writing. After I make changes to a specific chapter and click 'Render', Quarto renders the document correctly, but RStudio does not show the new file in the viewer pane (the old one remains). It only updates when I stop the background job and render it again.

I tried changing every single piece of the yaml file to track down where the problem was but I was unsuccessful (which gave me a intuinton that the problem was not in that part). So I decided to create a new Quarto book project from scratch and add small changes to see when it would happen again.

Curiously the default Quarto book doesn't have this problem. But when I changed the default _quarto.yaml chapters part (code above), then the problem returned!

micro1ppge_test - RStudio 2024-07-26 12-57-39 (2)

Also I noticed some things:

  1. when _quarto.yaml is modified and changes saved, the document updates automatically
  2. the problem doesn't happen in standalone documents

Steps to reproduce

  1. Create a new Quarto Book project
  2. Create a test.qmd file with one 'Test' h1 header
  3. Change the default _quarto.yaml chapters part to
  chapters:
    - index.qmd

    - part: summary.qmd
      chapters: 
        - test.qmd
  1. Open the test.qmd file and click on 'Render' button to run the current document
  2. Change the header, write some text and render again

After this process only sidebar chapter title and breadcrumb should have changed (at least here)

Expected behavior

Changes should be addressed and displayed in the RStudio viewer panel.

Actual behavior

Changes are effectively made only after stop background job and render the document again.

Your environment

RStudio Edition : Desktop
RStudio Version : 2024.04.2+764
OS Version      : Windows 10 x64
R Version       : 4.4.1

Quarto check output

Quarto 1.5.55
[>] 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
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.5.55
      Path: C:\Users\Victor\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\Victor\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2024

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.10.7
      Path: C:/Users/Victor/AppData/Local/Programs/Python/Python310/python.exe
      Jupyter: 5.7.2
      Kernels: python3

[>] Checking Jupyter engine render....OK

(-) Checking R installation...........Carregando pacotes exigidos: pacman
[>] Checking R installation...........OK
      Version: 4.4.1
      Path: C:/PROGRA~1/R/R-44~1.1
      LibPaths:
        - C:/Users/Victor/AppData/Local/R/win-library/4.4
        - C:/Program Files/R/R-4.4.1/library
      knitr: 1.47
      rmarkdown: 2.27

[>] Checking Knitr engine render......OK
@victorrssx victorrssx added the bug Something isn't working label Jul 26, 2024
@cscheid
Copy link
Collaborator

cscheid commented Jul 26, 2024

I don't think this is an RStudio bug. This is a quarto preview bug more generally, where we fail to rerender some parts of the document that are project-wide.

@cscheid cscheid added preview issues related to the `preview` command books labels Jul 26, 2024
@cscheid cscheid changed the title Quarto book does not render correctly in RStudio quarto preview does not update all pages when project-wide contents change Jul 26, 2024
@cscheid cscheid added this to the Future milestone Jul 26, 2024
@drtingtp
Copy link

I have met the same issue and created a minimal producible repo for it: https://github.com/drtingtp/quarto-cli-issue-10392

Additional information

  1. Setting project > preview > nagivate as false does not disable the auto navigate behaviour.

    _quarto.yml:

    project:
        preview:
            navigate: false
    
  2. ...

    Actual behavior

    Changes are effectively made only after stop background job and render the document again.

    ...

    For my case, without stopping the preview session, saving the _quarto.yml file will trigger a refresh that renders the preview correctly again.

@einarpersson
Copy link

Hi!

I'm aware of #11475 and #2795 but I just want to add this particular case if it is not already considered as a part of this wider issue:

Adding a template-partial (in my case a custom title slide for revealjs) exhibit the same behaviour. I have to rerun quarto preview each time I do some minor change to my title slide, making it hard/tedious to iterate on. This is especially painful when doing something like css styling which often requires many tweaks.

    template-partials:
      - title-slide.html

I have read the linked issues and understand that this is a complex issue. Nevertheless it's on the top of my whishlist from a UX/DX perspective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
books bug Something isn't working preview issues related to the `preview` command
Projects
None yet
Development

No branches or pull requests

4 participants