quarto-dev / quarto-dev/quarto-cli

[lightbox] Allow to configure lightbox image size

Open
#10,315 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

When using lightbox: true and fig-format: svg, the lightbox image of an R-plot will have the same size as the original one (i.e., there is no zoom-in). When removing fig-format: svg in the code below, everyting works as intended.

Steps to reproduce
---
title: "Untitled"
editor: visual
format: 
  html:
    lightbox: true
    fig-format: svg
---

```{r}
plot(1:10)
```
Expected behavior

There should be a zoom-in effect.

Actual behavior

No zoom-in effect.

Your environment
  • RStudio 2024.04.2+764
  • Quarto 1.5.54 (C:/Users/meierluk/AppData/Local/Programs/Quarto/bin/quarto.exe)
Quarto check output
Quarto 1.5.54
[>] 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.54
      Path: C:\Users\meierluk\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2024.04
      Chromium: (not installed)

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

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

[>] Checking Python 3 installation....OK
      Version: 3.10.0
      Path: C:/Users/meierluk/AppData/Local/Programs/Python/Python310/python.exe
      Jupyter: 5.7.2
      Kernels: julia-1.9, python3

(|) Checking Jupyter engine render....Traceback (most recent call last):
  File "C:\Users\meierluk\AppData\Local\Programs\Quarto\share\jupyter\jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "C:\Users\meierluk\AppData\Local\Programs\Quarto\share\jupyter\notebook.py", line 15, in <module>
    from yaml import safe_load as parse_string
ModuleNotFoundError: No module named 'yaml'
[>] Checking Jupyter engine render....OK

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 minimal Quarto document twice, once with fig-format: svg and once without it, then compare the generated HTML lightbox behavior. Trace the lightbox handling for R plots and SVG figures; done means the SVG case provides the same zoom-in effect as the non-SVG case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.