Skip to content
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

Implement reporter buttons and simple previewer inside "simple shiny"/NEST App #5

Closed
Tracked by #11
Polkas opened this issue Mar 21, 2022 · 10 comments · Fixed by insightsengineering/teal#635
Closed
Tracked by #11
Assignees
Labels

Comments

@Polkas
Copy link
Contributor

Polkas commented Mar 21, 2022

linked to insightsengineering/NEST-roadmap#11

When Simple Previewer, reporter buttons are ready we have to create example apps for nonNEST and NEST scenario.

DEMO for End Users and Business partners.

This have to be done before UAT.

@kpagacz kpagacz transferred this issue from another repository Mar 23, 2022
@gogonzo gogonzo transferred this issue from insightsengineering/teal Mar 30, 2022
@nikolas-burkoff
Copy link
Contributor

Please also create an issue in coredev tasks to add the created sample app to teal.gallery (don't add it yet as once we add it we will need to release teal.reporter which we may not want to do this increment)

@Polkas Polkas removed the blocked label May 13, 2022
@nikolas-burkoff
Copy link
Contributor

nikolas-burkoff commented May 13, 2022

So I would separate this into two different tasks, one to get the reporter working in teal apps (i.e. via teal::init) and one to get it working with specific tmg/tmc modules.

My overriding principle for getting the reporter into teal::init is that the app developer should not need to know anything about the reporter therefore - for now I propose:

  • Reporter class gets created somewhere inside teal::init
  • teal modules can (but do not have to) have a reporter argument:
tm_file_viewer_srv <- function(id,...)
tm_variable_browser_srv <- function(id, datasets, ...)

tm_outlier_srv <- function(id, datasets, reporter, ...){
    reporter$do_stuff()
}

tm_outlier_ui <- function(id, ...){
  standard_layout(  
     above_encoding_panel = add_reporter_ui(ns("report_ui")),  # e.g.
    ...
}

  • when teal::init (or its appropriate children) actually creates the modules, it can check if any of them have a reporter argument (a bit annoying with nested modules true) and if so it adds an additional (teal) module onto the end which shows the report previewer

Note also worth keeping insightsengineering/teal#624 in mind as a future requirement - therefore inside modules with reporter we may want to make it so that if you are running the module outside of teal::init then you do not have to give a reporter object if you don't want to - or some other clever idea

@kpagacz
Copy link
Contributor

kpagacz commented May 13, 2022

Where to put the previewer module is a bit of a problem - teal demands a particular set of arguments to a module that a previewer almost certainly doesn't need in its entirety. Maybe it's time to make teal modules more liberal?

@nikolas-burkoff
Copy link
Contributor

nikolas-burkoff commented May 13, 2022

@kpagacz we have this insightsengineering/teal#535 which should make it easier to create teal modules

@nikolas-burkoff
Copy link
Contributor

Note also worth keeping insightsengineering/teal#624 in mind as a future requirement - therefore inside modules with reporter we may want to make it so that if you are running the module outside of teal::init then you do not have to give a reporter object if you don't want to - or some other clever idea

@Polkas
Copy link
Contributor Author

Polkas commented May 17, 2022

The Nik answer not raise the important aspect of how to turn off/on the reporter functionality, for the whole app and each module.
When we turn off the reporter for the app it should be hidden everywhere even in the each module UI.
Should our modules have an additional argument like reporter = TRUE, so we could hide the functionality for a specific module.
So we should control existence of the reporter from one place not a many which will be hard to maintain and understand.
In the current proposition the reporter always live inside the teal app which I do not think is the best idea nevertheless could be needed.

@gogonzo
Copy link
Contributor

gogonzo commented May 17, 2022

image

Current conclusion is:

  • If any of the modules passed to teal has a reporter argument then create a Reporter object somewhere in teal::init (probably srv_teal)
  • add reporter-previewer to the list of teal_modules (please decide whether at the beginning or at the end)
  • Pass the reporter to the ui_nested_tabs.teal_module and srv_nested_tabs.teal_module if the module has a reporter argument in the formals.
  • Write tests
  • Vignette in other issue Vignette - teal with reporter teal#632

@nikolas-burkoff
Copy link
Contributor

nikolas-burkoff commented May 18, 2022

Note @pawelru @arkadiuszbeer once this is done then teal.reporter will be a dependency of teal so will need to be released and open sourced when teal is

@pawelru
Copy link
Contributor

pawelru commented May 18, 2022

Note @pawelru @arkadiuszbeer once this is done then teal.reporter will be a dependency of teal so will need to be released and open sourced when teal is

Are we sure we want to add it right before planned release? Or it's intended to stay in the feature branch?

@Polkas
Copy link
Contributor Author

Polkas commented May 18, 2022

I am very happy about @nikolas-burkoff implementaion insightsengineering/teal#635 (comment)

Looks like we are home. I think we should be ready, still depending how many capacity will be allocated on the teal.reporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants