Open erikrenz88 opened 1 year ago
Apologies again - I know this is not a lot of detail. I can share the snippets of the telemetry objects for reference
Okay - so here's what I've got:
In main.R above ui and server functions:
log_file_path <- 'selfserve_usage.txt'
enableBookmarking(store = 'url')
telemetry <- shiny.telemetry::Telemetry$new(
app_name = 'EncounterSelfServe', #make this a variable dependent on selection of view
data_storage = shiny.telemetry::DataStorageLogFile$new(
log_file_path = log_file_path
))
in the ui of the main.R:
shiny.telemetry::use_telemetry()
In the server of the main.R:
telemetry$start_session( login = T, logout = T, browser_version = T, session = session )
which then gets passed to the data module here:
data$server('data', vals = dat, view_cols, view_fils, telemetry = telemetry)
And the telemetry object inside the data module server function:
server <- function(id, vals, view_cols, view_fils, telemetry) {
moduleServer(id, function(input, output, session) {
telemetry$log_input(
'cols',
track_value = TRUE,
input_type = 'text',
session = session
)
Let me know if there's more I can provide
Thanks for reporting this Erik!
I've been trying to replicate the problem without success, so we need more information.
The following example using Dropdown.shinyInput
appears to work as intended.
Can you help us and give a bit more information on how to best replicate this? (without divulging any sensitive information)
Dropdown.shinyInput
shiny.fluent
are you usingThanks a lot!
library(shiny)
library(shiny.fluent)
library(shiny.telemetry)
log_file_path <- "selfserve_usage.txt"
enableBookmarking(store = "url")
telemetry <- shiny.telemetry::Telemetry$new(
app_name = "EncounterSelfServe",
data_storage = shiny.telemetry::DataStorageLogFile$new(
log_file_path = log_file_path
)
)
# data module -----------------------------------------------------------------
data <- list(
ui = function(id) {
ns <- NS(id)
options <- list(
list(key = "A", text = "Option A"),
list(key = "B", text = "Option B"),
list(key = "C", text = "Option C")
)
div(
Dropdown.shinyInput(ns("dropdown"), value = "B", options = options),
reactOutput(ns("dropdownValue"))
)
},
server = function(id, telemetry) {
moduleServer(id, function(input, output, session) {
telemetry$log_input(
"dropdown",
track_value = TRUE,
input_type = "text",
session = session
)
output$dropdownValue <- renderReact({
shiny.fluent::Text(sprintf("Value: %s", input$dropdown))
})
})
}
)
# ------------------------------------------------------------------------------
ui <- function(id) {
ns <- NS(id)
tagList(
shiny.telemetry::use_telemetry(),
#
h2("A Title"),
div(
style = "display: flex; gap: .2em;",
Label("A Checkbox:"),
Checkbox.shinyInput(ns("checkbox"), value = FALSE),
reactOutput(ns("checkboxValue"))
),
hr(),
data$ui(ns("first_choices")),
hr(),
span("the end")
)
}
server <- function(id, telemetry) {
moduleServer(id, function(input, output, session) {
telemetry$log_input("checkbox", track_value = F, input_type = "text", session = session)
output$checkboxValue <- renderReact({
shiny.fluent::Text(sprintf("Value: %s", input$checkbox))
})
data$server("first_choices", telemetry)
})
}
if (interactive()) {
shinyApp(ui("app"), function(input, output, session) {
telemetry$start_session(
login = T,
logout = T,
browser_version = T
, track_inputs = T
# , track_values = F
# , session = session
)
server("app", telemetry)
})
}
@erikrenz88 can you give some extra feedback? thanks :bow:
Apologies @averissimo - I will try and reproduce this week. I've been trying to deploy an app and managing the feedback. Sorry for the delay!
@erikrenz88 I imagine isolating the problem on a live app might be a tad difficult 😅
Let me know if I can help out with something
Clearly this got lost in the weeds. In the elapsed time, I did get everything migrated to a preprod environment and have a stable version on the prod environment which I am working on this week so I will go back to the telemetry piece right after I finish some in demand bookmarking!
Guidelines
Project Version
0.2.0
Platform and OS Version
Windows 10 19044.3570
Existing Issues
No response
What happened?
I installed the latest version of shiny.telemetry to update the package in my app. When this was done, the inputs I had previously ben tracking in version 0.1.0 became disabled. I was using Dropdown.shinyInput from the shiny.fluent package and had a telemetry object attached. The inputs rendered but when clicked, no dropdown menu appeared.
Steps to reproduce
Expected behavior
No change to inputs
Attachments
No response
Screenshots or Videos
No response
Additional Information
No response