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

Refactor of the filter panel #851

Merged
merged 26 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
68bb345
fix after teal.slice
gogonzo Mar 9, 2023
89626c5
Merge remote-tracking branch 'origin/main' into filter_panel_refactor…
gogonzo Mar 16, 2023
beb3b0a
187 new api@filter panel refactor@main (#825)
chlebowa Apr 14, 2023
3c44f70
filterable (#830)
gogonzo May 3, 2023
7ff713d
Merge remote-tracking branch 'origin/main' into filter_panel_refactor…
gogonzo Jun 2, 2023
cfbc3d3
Merge remote-tracking branch 'origin/main' into filter_panel_refactor…
gogonzo Jun 6, 2023
61e5c23
reduce the amount of spelling issues / WORDLIST (#843)
m7pr Jun 12, 2023
fde15a4
Module specific filter panels (#837)
gogonzo Jun 16, 2023
c312dee
Merge fde15a48ec060f20df2cdba86e2fa306b1e5c07d into c51c0b0b47d52afb2…
gogonzo Jun 16, 2023
ede832f
[skip actions] Restyle files
github-actions[bot] Jun 16, 2023
139a723
330 [Feature Request]: Option to not show module_add (#852)
kartikeyakirar Jun 21, 2023
cf43277
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jun 21, 2023
bc6f2c0
Merge branch 'main' into filter_panel_refactor@main
gogonzo Jun 28, 2023
cc102fc
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jun 28, 2023
0c4aa11
Merge remote-tracking branch 'origin/main' into filter_panel_refactor…
gogonzo Jun 29, 2023
7f60f0d
`filter_var` and `filter_expr` to `teal_slice` (#857)
gogonzo Jul 5, 2023
e3b3a42
Merge 7f60f0d1fd18ff1f8ab274afdccfb93cbe786d71 into 603e041c477b01b96…
gogonzo Jul 5, 2023
00570d9
[skip actions] Restyle files
github-actions[bot] Jul 5, 2023
b8e69e3
Merge branch 'main' into filter_panel_refactor@main
gogonzo Jul 11, 2023
6365d6d
postmerge fixes
gogonzo Jul 11, 2023
116ec2f
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jul 11, 2023
f567156
update NEWS
gogonzo Jul 12, 2023
64abced
Update vignettes (#861)
gogonzo Jul 14, 2023
241569e
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Jul 14, 2023
5d8e8db
fix checks
gogonzo Jul 14, 2023
0a3f7f0
fix lifecycle note
gogonzo Jul 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ Title: Exploratory Web Apps for Analyzing Clinical Trials Data
Version: 0.13.0.9006
Date: 2023-07-07
Authors@R: c(
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
person("Pawel", "Rucki", , "[email protected]", role = "aut"),
person("Nikolas", "Burkoff", , "[email protected]", role = "aut"),
person("Mahmoud", "Hallal", , "[email protected]", role = "aut"),
person("Maciej", "Nasinski", , "[email protected]", role = "aut"),
person("Konrad", "Pagacz", , "[email protected]", role = "aut"),
person("Junlue", "Zhao", , "[email protected]", role = "aut"),
person("Dawid", "Kaledkowski", email = "[email protected]", role = c("aut", "cre")),
person("Pawel", "Rucki", email = "[email protected]", role = "aut"),
person("Aleksander", "Chlebowski", email = "[email protected]", role = "aut"),
person("Kartikeya", "Kirar", email = "[email protected]", role = "aut"),
person("Marcin", "Kosinski", email = "[email protected]", role = "aut"),
person("Adrian", "Waddell", , "[email protected]", role = "aut"),
person("Chendi", "Liao", email = "[email protected]", role = "rev"),
person("Dony", "Unardi", email = "[email protected]", role = "rev"),
person("Nikolas", "Burkoff", role = "aut"),
person("Mahmoud", "Hallal", role = "aut"),
person("Maciej", "Nasinski", role = "aut"),
person("Konrad", "Pagacz", role = "aut"),
person("Junlue", "Zhao", role = "aut"),
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd")),
person("Maximilian", "Mordig", role = "ctb")
)
Expand All @@ -24,21 +29,18 @@ Depends:
R (>= 4.0),
shiny,
teal.data (>= 0.1.2),
teal.slice (>= 0.3.0.9005),
teal.transform (>= 0.2.0)
Imports:
checkmate,
lifecycle,
logger (>= 0.2.0),
magrittr,
methods,
rlang,
shinyjs,
stats,
styler,
teal.code (>= 0.2.0),
teal.logger (>= 0.1.1),
teal.reporter (>= 0.1.1),
teal.slice (>= 0.2.0),
teal.widgets (>= 0.2.0),
utils
Suggests:
Expand All @@ -50,6 +52,7 @@ Suggests:
R6,
rmarkdown,
shinyvalidate,
teal.code (>= 0.3.0),
testthat (>= 3.1.5),
withr,
yaml
Expand All @@ -74,11 +77,11 @@ RoxygenNote: 7.2.3
Collate:
'dummy_functions.R'
'example_module.R'
'get_rcode.R'
'get_rcode_utils.R'
'include_css_js.R'
'modules.R'
'init.R'
'module_filter_manager.R'
'module_nested_tabs.R'
'module_tabs_with_filters.R'
'module_teal.R'
Expand All @@ -88,6 +91,7 @@ Collate:
'show_rcode_modal.R'
'tdata.R'
'teal.R'
'teal_slices.R'
'utils.R'
'validate_inputs.R'
'validations.R'
Expand Down
10 changes: 2 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ S3method(get_join_keys,default)
S3method(get_join_keys,tdata)
S3method(get_metadata,default)
S3method(get_metadata,tdata)
S3method(is_arg_used,"function")
S3method(is_arg_used,default)
S3method(is_arg_used,teal_module)
S3method(is_arg_used,teal_modules)
S3method(print,teal_module)
S3method(print,teal_modules)
S3method(srv_nested_tabs,default)
Expand All @@ -24,9 +20,6 @@ export(example_module)
export(get_code_tdata)
export(get_join_keys)
export(get_metadata)
export(get_rcode)
export(get_rcode_srv)
export(get_rcode_ui)
export(init)
export(module)
export(modules)
Expand All @@ -35,6 +28,7 @@ export(reporter_previewer_module)
export(show_rcode_modal)
export(srv_teal_with_splash)
export(tdata2env)
export(teal_slices)
export(ui_teal_with_splash)
export(validate_has_data)
export(validate_has_elements)
Expand All @@ -46,7 +40,7 @@ export(validate_no_intersection)
export(validate_one_row_per_id)
import(shiny)
import(teal.data)
import(teal.slice)
import(teal.transform)
importFrom(magrittr,"%>%")
importFrom(methods,is)
importFrom(stats,setNames)
31 changes: 21 additions & 10 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
# teal 0.13.0.9006

### New features

* Enabled module specific filter panel. See `module_specific` in `teal::teal_slices` documentation.
* Enabled `reporter_previewer_module` to customize default values through `srv_args`.
* Enabled passing own `reporter_previewer_module` in a list of modules to override default one.

### Breaking changes

* Specifying `filter` argument in `teal::init` requires `teal_slices` object now. Details in documentation of `teal::init`.

### Miscellaneous

* Removed `scda` package dependency from examples.

# teal 0.13.0

### Breaking changes
Expand Down Expand Up @@ -195,7 +206,7 @@ function call.
* Added informational stop message when using `mutate_data` with `RelationalDataConnector`.
* Modified `as_cdisc` to behave similarly to `cdisc_dataset` when called on a `Dataset` object.
* Changed the displayed format of the data name and the column name in `data_extract_spec` UI elements. Both are now compressed to `<data name>.<column name>` if they don't change during runtime of the app.
* Added `ADSAFTTE` to the list of recognized ADaM dataset names.
* Added `ADSAFTTE` to the list of recognized `ADaM` dataset names.
* Added another example to `data_extract_spec`'s doc string showcasing app users can choose a variable used for filtering in the encoding panel.
* Added CSS styling to tool tips in teal modules.

Expand All @@ -207,9 +218,9 @@ function call.

### Enhancements
* Released `snowflake` connection and connectors.
* Changed ordering of datasets to be more intuitive (topologically first for CDISC datasets only and then according to input datasets order).
* Changed ordering of datasets to be more intuitive (topologically first for `CDISC` datasets only and then according to input datasets order).
* When closing a teal app (ending a user shiny session), all `DataConnection`s will now try to close their connections.
* Added ADHY keys to configuration file.
* Added `ADHY` keys to configuration file.
* Extended the `filter_spec` function: the parameter `choices` is no longer mandatory (the function will take all possible choices by default) and the `vars` parameter additionally accepts the `choices_selected` and allows to change the variables for filtering using the UI elements in the encoding panel.

### Bug fixes
Expand Down Expand Up @@ -240,7 +251,7 @@ function call.

### New Features
* Added `python_dataset_connector` to create delayed data objects from python scripts or directly from python code.
* NOTE: `python_dataset_connector` is not yet ready to be deployed on RSConnect because it does not contain `numpy` and `pandas`, which are `Python` libraries used in `python_dataset_connector`.
* NOTE: `python_dataset_connector` is not yet ready to be deployed on `RSConnect` because it does not contain `numpy` and `pandas`, which are `Python` libraries used in `python_dataset_connector`.
* Added support for filtering on `Date` and `Datetime` variables in the Filter Panel.
* Added buttons for `date` and `datetime` filter widgets to reset the value to the original.
* Added new function `check_key_duplicates`, which creates a short summary about rows with duplicated primary key (row numbers and the number of duplicates)
Expand All @@ -249,7 +260,7 @@ function call.
* Fixed lack of labels for `character` and `factor` variables in the Filter Panel.
* All variables are now displayed in `module_filter_panel`, not only those of types `numeric`, `logical`, `factor`, `character` and `Date`
* Fixed `mutate_data` to accept the whole scope of objects for `vars`.
* Clarified `teal::init` function documentation to state that custom css loading code with `htmltools::htmlDependency` should be included in the `header` argument rather than inside `ui` arguments of modules.
* Clarified `teal::init` function documentation to state that custom `CSS` loading code with `htmltools::htmlDependency` should be included in the `header` argument rather than inside `ui` arguments of modules.
* Enabled empty select field inside `data_extract_spec`.
* Added new argument `drop_keys` to `filter_spec` to decide whether to drop or keep keys columns on single filter on those columns.
* Added a new optional argument `keys` to `variable_choices`. `keys` specifies the names of the variables, which should have the new key icon shown next to them in the variable drop down menus in the left-hand side encoding panels instead of the icon appropriate for their original R variable type. `variable_choices` now also works with `RelationalDataset` and `RelationalDatasetConnector` objects.
Expand All @@ -262,15 +273,15 @@ function call.
* Adds method to resolve nested lists containing delayed data objects, which can be used for `arm_ref_comp` objects.
* Nested tabs module now has better alignment with the filter panel on the page.
* Allow `width` argument in `optionalSelectInput`.
* Added lifecycle badges to all exported functions.
* Added `lifecycle` badges to all exported functions.
* Added new `code_dataset_connector` and `code_cdisc_dataset_connector` functions which enable the creation of new delayed data objects given a string of code.
* Added new functions `csv_dataset_connector` and `csv_cdisc_dataset_connector`.
* Updated `set_ui_input` method of `RawDatasetConnector` and `NamedDatasetConnector` to handle user defined shiny inputs.
* Include `Keep Inf` checkbox for numerical filter items. `Keep NA` and `Keep Inf` checkbox doesn't appear if there are no missing or infinite values.
* Replace existing `RelationalData` class with abstract class `RelationalDataCollection` and rename `RelationalDataList` class as `RelationalData`. The `data` argument to `teal::init` is now always a `RelationalData` object.
* Added `fun_cdisc_dataset_connector` to enable providing a custom function which returning a dataset.
* Removed `code` and `script` arguments from `as_relational` wrapper. This is intended to be done with `mutate_dataset` functionality.
* `filer` argument in `init` has added a validation step to ensure compatibility with the rest of the app. Variables inherited from ADSL have to be specified only for ADSL dataset.
* `filer` argument in `init` has added a validation step to ensure compatibility with the rest of the app. Variables inherited from `ADSL` have to be specified only for `ADSL` dataset.
* Fixes the issue with connection close code not being present in `get_code` results.
* Fixes the issue of occasional incorrect ordering of bar charts on the filter panel.
* More informative error displayed when `pull_fun` of `DataConnection` produces an error.
Expand Down Expand Up @@ -317,7 +328,7 @@ function call.

# teal 0.8.4

* Progress bar for ui creation in delayed loading module.
* Progress bar for UI creation in delayed loading module.
* Change output of `keys` function to `keys` object.
* Delayed version of `choices_selected`.
* Fix an error in `choices_selected` when `selected` is not in `choices`.
Expand Down Expand Up @@ -366,7 +377,7 @@ function call.

# teal 0.0.5

* Added limit to data_table with scrolling, preventing overlap of ui elements.
* Added limit to data_table with scrolling, preventing overlap of UI elements.
* Boolean filtering.

# teal 0.0.4
Expand Down Expand Up @@ -395,7 +406,7 @@ function call.
# teal 0.0.2

* New '01_getting_started' vignette.
* Datanames in `FilteredData` are now case sensitive.
* `Datanames` in `FilteredData` are now case sensitive.

# teal 0.0.1

Expand Down
4 changes: 2 additions & 2 deletions R/dummy_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ example_filter <- function(data) { # nolint
return(res)
}

#' Get dummy CDISC data
#' Get dummy `CDISC` data
#'
#' Get dummy CDISC data including `ADSL`, `ADAE` and `ADLB`.
#' Get dummy `CDISC` data including `ADSL`, `ADAE` and `ADLB`.
#' Some NAs are also introduced to stress test.
#'
#' @return `cdisc_data`
Expand Down
6 changes: 3 additions & 3 deletions R/example_module.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' An example `teal` module
#'
#' @description `r lifecycle::badge("experimental")`
#' @param label `character`, the label of the module
#' @inheritParams module
#' @return A `teal` module which can be included in the `modules` argument to [teal::init()].
#' @examples
#' app <- init(
Expand All @@ -15,7 +15,7 @@
#' shinyApp(app$ui, app$server)
#' }
#' @export
example_module <- function(label = "example teal module") {
example_module <- function(label = "example teal module", filters = "all") {
checkmate::assert_string(label)
module(
label,
Expand All @@ -32,6 +32,6 @@ example_module <- function(label = "example teal module") {
encoding = selectInput(ns("dataname"), "Choose a dataset", choices = names(data))
)
},
filters = "all"
filters = filters
)
}
Loading
Loading