shinyFeedback
shinyFeedback copied to clipboard
Conflict with `rstudio/bslib`
When using rstudio/bslib
, shinyFeedback
couldn't put its output correctly.
demo:
if (interactive()) {
library(shinyFeedback)
library(bslib)
options(device.ask.default = FALSE)
ui <- fluidPage(
# theme = bs_theme(),
useShinyFeedback(),
textInput('input', 'text'),
textOutput('output')
)
server <- function(input, output) {
output$output <- renderText({
feedbackSuccess("input", input$input, "Input test")
})
}
shinyApp(ui, server)
}
Without bslib
:
With bslib
:
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shinyFeedback_0.3.0.9000 bslib_0.2.2.9000 readr_1.4.0 stringr_1.4.0
[5] tibble_3.0.4 dplyr_1.0.2 shiny_1.5.0.9005
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 jquerylib_0.1.2 compiler_4.0.3 pillar_1.4.6 later_1.1.0.1
[6] gfonts_0.1.1.910 shinyjs_2.0.0 tools_4.0.3 digest_0.6.27 jsonlite_1.7.1
[11] lifecycle_0.2.0 pkgconfig_2.0.3 rlang_0.4.8.9000 rstudioapi_0.13 writexl_1.3.1
[16] crul_1.0.0 curl_4.3 yaml_2.2.1 fastmap_1.0.1 withr_2.3.0
[21] systemfonts_0.3.2 rappdirs_0.3.1 sass_0.2.0.9005 hms_0.5.3 generics_0.1.0
[26] fs_1.5.0 vctrs_0.3.4 tidyselect_1.1.0 glue_1.4.2 httpcode_0.3.0
[31] R6_2.5.0 textshaping_0.2.1 pacman_0.5.1 purrr_0.3.4 magrittr_2.0.0
[36] promises_1.1.1 ellipsis_0.3.1 htmltools_0.5.0.9002 usethis_1.6.3 rsconnect_0.8.16
[41] mime_0.9 xtable_1.8-4 httpuv_1.5.4 ragg_0.4.0 stringi_1.5.3
[46] cachem_0.0.0.9000 crayon_1.3.4
Hi @niheaven,
Thanks for the detailed reprex. Using the most recent development version of shinyFeedback
& bslib
and then running the app with & without bslib
, I wasn't able to recreate the issue shown in your screenshots. Can you try installing the most recent GitHub versions of both packages, as well as opening the app in a web browser (not the RStudio Viewer), and confirm this is still occurring?
Also, keep in mind that bslib
is still an experimental package without any CRAN (stable) releases, so it will be changing rapidly & some (if not most) of these changes will be breaking changes without deprecation. Therefore, we won't be able to account for these changes until the first CRAN release of bslib
.
Yes thanks @niheaven !
@phoward38 I was able to recreate the issue.
I tried a quick fix for the textInput from @niheaven 's example using bslib
and Bootstrap 4, and I wasn't able to quickly get the icon positioned properly (it looked just like it does in @niheaven 's example). It is probably going to be a large amount of work to update shinyFeedback
to support bslib
's use of bootstrap 4 for all the Shiny inputs. We are going to have to wait until bslib has a CRAN release before we attempt to update shinyFeedback. For now, several of the feedbacks should work with bslib
's bootstrap 4 as long as you set the icon = NULL
in your feedbacks, but I have not tested any inputs out other than textInput.
We'll keep this open as a reminder to look into updating shinyFeedback when bslib has a CRAN release.
Now bslib
is on CRAN, so will you have some updating plan?
Any recent update? @merlinoa
Dig again 🤣
Hmm, sorry, any solution after 2yrs? 😄 @merlinoa Really want to use bslib w/ shinyFeedback
can you just set icon = NULL?