Skip to content
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

Problems with aligning {ojs} cells #12174

Open
EinMaulwurf opened this issue Feb 27, 2025 · 0 comments
Open

Problems with aligning {ojs} cells #12174

EinMaulwurf opened this issue Feb 27, 2025 · 0 comments
Assignees
Labels
bug Something isn't working observable-js
Milestone

Comments

@EinMaulwurf
Copy link

Bug description

Using two {ojs} cells where one has //| panel: sidebar will not work properly if there comes no new heading afterwards.

Steps to reproduce

---
format: html
---

# Palmer Penguins

```{ojs}
//| echo: false
pdata = FileAttachment("palmer-penguins.csv").csv({typed: true})

filtered = pdata.filter(function(penguin) {
  return bill_length_min < penguin.bill_length_mm &&
         islands.includes(penguin.island);
})
```

```{ojs}
//| echo: false
//| output: true
//| panel: sidebar
viewof bill_length_min = Inputs.range(
  [32, 50], 
  {value: 35, step: 1, label: "Bill length (min):"}
)
viewof islands = Inputs.checkbox(
  ["Torgersen", "Biscoe", "Dream"], 
  { value: ["Torgersen", "Biscoe"], 
    label: "Islands:"
  }
)
```

```{ojs}
//| echo: false
//| output: true
Plot.rectY(filtered, 
  Plot.binX(
    {y: "count"}, 
    {x: "body_mass_g", fill: "species", thresholds: 20}
  ))
  .plot({
    facet: {
      data: filtered,
      x: "sex",
      y: "species",
      marginRight: 80
    },
    marks: [
      Plot.frame(),
    ]
  }
)
```

# REMOVE THIS HEADING FOR FAILURE

Actual behavior

Image

Expected behavior

Image

Your environment

MacOS

❯ quarto --version
1.7.13

Quarto check output

❯ quarto check
Quarto 1.7.13
[✓] Checking environment information...
      Quarto cache location: /Users/sebastiangeis/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.7.13
      Path: /Applications/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /Library/TeX/texbin
      Version: 2024

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
      Source: MacOS known location

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

[✓] Checking Python 3 installation....OK
      Version: 3.13.2
      Path: /opt/homebrew/opt/[email protected]/bin/python3.13
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
      Version: 4.4.2
      Path: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources
      LibPaths:
        - /Users/sebastiangeis/Library/R/arm64/4.4/library
        - /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
      knitr: 1.49
      rmarkdown: 2.29

[✓] Checking Knitr engine render......OK
@EinMaulwurf EinMaulwurf added the bug Something isn't working label Feb 27, 2025
@cscheid cscheid self-assigned this Feb 27, 2025
@cscheid cscheid added this to the v1.7 milestone Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working observable-js
Projects
None yet
Development

No branches or pull requests

2 participants