-
-
Notifications
You must be signed in to change notification settings - Fork 46
Redesign the teal modules #1548
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
base: main
Are you sure you want to change the base?
Conversation
There's a new widget for a sidebar overlay Examples for testing
|
Apart from documentation other things are ready for review @gogonzo |
Code Coverage Summary
Diff against main
Results for commit: 5ac435b Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 26 suites 2m 7s ⏱️ Results for commit 5ac435b. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit b34e6c4 ♻️ This comment has been updated with latest results. |
95d18a5
to
f57bd8a
Compare
a8bed55
to
953249c
Compare
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.
I like this design better than sliding from the side.
R/module_teal.R
Outdated
if (inherits(data, "teal_data_module")) { | ||
teal_data_resolved_state <- reactiveVal(FALSE) |
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.
Why is it needed? When data_signatured
returns teal_data
then it is resolved, we don't need a new object to determine this. If data_signatured()
returns req-error, observeEvent
shouldn't be triggered.
teal_data_resolved_state <- reactiveVal(FALSE) |
@@ -165,8 +152,10 @@ srv_teal <- function(id, data, modules, filter = teal_slices()) { | |||
|
|||
data_load_status <- reactive({ | |||
if (inherits(data_handled(), "teal_data")) { | |||
teal_data_resolved_state(TRUE) |
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.
Doesn't seem to be needed as data_load_status
holds the same information
teal_data_resolved_state(TRUE) |
R/module_teal.R
Outdated
observeEvent(teal_data_resolved_state(), { | ||
if (teal_data_resolved_state()) { | ||
shinyjs::enable(id = "close_teal_data_module_modal") |
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.
observeEvent(teal_data_resolved_state(), { | |
if (teal_data_resolved_state()) { | |
shinyjs::enable(id = "close_teal_data_module_modal") | |
observeEvent(data_load_status(), { | |
if (identical(data_load_status(), "ok")) { | |
shinyjs::enable(id = "close_teal_data_module_modal") |
R/module_teal.R
Outdated
observeEvent(data_handled(), { | ||
if (inherits(data_handled(), "teal_data")) { | ||
shinyjs::enable(id = "close_teal_data_module_modal") | ||
} | ||
}) |
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.
observeEvent(data_handled(), { | |
if (inherits(data_handled(), "teal_data")) { | |
shinyjs::enable(id = "close_teal_data_module_modal") | |
} | |
}) | |
observeEvent(data_load_status(), { | |
if (identical(data_load_status(), "ok")) { | |
shinyjs::enable(id = "close_teal_data_module_modal") | |
} | |
}) |
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.
or use data_signatured()
. Please have a look at srv_teal
to see if data_load_status
is used consistently.
// not included in the original HTML | ||
|
||
// this code alows the show R code "copy to clipbaord" button to work | ||
var clipboard = new ClipboardJS(".btn[data-clipboard-target]"); |
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.
Just saying that show_rcode_modal
uses this. It is still soft (not hard) deprecated
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.
👍🏽 Let me move this dependency to just the show_rcode_modal()
for now.
@@ -118,8 +73,40 @@ srv_teal <- function(id, data, modules, filter = teal_slices()) { | |||
shinyjs::showLog() | |||
} | |||
|
|||
# `JavaScript` code | |||
run_js_files(files = "init.js") | |||
output$main_teal_ui <- renderUI({ |
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.
Given that data module is a modal it is not needed so much to keep it in the server. IMO this can be moved to the UI
Closes #1525 and potentially address #1539