Closed Polkas closed 7 months ago
Closing this up as reporter cards can be restored from the bookmarking. We are not planning to restore any teal components individually but we are aiming to restore everything globally. Please check out shinyApp(..., enableBookmarking = "server")
@Polkas could you please merge main branch ad resolve conflicts?
@gogonzo done:)
I have to leave all print(cond) as the warning(cond) passes the error and the Shiny app crashes.
I have to leave all print(cond) as the warning(cond) passes the error and the Shiny app crashes.
What about message()
?
I have to leave all print(cond) as the warning(cond) passes the error and the Shiny app crashes.
What about
message()
?
Unfortunately, a message()
materializes the error and causes an app crash.
Load is not included in the teal previewer now. Please consider additional teal.option for that, as my team will be happy to have the ability to add a load feature to teal.
I fixed bookmarking with the code below; please write if you do not want to merge it here
session$onBookmark(function(state) {
reporterdir <- file.path(state$dir, "reporter")
dir.create(reporterdir)
reporter$to_jsondir(reporterdir)
})
session$onRestored(function(state) {
reporterdir <- file.path(state$dir, "reporter")
reporter$from_jsondir(reporterdir)
})
Load is not included in the teal previewer now. Please consider additional teal.option for that, as my team will be happy to have the ability to add a load feature to teal.
We don't yet decided about the recommended way in teal
to load reporter this is why we don't want to have another "restore" functionality (after snapshot manager and bookmarking). teal::previewer_module
will have load disabled but you will be able to create own previewer module and include it into teal::init(modules = list(..., <your previewer module>)
.
I fixed bookmarking with the code below; please write if you do not want to merge it here
session$onBookmark(function(state) { reporterdir <- file.path(state$dir, "reporter") dir.create(reporterdir) reporter$to_jsondir(reporterdir) }) session$onRestored(function(state) { reporterdir <- file.path(state$dir, "reporter") reporter$from_jsondir(reporterdir) })
Thanks, this is good 👍
I will make a final review next week as I have few days off. PR looks good both here and teal
👍 Thanks!
Danke, great collabo:)
@Polkas do the honors ;)
@Polkas do the honors ;)
Thanks:D but you have to be the one as “Only those with write access to this repository can merge pull requests.” Once more thanks for the collab:)
closes #81 continuation of https://github.com/insightsengineering/teal.reporter/pull/177 linked to https://github.com/insightsengineering/teal/pull/1120 Please install this teal branch when testing the code
I created a new PR from the fork as I am no longer part of the insightengineering group. My work is done as a collaboration of UCB company with Roche. insightengineering developers can edit this PR.
I followed a simple design, which was evaluated positively in the discussion.
DONE:
report_load_srv
andreport_load_ui
; similar direct update for Previewer.Archiver
Class as we not need it for this simplified scenario.to_list
andfrom_list
Reporter
methodsset_id
andget_id
Reporter
methods. Optionally add id to a Report which will be compared when it is rebuilt from a list. To test it in the teal example app please download a report and then add a new module or dataset to the app and try to load it back. The report can be loaded back to teal app only with the same datasets and modules. The id is added to the downloaded file name if exists.to_list
andfrom_list
ReportCard
methods (linked with https://github.com/insightsengineering/teal/pull/1120)warning(cond)
everywhere to be consistent. We should send the error/warning to the R console when STH fails.testServer
tests for report_load_srv/report_load_ui modules.Points to consider:
Example Teal App (play with bootstrap versions, simple reporter modules, and add new data/module to confirm the report can not be then reloaded):
Example general shiny app (play with bootstrap versions, simple reporter modules):