Skip to content

Error using sortable in Quarto documents #219

Closed as not planned
Closed as not planned
@saudiwin

Description

@saudiwin

I am able to include sortable elements produced by rank_list in interactive mode in a Quarto document, but rendering files produces the following error:

processing file: test_sortable.qmd
  |..........................................          |  80% [test_sort]      Error in `validateCssUnit()`:
! "NApx" is not a valid CSS unit (e.g., "100%", "400px", "auto")
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
     ...
 16. base::withRestarts(...)
 17. base (local) withRestartList(expr, restarts)
 18. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 19. base (local) docall(restart$handler, restartArgs)
 21. evaluate (local) fun(base::quote(`<smplErrr>`))

I have tried with both the CRAN and development version of sortable. A stub Quarto document to reproduce the error is below:

---
title: "test_sortable"
format: HTML
server: shiny
---

library(sortable)

rank_list(
  text = "Notice that dragging causes items to swap",
  labels = c("Fish","Bread","Apples"),
  input_id = "rank_list_swap",
  options = sortable_options(swap = TRUE)
)

My sessionInfo is as follows:

R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.0

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] sortable_0.5.0.9000 shiny_1.9.1 glue_1.7.0 surveydown_0.7.2

loaded via a namespace (and not attached):
[1] jsonlite_1.8.8 compiler_4.4.2 promises_1.3.0 Rcpp_1.0.13
[5] assertthat_0.2.1 callr_3.7.6 later_1.3.2 yaml_2.3.10
[9] fastmap_1.2.0 mime_0.12 R6_2.5.1 commonmark_1.9.1
[13] curl_5.2.2 knitr_1.48 htmlwidgets_1.6.4 desc_1.4.3
[17] rprojroot_2.0.4 rlang_1.1.4 httpuv_1.6.15 xfun_0.47
[21] fs_1.6.4 cli_3.6.3 withr_3.0.1 magrittr_2.0.3
[25] learnr_0.11.5 ps_1.8.0 digest_0.6.37 processx_3.8.4
[29] rstudioapi_0.16.0 xtable_1.8-4 markdown_1.13 remotes_2.5.0
[33] lifecycle_1.0.4 evaluate_1.0.1.9000 pkgbuild_1.4.4 tools_4.4.2
[37] htmltools_0.5.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions