quarto-dev / quarto-dev/quarto-cli

auto-animate, columns and code blocks

Open
#9,403 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug revealjs
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When using auto-animate with code blocks in columns the entire code blocks are replaced instead of just the part which actually changed in the code block.

Possibly related: https://github.com/quarto-dev/quarto-cli/issues/1823

While creating the example I noticed another bug.
Using {auto-animate="true"} leads to duplicated lines in the toc.

Steps to reproduce
---
# output format options - change these as required
format:
  revealjs:
    # auto-stretch: false
    # navigation-mode: vertical
    controls: true
    # progress: true
    # slide-number: h.v
    toc: true
    toc-depth: 1
    # # toc-location: left
    # chalkboard: true
    # # number-sections: true
    # # menu:
    # #   width: normal
    # #   side: left
# jupyter: python3
---

# autoanimate and code blocks {auto-animate="true"}

```{.python code-line-numbers="1|2"}
a
b
```

::: {.fragment .fade-in}
d
:::

# autoanimate and code blocks {auto-animate="true"}

```{.python code-line-numbers="2"}
a
c
```

# autoanimate and columns {auto-animate="true"}

:::: {.columns}
::: {.column width="70%"}
a
:::

::: {.column width="30%"}
b
:::
::::

# autoanimate and columns {auto-animate="true"}

:::: {.columns}
::: {.column width="70%"}
a
:::

::: {.column width="30%"}
c
:::
::::

# autoanimate, columns and codeblocks {auto-animate="true"}

:::: {.columns}
::: {.column width="70%"}
```{.python code-line-numbers="1|2"}
{{< include test.txt >}}
```
:::

::: {.column width="30%"}
::: {.fragment .fade-in}
```sh
a
```
:::
:::
::::

# autoanimate, columns and codeblocks {auto-animate="true"}

:::: {.columns}
::: {.column width="70%"}
```{.python code-line-numbers="2"}
{{< include test.txt >}}
```
:::

::: {.column width="30%"}
```sh
b
```
:::
::::
Expected behavior

Replace only part of the codeblock that actually changed.

Step through the slide with title autoanimate, columns and codeblocks to see the wrong behavior.
Compare to the previous slides (autoanimate and codeblocks and autoanimate and columns) to see how it should be handled.

Actual behavior

The entire code blocks are replaced.

Your environment
  • VSCode (latest) on MacOS using a devcontainer
  • devcontainer running debian bookworm
Quarto check output
# quarto check
Quarto 1.4.553
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.553
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

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

[✓] Checking Python 3 installation....OK
      Version: 3.12.3 (Conda)
      Path: /opt/conda/bin/python
      Jupyter: 5.7.2
      Kernels: python3

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

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by rendering the supplied Quarto markdown example and stepping through the slides titled “autoanimate, columns and codeblocks.” Compare its behavior with the preceding code-block and columns examples, then trace the revealjs auto-animate rendering path. Done means changed code lines animate without replacing entire blocks and the table of contents has no duplicated lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.