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

Don't pass FilteredData to the modules #634

Closed
gogonzo opened this issue May 18, 2022 · 1 comment
Closed

Don't pass FilteredData to the modules #634

gogonzo opened this issue May 18, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@gogonzo
Copy link
Contributor

gogonzo commented May 18, 2022

Modules should not depend on the class containing data and methods not needed in the modules.
Modules should receive named list of (reactive) data, then they can be reused outside of teal. Modules should have following arguments

tm_module(
  a b c <instructions for choices>
  data <list of reactives>, 
  expr <reactive expr>,
  ... # FilterPanel-api, metadata etc
)

Currently following methods from FilteredData are used in the modules:

  • $get_data(filtered = TRUE)
  • $get_data(filtered = FALSE) ❌ see occurrences. This can be fixed by including unfiltered data to the module also.
  • $datanames() - this will be the names of the list
  • $get_metadata(), $get_keys() - should we pass using ...? Please find the optimal solution.
  • $get_varlabels - this can be extracted from the raw data.frame object

Alternatively datasets can be wrapped in the simple class object with limited number of methods.

@gogonzo
Copy link
Contributor Author

gogonzo commented May 23, 2022

duplicate of #624

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

No branches or pull requests

1 participant