insightsengineering / insightsengineering/teal
Simplify `module()` defaults
- Dominant language
- R
- Stars
- 263
- Forks
- 59
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 5
Description
This is what I'm seeing in manual:
```
module(
label = "module",
server = function(id, ...) {
moduleServer(id, function(input, output, session) {
})
},
ui = function(id, ...) {
tags$p(paste0("This module has no UI (id: ", id, " )"))
},
filters,
datanames = "all",
server_args = NULL,
ui_args = NULL
)
modules(..., label = "root")
# S3 method for teal_module
format(x, indent = 0, ...)
# S3 method for teal_module
print(x, ...)
# S3 method for teal_modules
format(x, indent = 0, ...)
# S3 method for teal_modules
print(x, ...)
```
I think we can simplify the default ui and server arguments.
A proposal:
```
server = function(id, ...) {
moduleServer(id, function(input, output, session) NULL)
},
ui = function(id, ...) NULL,
```
I would even test it with the following:
```
server = function(id, ...) NULL,
ui = function(id, ...) NULL,
```
Contributor guide
Assessment
This issue has not been assessed yet.