-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
add reporter #635
add reporter #635
Conversation
Fantastic job, everything is ok. We only have to remove " reporter <- teal.reporter::Reporter$new()" from example app, your first comment. |
reporter <- teal.reporter::Reporter$new() | ||
|
||
if (use_reporter(modules)) { | ||
modules <- append_module(modules, reporter_previewer_module()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be done before ui_tabs_with_filters (~ 20 lines below) so that the previewer ui is appended before being called
One think to check here insightsengineering/teal.reporter#48 (comment) "Does the reporter instance unique for each user on the deployed app." |
It seems to be unique per shiny session - but def worth checking |
Code Coverage Summary
Results for commit: d2b772dd9ad0551b343b5e787f4d41872fc3c939 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
checkmate::assert_class(module, "teal_module") | ||
modules$children <- c(modules$children, list(module)) | ||
labels <- vapply(modules$children, function(submodule) submodule$label, character(1)) | ||
names(modules$children) <- make.unique(gsub("[^[:alnum:]]", "_", tolower(labels)), sep = "_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what capacity are the names of the modules used in teal
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan on testing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suspicion is it is to do with knowing which module is active so that a signal can be sent to the filter panel when they change. @gogonzo ?
Do you plan on testing this?
Erm, This is copied from the modules
function we'll see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test written let me know if you want more
tests/testthat/test-modules.R
Outdated
server_fun <- function(id, datasets) { | ||
} | ||
|
||
ui_fun <- function(id, ...) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is defined a few times.
Please define it once at the top
mod <- create_mod(label = "a") | ||
mod2 <- create_mod(label = "c") | ||
mods <- modules(label = "c", mod, mod2) | ||
mod3 <- create_mod(label = "c") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please define once reused variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have discussed with M, keeping this as is to keep tests independent
Co-authored-by: Maciej Nasinski <[email protected]>
Co-authored-by: Maciej Nasinski <[email protected]>
Co-authored-by: Mahmoud Hallal <[email protected]>
Co-authored-by: Mahmoud Hallal <[email protected]>
Co-authored-by: Mahmoud Hallal <[email protected]>
Co-authored-by: Mahmoud Hallal <[email protected]>
Co-authored-by: Maciej Nasinski <[email protected]>
@mhallal1 I already update the example app to use regular div not a fluidRow. |
Regarding the styling - I have opened another issue to style I don't think I am touching individual buttons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes insightsengineering/teal.reporter#5 also uses insightsengineering/teal.reporter#47 and a PR for rtables here insightsengineering/rtables#328
See also https://github.com/insightsengineering/idr-tasks/issues/301