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

f7Slider with icon labels not working #222

Closed
tanho63 opened this issue Apr 15, 2022 · 2 comments
Closed

f7Slider with icon labels not working #222

tanho63 opened this issue Apr 15, 2022 · 2 comments
Labels
fixed-in-rc-1.0.0 Fixed in latest devel

Comments

@tanho63
Copy link
Contributor

tanho63 commented Apr 15, 2022

Hello! I think this was working in a previous version of shinyMobile so this is a bit unexpected, but it seems that f7Slider's no longer working properly with the labels argument (testing with the rc-1.0.0 branch) - it reports "Error: $ operator is invalid for atomic vectors"

Reprex code is the basic example from the docs:

reprex from docs
if(interactive()){
 library(shiny)
 library(shinyMobile)

 shinyApp(
   ui = f7Page(
    title = "My app",
    f7SingleLayout(
     navbar = f7Navbar(title = "f7Slider"),
     f7Card(
      f7Slider(
       inputId = "obs",
       label = "Number of observations",
       max = 1000,
       min = 0,
       value = 100,
       scaleSteps = 5,
       scaleSubSteps = 3,
       scale = TRUE,
       color = "orange",
       labels = tagList(
        f7Icon("circle"),
        f7Icon("circle_fill")
       )
      ),
      verbatimTextOutput("test")
     ),
     plotOutput("distPlot")
    )
   ),
   server = function(input, output) {
    output$test <- renderPrint({input$obs})
    output$distPlot <- renderPlot({
     hist(rnorm(input$obs))
    })
   }
 )
}

which produces this error.
image

Session info:

sessionInfo() ``` R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
[3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252

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

other attached packages:
[1] shinyMobile_1.0.0.9000 shiny_1.6.0 devtools_2.4.2.9000
[4] usethis_2.1.5

loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 compiler_4.1.0 later_1.2.0 prettyunits_1.1.1
[5] remotes_2.4.0 tools_4.1.0 testthat_3.0.4 digest_0.6.27
[9] pkgbuild_1.2.0 pkgload_1.2.1 jsonlite_1.7.2 memoise_2.0.0
[13] evaluate_0.14 lifecycle_1.0.1 rlang_1.0.2 cli_3.2.0
[17] yaml_2.2.1 xfun_0.30 fastmap_1.1.0 withr_2.5.0
[21] knitr_1.37 desc_1.4.0 fs_1.5.2 rprojroot_2.0.2
[25] glue_1.6.2 R6_2.5.1 processx_3.5.2 rmarkdown_2.11
[29] sessioninfo_1.1.1 callr_3.7.0 purrr_0.3.4 magrittr_2.0.2
[33] ps_1.6.0 promises_1.2.0.1 ellipsis_0.3.2 htmltools_0.5.2
[37] xtable_1.8-4 mime_0.12 httpuv_1.6.1 cachem_1.0.6
[41] crayon_1.5.1

</details>
@tanho63
Copy link
Contributor Author

tanho63 commented Apr 15, 2022

Some debugging dives:

image

image

which seems to point at https://github.com/RinteRface/shinyMobile/blob/master/R/f7-inputs.R#L2023-L2036 being the issue?

update: devel version doesn't have this issue... trying to figure out what the difference is - maybe f7Icon is different?

edit: f7Icon is different, there's now the dependencies injected in it, which is where the extra layer comes from...now why isn't my remotes installing it properly? :(

@tanho63
Copy link
Contributor Author

tanho63 commented Apr 15, 2022

Oh! The dependencies were injected in the past but no longer injected there and now injected via f7Page 63135ab d'oh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-rc-1.0.0 Fixed in latest devel
Projects
None yet
Development

No branches or pull requests

2 participants