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 #165

Merged
merged 177 commits into from
Jul 14, 2023
Merged

Refactor of the filter-panel #165

merged 177 commits into from
Jul 14, 2023

Commits on Jan 19, 2023

  1. Counts in FilterState based on the filtered values (#164)

    Closes #131 and closes #142 and closes #161 and closes #162
    
    
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    Nikolas Burkoff and gogonzo committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    0434383 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8050f7e View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2023

  1. Configuration menu
    Copy the full SHA
    531ee47 View commit details
    Browse the repository at this point in the history
  2. fix add new

    gogonzo committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    7c9d7b0 View commit details
    Browse the repository at this point in the history
  3. post merge fixes

    gogonzo committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    3c76cf4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    80740e5 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Configuration menu
    Copy the full SHA
    dd391f7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b27e122 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2023

  1. add css for filterstate ui

    Nikolas Burkoff committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    4d7d029 View commit details
    Browse the repository at this point in the history
  2. merge main branch

    Aleksander Chlebowski committed Feb 1, 2023
    Configuration menu
    Copy the full SHA
    f8fc24a View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2023

  1. Configuration menu
    Copy the full SHA
    73c5ce9 View commit details
    Browse the repository at this point in the history
  2. Revert "srv and ui out from the classes"

    This reverts commit 73c5ce9.
    gogonzo committed Feb 2, 2023
    Configuration menu
    Copy the full SHA
    45f9164 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. change default argument reactive(NULL) (#180)

    Nikolas Burkoff committed Feb 3, 2023
    Configuration menu
    Copy the full SHA
    1e6a91c View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2023

  1. Configuration menu
    Copy the full SHA
    62f58a0 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2023

  1. Configuration menu
    Copy the full SHA
    5acf188 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3434c97 View commit details
    Browse the repository at this point in the history
  3. Merge 3434c97 into 4abdf2b

    gogonzo committed Feb 9, 2023
    Configuration menu
    Copy the full SHA
    775dff9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    64f492c View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. conflict resolution (#197)

    Merging `main` branch into `filter_panel_refactor`  following #189.
    
    ---------
    
    Co-authored-by: chlebowa <chlebowa@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    3 people committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    89fa5be View commit details
    Browse the repository at this point in the history
  2. show & hide filter state inputs (#195)

    Allows filter state inputs to collapse and expand, defaulting to
    collapsed. Only 1 filter state per data set can be open at a time.
    
    - For a given data set, filter information is in an accordion of
    collapsible cards
    - Only 1 filter state (per data set) can be open at a time.
    - Card headers show a summary of the filter state.
    
    Logical and choices filter state UIs don't display correctly, at least
    on Bootstrap 4.
    
    
    Closes #129.
    
    ---------
    
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    asbates and gogonzo committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    22a9dc4 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. 183 choicefs improve init (#194)

    # Pull Request
    
    Fixes
    #[183](#183)
    
    ---------
    
    Signed-off-by: Marek Blazewicz <110387997+BLAZEWIM@users.noreply.github.com>
    Co-authored-by: Mahmoud Hallal <86970066+mhallal1@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com>
    3 people committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    e9a9758 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. Configuration menu
    Copy the full SHA
    42d2460 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2023

  1. start and end date validation in filter (#202)

    # Pull Request
    
    Fixes
    #[158](#158)
    
    
    1. At initialization, when values are not valid, corrections will be
    performed with warnings.
    2. Later, when changed by the user, shinyvalidate is used.
     
    Example to test:
    
    ```
    adsl <- synthetic_cdisc_dataset("latest", "adsl")
    
    app <- init(
      data = teal_data(dataset("ADSL", adsl)),
      modules = example_module(),
      filter = list(
        "ADSL" = list(
          RANDDT = list(selected = c("2021-02-16", "2021-02-17")),
          TRT01SDTM = list(selected = c("2021-02-11 17:09:18", "2021-02-10 20:42:27"))
        )
      )
    )
    runApp(app)
    ```
    
    ---------
    
    Signed-off-by: Marek Blazewicz <110387997+BLAZEWIM@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com>
    BLAZEWIM and gogonzo committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    ac6ca0b View commit details
    Browse the repository at this point in the history
  2. Merge ac6ca0b into 1128a86

    gogonzo committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    7e8875d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6c163aa View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2023

  1. updateable count labels (#198)

    closes #173 #174 #167 
    
    Making reactive filter counts triggered only if the filter is visible
    
    Co-authored-by: Andrew Bates <andrew.bates@atorusresearch.com>
    gogonzo and asbates committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    c473bba View commit details
    Browse the repository at this point in the history
  2. Merge c473bba into 1128a86

    gogonzo committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    f88a195 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5af7c49 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2023

  1. merge main branch

    Aleksander Chlebowski committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    468774b View commit details
    Browse the repository at this point in the history
  2. update example apps for refactor branch

    Aleksander Chlebowski committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    3fb4f45 View commit details
    Browse the repository at this point in the history
  3. minor tweaks

    Aleksander Chlebowski committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    35919d9 View commit details
    Browse the repository at this point in the history
  4. bug fix

    Aleksander Chlebowski committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    9beb264 View commit details
    Browse the repository at this point in the history
  5. fix bug

    gogonzo committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    2440a0d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fff70f5 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2023

  1. Interactive FilterState (#216)

    # Pull Request
    
    Fixes
    #[140](#140)
    
    ---------
    
    Signed-off-by: Marek Blazewicz <110387997+BLAZEWIM@users.noreply.github.com>
    Co-authored-by: Blazewicz <blazewim@emea.roche.com>
    Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com>
    3 people committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    261bac1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    33fce08 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2023

  1. merge main after #193

    Aleksander Chlebowski committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    58d35b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    07a209b View commit details
    Browse the repository at this point in the history
  3. fix documentation

    Aleksander Chlebowski committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    f907256 View commit details
    Browse the repository at this point in the history
  4. postmerge fixes

    gogonzo committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    7297d41 View commit details
    Browse the repository at this point in the history
  5. amend unit tests

    Aleksander Chlebowski committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    cef4e26 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6f86c13 View commit details
    Browse the repository at this point in the history
  7. Merge branch 'main' into filter_panel_refactor@main

    Aleksander Chlebowski committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    d77248b View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2023

  1. filtered counts excluding $this filter (#205)

    Closes #166 
     implements filtered counts and prepares for the hierarchical filtering
    gogonzo committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    03e8b25 View commit details
    Browse the repository at this point in the history
  2. Merge 03e8b25 into d0e0dc3

    gogonzo committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    0d70ad6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    38d277d View commit details
    Browse the repository at this point in the history
  4. friday cleanup

    gogonzo committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    7486b07 View commit details
    Browse the repository at this point in the history
  5. Merge 7486b07 into d0e0dc3

    gogonzo committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    2facafc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a163e99 View commit details
    Browse the repository at this point in the history
  7. fix spelling

    gogonzo committed Mar 3, 2023
    Configuration menu
    Copy the full SHA
    8e9b1fc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    33622d0 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. rerun auto

    gogonzo committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    ce3d1ae View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary (#221)

    gogonzo committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    b3f9766 View commit details
    Browse the repository at this point in the history
  3. Merge b3f9766 into d0e0dc3

    gogonzo committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    5b5c05e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    34af770 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2023

  1. Disabling of a single filter state (#207)

    
    
    
    Co-authored-by: Andrew Bates <andrew.bates@atorusresearch.com>
    gogonzo and asbates committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    6e324ea View commit details
    Browse the repository at this point in the history
  2. Merge 6e324ea into d0e0dc3

    gogonzo committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    cc0cb33 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    821da84 View commit details
    Browse the repository at this point in the history
  4. methods to private

    gogonzo committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    8b074f4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e3ff3d6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4ec979b View commit details
    Browse the repository at this point in the history
  7. Merge 4ec979b into d0e0dc3

    gogonzo committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    d218074 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bfc669a View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. Tests (#229)

    remove CDISCFilteredData and methods. Tests for FilteredData
    gogonzo committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    dfcae46 View commit details
    Browse the repository at this point in the history
  2. Merge dfcae46 into d0e0dc3

    gogonzo committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    3c5e5c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ab6df81 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. fix

    fixes @asbates comment
    fix lintr
    gogonzo committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    0645e72 View commit details
    Browse the repository at this point in the history
  2. Merge 0645e72 into d0e0dc3

    gogonzo committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    42360a3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e7bb979 View commit details
    Browse the repository at this point in the history
  4. fix pkgdown

    gogonzo committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    17a8fc6 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. Expand card click area (#223)

    Expands the clickable area of filter cards so they expand/collapse when
    clicking anywhere in the card header. (except remove icon)
    
    Closes #203
    asbates committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    41894f0 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2023

  1. Configuration menu
    Copy the full SHA
    bd5f0d7 View commit details
    Browse the repository at this point in the history
  2. Revert "disable ability to add filter when panel disabled"

    This reverts commit bd5f0d7.
    asbates committed Mar 24, 2023
    Configuration menu
    Copy the full SHA
    8c9fea3 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. fix spelling

    Nikolas Burkoff committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    9b025a7 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2023

  1. Move filter panel switch to active vars (#228)

    Moves the filter panel disable/enable switch into the active variables
    section.
    
    Closes #219
    
    ---------
    
    Co-authored-by: Nikolas Burkoff <nikolas.burkoff@roche.com>
    asbates and Nikolas Burkoff committed Mar 30, 2023
    Configuration menu
    Copy the full SHA
    c3f86dd View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2023

  1. 187 new filter panel api (#222)

    This PR contains work towards a new filter panel API as outlined in
    #187.
    
    **TESTING class methods**:
    
    1. preparations
    ```
    # get FilteredData object on demand
    utils::data(miniACC, package = "MultiAssayExperiment")
    get_fd <- function() {
      init_filtered_data(
        x = list(
          iris = list(dataset = iris),
          mtcars = list(dataset = mtcars),
          mae = list(dataset = miniACC)
        )
      )
    }
    
    
    # specify filter states (old way)
    fss <- list(
      iris = list(
        "Species" = list(selected = "setosa"),
        "Sepal.Length" = list(selected = c(5, 6))
      ),
      mtcars = list(
        "disp" = list(selected = c(0, 280)),
        "cyl" = list(selected = 6)
      ),
      mae = list(
        subjects = list(
          years_to_birth = list(selected = c(30, 50), keep_na = TRUE, keep_inf = FALSE),
          vital_status = list(selected = "1", keep_na = FALSE),
          gender = list(selected = "female", keep_na = TRUE)
        ),
        RPPAArray = list(
          subset = list(
            ARRAY_TYPE = list(selected = "", keep_na = TRUE)
          )
        )
      )
    )
    
    # specify filter states (new way)
    tss <- filter_settings(
      filter_var("iris", "Species", selected = "setosa"),
      filter_var("iris", "Sepal.Length", selected = c(5, 6)),
      filter_var("mtcars", "disp", selected = c(0, 280)),
      filter_var("mtcars", "cyl", selected = 6),
      filter_var("mae", "years_to_birth", selected = c(30, 50), keep_na = TRUE, keep_inf = FALSE, datalabel = "subjects", target = "y"),
      filter_var("mae", "vital_status", selected = "1", keep_na = FALSE, datalabel = "subjects", target = "y"),
      filter_var("mae", "gender", selected = "female", keep_na = TRUE, datalabel = "subjects", target = "y"),
      filter_var("mae", "ARRAY_TYPE", selected = "", keep_na = TRUE, datalabel = "RPPAArray", target = "subset")
    )
    ```
    
    2. convert old states specification to new one 
    ```
    fss_new <- as.teal_slices(fss)
    identical(fss, tss)
    identical(fss_new, tss)
    ```
    :point_up: this happens in `FilteredData$set_filter_state` with a
    warning
    Note `as.teal_slices` does not perform any validation, so a list-like
    filter state that specifies filters on columns of `MAE@colData` that is
    not wrapped as `list(MAE = list(...))` but is only `list(var =
    list(...))` will be interpreted as a `data.frame` filter.
    
    3. set states as list
    ```
    # create FilteredData
    fd <- get_fd()
    # apply filter states
    fd$set_filter_state(fss)
    # see calls
    fd$get_call("iris") %>% isolate
    fd$get_call("mtcars") %>% isolate
    fd$get_call("mae") %>% isolate
    #recover filter states
    fd$get_filter_state() %>% isolate
    ```
    
    4. set states as `teal_slices`
    ```
    # create FilteredData
    fd <- get_fd()
    # apply filter states
    fd$set_filter_state(tss)
    # see calls
    fd$get_call("iris") %>% isolate
    fd$get_call("mtcars") %>% isolate
    fd$get_call("mae") %>% isolate
    #recover filter states
    fd$get_filter_state() %>% isolate
    ```
    Note that calls are not generated. This is these filters are
    instantiated and constructors don't know how to handle choices yet, so
    by default they are created with everything selected, hence no calls.
    
    5. modify states as `teal_slices`
    ```
    fd$set_filter_state(tss)
    # see calls
    fd$get_call("iris") %>% isolate
    fd$get_call("mtcars") %>% isolate
    fd$get_call("mae") %>% isolate
    #recover filter states
    fd$get_filter_state() %>% isolate
    ```
    
    
    **TESTING wrapper functions**:
    ```
    datasets <- init_filtered_data(
      x = list(
        iris = list(dataset = iris),
        mae = list(dataset = miniACC)
      )
    )
    fs <- filter_settings(
      filter_var("iris", "Species", selected = c("setosa", "versicolor")),
      filter_var("iris", "Sepal.Length", selected = c(5.1, 6.4)),
      filter_var("mae", "years_to_birth", selected = c(30, 50),
                 keep_na = TRUE, keep_inf = FALSE, datalabel = "subjects", target = "y"),
      filter_var("mae", "vital_status", selected = "1", keep_na = FALSE, datalabel = "subjects", target = "y"),
      filter_var("mae", "gender", selected = "female", keep_na = TRUE, datalabel = "subjects", target = "y"),
      filter_var("mae", "ARRAY_TYPE", selected = "", keep_na = TRUE, datalabel = "RPPAArray", target = "subset")
    )
    
    # set initial filter state
    set_filter_state(datasets, filter = fs)
    
    fd$.__enclos_env__$private$get_filter_count() %>% isolate
    
    # get filter state
    get_filter_state(datasets)
    
    fd$.__enclos_env__$private$get_filter_count() %>% isolate
    
    # modify filter state
    set_filter_state(
      datasets,
      filter_settings(
        filter_var("iris", "Species", selected = "setosa", keep_na = TRUE)
      )
    )
    
    fd$.__enclos_env__$private$get_filter_count() %>% isolate
    
    # remove specific filters
    remove_filter_state(
      datasets,
      filter_settings(
        filter_var("iris", "Species"),
        filter_var("mae", "years_to_birth"),
        filter_var("mae", "vital_status")
      )
    )
    
    fd$.__enclos_env__$private$get_filter_count() %>% isolate
    
    # remove all states
    clear_filter_states(datasets)
    
    fd$.__enclos_env__$private$get_filter_count() %>% isolate
    
    ```
    
    ---------
    
    Signed-off-by: Marek Blazewicz <110387997+BLAZEWIM@users.noreply.github.com>
    Co-authored-by: Marek Blazewicz <110387997+BLAZEWIM@users.noreply.github.com>
    Co-authored-by: Blazewicz <blazewim@emea.roche.com>
    Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com>
    4 people committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    29937b7 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' into filter_panel_refactor@main

    Signed-off-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    chlebowa committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    25dfa37 View commit details
    Browse the repository at this point in the history
  3. Merge 25dfa37 into 5464072

    gogonzo committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    a340d78 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b8d8d2a View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Configuration menu
    Copy the full SHA
    e5c914f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b42b079 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Initialize FilterState based on count type (#247)

    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    asbates and gogonzo committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    3f412e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c52af31 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Fix bug in ChoicesFilterState count labels (#261)

    Fixes a bug in the count labels for `ChoicesFilterState`. Uses the x
    with any unused levels removed to set choices counts.
    
    Fixes #260
    asbates committed May 2, 2023
    Configuration menu
    Copy the full SHA
    97c65ed View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. filterable (#254)

    filterable through appi
    - removed set_filteravle_varnames. Setting filterable possible only through teal_slices
    - moved get_fillter_state to abstract class
    gogonzo committed May 3, 2023
    Configuration menu
    Copy the full SHA
    0003dab View commit details
    Browse the repository at this point in the history
  2. Merge 0003dab into a977865

    gogonzo committed May 3, 2023
    Configuration menu
    Copy the full SHA
    b64a134 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ef1cce5 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Update card summary design (#255)

    Updates the summary row of the card header.
    
    - Removes "Include" for NA/Inf
    - Move NA/Inf contents further to the right of the card summary.
    - NA/Inf displays "NA/Inf" with a check or X. Check if yes, X if no. If
    no NA or Inf are present in the column, nothing is displayed
    - For value/selected portion of summary, the text is automatically
    truncated depending on screen width.
    - For categorical variables, the selected/value display is as follows
    - if the total length of "level 1, level 2, level 3" is more than 40
    characters, the text "N levels selected" is used.
      - otherwise, the selected levels are displayed
    - 40 characters is a magic number and is an approximation. I found it to
    be ~300px which is the total text limit. But different font sizes,
    capitalization vs. not, browser zoom, etc. will all affect the actual
    number of characters that = Xpx. So there's never going to be a "right"
    value for this
    - For numeric and dates, an endash is used instead of "-" to separate
    the selected values
    - For numeric variables, if there are > 4 significant digits the number
    is formatted in scientific notation with 4 significant digits. This is
    related to #251. If the current implementation is not exactly what we
    want, it should affect this PR. We can refine the method with #251.
    - The font size of some peripherals of input elements were adjusted to
    match the font size in the card header.
    
    Fixes #220
    asbates committed May 4, 2023
    Configuration menu
    Copy the full SHA
    c9cca2d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31bc42b View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. alternative UI for fixed filter state (#257)

    related to #244 
    closes #141 
    
    This version provides a richer UI for a fixed filter state card compared
    to #244
    
    FilterState has a private$fixed field that holds a logical flag. In this PR:
    
    * a fixed FilterState has a lock icon added to the header part of the UI
    * a fixed FilterState displays visualizations of the selection state as usual, but without input widgets
    * FilterState$disable/enable are rewritten to accommodate for the need to disable/enable a fixed filter state
    
    ---------
    
    Signed-off-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    Co-authored-by: Andrew Bates <andrew.bates@atorusresearch.com>
    chlebowa and asbates committed May 5, 2023
    Configuration menu
    Copy the full SHA
    fb77f41 View commit details
    Browse the repository at this point in the history
  2. Merge fb77f41 into a977865

    gogonzo committed May 5, 2023
    Configuration menu
    Copy the full SHA
    da1ede1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7c5c817 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. Configuration menu
    Copy the full SHA
    0219b06 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    722f75b View commit details
    Browse the repository at this point in the history
  3. 206 global disable (#265)

    Closes #206.
    
    Changes the bahavior of `FilteredData$filter_panel_disable/enable`.
    Filter states are no longer removed and re-instantiated. Rather, their
    state is changed to disabled/enabled by sending a filter panel API
    command down the class structure.
    
    * the global disable/enable method is modified appropriately
    * caching individual filter states is removed; caching states at the
    global level is necessary as some states should be restored disabled
    * an observer is added to `FilterState$server` to update the disable
    switch accordingly
    chlebowa committed May 8, 2023
    Configuration menu
    Copy the full SHA
    55d4cf4 View commit details
    Browse the repository at this point in the history
  4. Merge 55d4cf4 into 6392b3c

    gogonzo committed May 8, 2023
    Configuration menu
    Copy the full SHA
    5f8bb3f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5d5d649 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

  1. Configuration menu
    Copy the full SHA
    7465005 View commit details
    Browse the repository at this point in the history
  2. 133 take 2@filter panel refactor@main (#268)

    Adds a numeric range input to range filter state cards so range can be
    set manually. This is a redo of #226
    
    
    Fixes #133
    asbates committed May 9, 2023
    Configuration menu
    Copy the full SHA
    cb82947 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Prevent disable/remove buttons from overflowing card (#275)

    Keeps the disable switch and remove icon inside the card if the browser
    width narrows.
    
    Fixes #236
    asbates committed May 10, 2023
    Configuration menu
    Copy the full SHA
    9d2de59 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2023

  1. 273 global disable (#277)

    Closes #273.
    
    Modifies `FilteredData$filter_panel_disable/enable` to also affect the
    `filter_active_vars_contents` div.
    chlebowa committed May 11, 2023
    Configuration menu
    Copy the full SHA
    7111054 View commit details
    Browse the repository at this point in the history
  2. add filter_expr (#262)

    introduced `filter_expr` which creates FilterStateExpr
    gogonzo committed May 11, 2023
    Configuration menu
    Copy the full SHA
    76676d5 View commit details
    Browse the repository at this point in the history
  3. Merge 76676d5 into 6392b3c

    gogonzo committed May 11, 2023
    Configuration menu
    Copy the full SHA
    f612435 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    141ce66 View commit details
    Browse the repository at this point in the history
  5. fix spelling error

    gogonzo committed May 11, 2023
    Configuration menu
    Copy the full SHA
    495e24d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3a217bf View commit details
    Browse the repository at this point in the history
  7. empty

    gogonzo committed May 11, 2023
    Configuration menu
    Copy the full SHA
    b65fc81 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. quick fix (#287)

    Closes #286 
    Fixes `format.teal_slice`.
    chlebowa committed May 22, 2023
    1 Configuration menu
    Copy the full SHA
    7555882 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Remove get_formatted_filter_state and change format method to generic…

    … print (#281)
    
    Fixes #267 - unify $print() and $format() methods within all existing classes with an abstract class
    m7pr committed May 24, 2023
    Configuration menu
    Copy the full SHA
    0c0ddb0 View commit details
    Browse the repository at this point in the history
  2. Merge 0c0ddb0 into e239912

    gogonzo committed May 24, 2023
    Configuration menu
    Copy the full SHA
    d5cb849 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0ca9e5e View commit details
    Browse the repository at this point in the history

Commits on May 29, 2023

  1. Configuration menu
    Copy the full SHA
    7b9498a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0ee5fa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    307bc05 View commit details
    Browse the repository at this point in the history
  4. 309 - shorten line widths for FilterState* tests (#310)

    fix #309 
    Make test lines shorten than 120 characters. This is required with lintr
    check
    m7pr committed May 29, 2023
    Configuration menu
    Copy the full SHA
    f91bfad View commit details
    Browse the repository at this point in the history
  5. 291 typo in tests (#305)

    close #291
    m7pr committed May 29, 2023
    Configuration menu
    Copy the full SHA
    e268f96 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. Configuration menu
    Copy the full SHA
    3df2b6a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e61bca4 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2023

  1. Configuration menu
    Copy the full SHA
    deaba92 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    ca45b5d View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2023

  1. Reverting changes of docs github actions builds (#326) (#327)

    This build is not needed for feature branches. Let's only stay with the
    check github actions build for filter_panel_refactor@main branch. Sorry
    for the confusion
    m7pr committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    05a3a27 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfd95a5 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2023

  1. 279 add multiple argument to filter_var ChoicesFilterState and Logica…

    …lFilterState (#296)
    
    In ChoicesFilterState's initialize and LogicalFilterState's initialize
    methods, _**multiple**_ arguments have been added. These arguments
    should be included in the return statement of the get_state method.
    
    Furthermore, if the user selects "multiple = F", the checkboxgroupinput
    should be replaced with a radiobutton.
    
    closes #250 #279
    
    ---------
    
    Signed-off-by: kartikeya kirar <kirar.kartikeya1@gmail.com>
    Co-authored-by: Andrew Bates <andrew.bates@atorusresearch.com>
    Co-authored-by: kartikeya <kartikeya.kirar@unicle.life>
    Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
    8 people committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    2874429 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9dec459 View commit details
    Browse the repository at this point in the history
  3. 280 locked filter (#297)

    Closes #280 
    
    Adds a `locked` property to `FilterState` class. A locked filter state
    cannot be disabled or removed but can still be modified. `locked` and
    `fixed` properties can be set independently of one another.
    
    Changes to `FilterState` class:
    * `locked` argument is added to constructors and wrappers; the argument
    receives a logical flag and defaults to `FALSE`
    * a private field `locked` is added to `FilterState` to store the
    property
    * `$get_state` is modified to return the `locked` value in addition to
    all other filter state properties
    * `$set state` is modified to interrupt an attempt at disabling a filter
    state that is locked
    * `$ui` is modified to only display the disable and remove buttons if
    `private$locked` is `FALSE`
    * `$ui` is modified to display an additional icon if `private$locked` is
    `TRUE`
    * Analogous changes are made to `FilterStateExpr` class.
    * The `locked` argument is also added to `filter_var`.
    * Modified `FilterStates$remove_filter_state` and
    `FilterStates$clear_filter_states` so that locked filter states are
    omitted.
    * The `lock` icon has been transferred from the `fixed` property to the
    `locked` property. A fixed state thus needs a new icon. `burst` is used
    as a placeholder but a suitable replacement must be found.
    * Unit tests were amended.
    chlebowa committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    25a2608 View commit details
    Browse the repository at this point in the history
  4. fixing build fail and adding additional test to fix. (#328)

    # fixing build fails
    
    
    (https://github.com/insightsengineering/teal.slice/actions/runs/5197026426)
    
    Here I fixed the build fail issue by adding internal calls to examples
    and fixing filter_var example.
    
    Co-authored-by: kartikeya <kartikeya.kirar@unicle.life>
    kartikeyakirar and kartikeya committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    1e2c0b1 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2023

  1. emphasize named-entities with quotes to reduce the scope of WORDLIST (#…

    …331)
    
    Final spell-check
    
      WORD               FOUND IN
    cloneable          ChoicesFilterState.Rd:242
                       DateFilterState.Rd:235
                       DatetimeFilterState.Rd:245
                       DefaultFilteredDataset.Rd:252
                       DFFilterStates.Rd:206
                       EmptyFilterState.Rd:146
                       FilteredData.Rd:940
                       FilteredDataset.Rd:395
                       FilterPanelAPI.Rd:175
                       FilterState.Rd:289
                       FilterStateExpr.Rd:334
                       FilterStates.Rd:347
                       LogicalFilterState.Rd:222
                       MAEFilteredDataset.Rd:221
                       MAEFilterStates.Rd:107
                       MatrixFilterStates.Rd:79
                       RangeFilterState.Rd:262
                       SEFilterStates.Rd:149
    Forkers            README.md:42,52,54
    funder             teal.slice-package.Rd:26
    Hoffmann           teal.slice-package.Rd:26
    programmatically   NEWS.md:21
                       teal-slice.Rmd:95
    repo               README.md:9,15,50,54
    reproducibility    FilteredData.Rd:174,322,518,526
                       init_filtered_data.Rd:24
                       NEWS.md:93
    UI                 DefaultFilteredDataset.Rd:214,216,230
                       FilteredData.Rd:738,782,809,830,854,875,884,922
                       FilteredDataset.Rd:298,300,315,333,345,347,361,383
                       FilterState.Rd:255,265
                       FilterStateExpr.Rd:313,323
                       FilterStates.Rd:179,256,258,301,335
                       MAEFilteredDataset.Rd:185,187,201
                       MAEFilterStates.Rd:86
                       SEFilterStates.Rd:100,137
                       filter-panel.Rmd:151
                       teal-slice.Rmd:48
    m7pr committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    b718f8c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    64a1ea0 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. 234 range selection with plotly (#289)

    Closes #234 
    Closes #233 
    
    Replaces the range slider in `RangeFilterState` with an interactive
    `plotly` graph. Two shapes (lines) are drawn on the plot that can be
    dragged and their position is tracked. An observer listens to events
    emitted by the plot when shapes are altered (this event is called a
    "plotly_relayout") and updates selection. Another observer listens to
    the manual input and updates selection. Finally, a third observer
    listens to the selection and updates the manual input as well as the
    shapes on the plot.
    
    Since the graph is slower to render, a spinner is added to it to
    alleviate the negative effect on UX.
    
    Numeric (manual) input is now displayed simultaneously with the graphic
    input, not alternatively.
    
    Numeric input receives a debounce.
    
    ---------
    
    Signed-off-by: kartikeya kirar <kirar.kartikeya1@gmail.com>
    Signed-off-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: kartikeya kirar <kirar.kartikeya1@gmail.com>
    Co-authored-by: kartikeya <kartikeya.kirar@unicle.life>
    5 people committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    4ec0499 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9de04e View commit details
    Browse the repository at this point in the history
  3. trigger

    Aleksander Chlebowski committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    1b8c356 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Module specific filter panels. (#300)

    Closes #135 and #137 
    
    1. `FilterStates$srv_active` uses `renderUI` instead of `insertUI`. 
    2. `teal_slice` has now obligatory `id` field.
    3. `teal_slice` object is now a `reactiveValues` which is passed and
    stored directly to `FilterState`. This `teal_slice` object can be
    returned using `FilterState$get_state`. This gives possibility that one
    `teal_slice` object can be present in the same time in multiple
    `FilterState` object. This simplifies little constructor of
    `FilterState` as we don't have to have check again assertions on
    dataname, varname etc.
    4. removed `disabled` functionality as it conflicts with module specific
    feature. Discussed with @lcd2yyz and we decided to develop some
    alternatives to quickly activate/deactivate filters. See (5)
    5. added `set_available_teal_slice` (public) and
    `ui/srv_available_filters` to link `srv/ui_active` with some reactive
    list of "available" slices. This gives a possibility to
    activate/deactivate particular state. This reactive list of states is
    set in teal which gathers all modules filters and creates a one unique
    list of available filters.
    
    
    Co-authored-by: Aleksander Chlebowski <aleksander.chlebowski@contractors.roche.com>
    gogonzo and Aleksander Chlebowski committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    a397599 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    724dd0d View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2023

  1. improve testing for multiple choices

    Aleksander Chlebowski committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    d0ed661 View commit details
    Browse the repository at this point in the history
  2. fix bug in set_selected

    Aleksander Chlebowski committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    cb639ee View commit details
    Browse the repository at this point in the history
  3. fix check_multiple

    Aleksander Chlebowski committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    bf7876c View commit details
    Browse the repository at this point in the history
  4. fix unit tests

    Aleksander Chlebowski committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    a247b51 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1aff647 View commit details
    Browse the repository at this point in the history
  6. revert changes

    Aleksander Chlebowski committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    97b3ea1 View commit details
    Browse the repository at this point in the history
  7. Merge 97b3ea1 into 8135f1e

    gogonzo committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    2cfe1ab View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5b34a4d View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. 341 available locked@filter panel refactor@main (#345)

    @lcd2yyz expressed satisfaction with current solution 👍
    gogonzo committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    446db86 View commit details
    Browse the repository at this point in the history
  2. 263 update filter card css to make consistent spacing. (#325)

    ### closes #263
    
    Removed the margin and spaces between labels.
    
    - Reduced the size of the checkbox label to make it same size as the
    group checkbox
    - Removed margin for prettyswitch.
    
    
    ![image](https://github.com/insightsengineering/teal.slice/assets/6700955/3f76d4a4-662c-4aaa-9298-aba70654ea92)
    
    ---------
    
    Signed-off-by: kartikeya kirar <kirar.kartikeya1@gmail.com>
    Co-authored-by: kartikeya <kartikeya.kirar@unicle.life>
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    Co-authored-by: Aleksander Chlebowski <aleksander.chlebowski@contractors.roche.com>
    5 people committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    3d885d2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    26c154d View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2023

  1. 344 documentation (#347)

    Closes #344 
    
    Also fixes some documentation errors in other places.
    Also moves `$is_multiple` from `ChoicesFilterState` and
    `LogicalFilterState` to `FilterState`.
    
    ---------
    
    Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
    chlebowa and github-actions[bot] committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    128ab44 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    61996ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4650532 View commit details
    Browse the repository at this point in the history
  4. 330 [Feature Request]: Option to not show module_add (#353)

    this fixes #330
    
    In this pull request (PR), the module_add parameter is introduced in
    teal.slice::filter_settings(). This addition conceals the module that
    handles the display of dropdowns containing variables used to add a
    filter from filteredData.R.
    
    ### testing module
    ```
    funny_module <- function (label = "Filter states", datanames = "all") {
      checkmate::assert_string(label)
      module(
        label = label,
        filters = datanames,
        ui = function(id, ...) {
          ns <- NS(id)
          div(
            h2("The following filter calls are generated:"),
            verbatimTextOutput(ns("filter_states")),
            verbatimTextOutput(ns("filter_calls")),
            actionButton(ns("reset"), "reset_to_default")
          )
        },
        server = function(input, output, session, data, filter_panel_api) {
          checkmate::assert_class(data, "tdata")
          observeEvent(input$reset, set_filter_state(filter_panel_api, default_filters))
          output$filter_states <-  renderPrint({
            logger::log_trace("rendering text1")
            filter_panel_api %>% get_filter_state()
          })
          output$filter_calls <- renderText({
            logger::log_trace("rendering text2")
            attr(data, "code")()
          })
        }
      )
    }
    ```
    
    ### CDISC example
    ```
    options(teal.log_level = "TRACE", teal.show_js_log = TRUE)
    #options("teal.bs_theme" = bslib::bs_theme(version = 4))
    #options(shiny.trace = TRUE)
    devtools::load_all("teal.slice")
    library(teal)
    library(scda)
    
    ADSL <- synthetic_cdisc_data("latest")$adsl
    ADSL$empty <- NA
    ADSL$logical1 <- FALSE
    ADSL$logical <- sample(c(TRUE, FALSE), size = nrow(ADSL), replace = TRUE)
    ADSL$numeric <- rnorm(nrow(ADSL))
    ADSL$categorical2 <- sample(letters[1:10], size = nrow(ADSL), replace = TRUE)
    ADSL$categorical <- sample(letters[1:3], size = nrow(ADSL), replace = TRUE, prob = c(.1, .3, .6))
    ADSL$date <- Sys.Date() + seq_len(nrow(ADSL))
    ADSL$date2 <- rep(Sys.Date() + 1:3, length.out = nrow(ADSL))
    ADSL$datetime <- Sys.time() + seq_len(nrow(ADSL)) * 3600 * 12
    ADSL$datetime2 <- rep(Sys.time() + 1:3 * 43200, length.out = nrow(ADSL))
    
    ADSL$numeric[sample(1:nrow(ADSL), size = 10)] <- NA
    ADSL$numeric[sample(1:nrow(ADSL), size = 10)] <- Inf
    ADSL$logical[sample(1:nrow(ADSL), size = 10)] <- NA
    ADSL$date[sample(1:nrow(ADSL), size = 10)] <- NA
    ADSL$datetime[sample(1:nrow(ADSL), size = 10)] <- NA
    ADSL$categorical2[sample(1:nrow(ADSL), size = 10)] <- NA
    ADSL$categorical[sample(1:nrow(ADSL), size = 10)] <- NA
    
    ADTTE <- synthetic_cdisc_data("latest")$adtte
    ADRS <- synthetic_cdisc_data("latest")$adrs
    
    ADTTE$numeric <- rnorm(nrow(ADTTE))
    ADTTE$numeric[sample(1:nrow(ADTTE), size = 10,)] <- NA
    
    default_filters <- filter_settings(
      filter_var(dataname = "ADSL", varname = "categorical", selected = c("a", "b"), disabled = TRUE),
      filter_var(dataname = "ADSL", varname = "categorical2", selected = c("a", "b"), disabled = TRUE),
      filter_var(dataname = "ADSL", varname = "numeric", selected = c(0, 140), keep_na = TRUE, keep_inf = TRUE, disabled = TRUE),
      filter_var(dataname = "ADSL", varname = "logical", selected = c(T), keep_na = TRUE, keep_inf = TRUE, disabled = TRUE),
      filter_var(dataname = "ADSL", varname = "datetime", disabled = TRUE),
      filter_var(dataname = "ADSL", varname = "date2", disabled = TRUE),
      filter_expr(id = "AF", title = "ADULT FEMALE", dataname = "ADSL", expr = "SEX %in% 'F' & AGE >= 18L", disabled = TRUE),
      filter_expr(id = "SE", title = "Safety-Evaluable", dataname = "ADSL", expr = "SAFFL == 'Y'", disabled = TRUE),
      filter_var(dataname = "ADSL", varname = "COUNTRY", selected = c("USA", "CAN", "JPN"), fixed = T, disabled = TRUE),
      count_type = "all",
      #include_varnames = list(ADSL = c("SEX", "categorical2", "numeric", "logical", "date", "datetime", "date2", "datetime2", "COUNTRY")),
      exclude_varnames = list(
        ADTTE = intersect(colnames(ADSL), colnames(ADTTE)),
        ADRS = colnames(ADSL)
      ),
      module_add = FALSE
    )
    
    data <- cdisc_data(
      cdisc_dataset("ADSL", ADSL),
      cdisc_dataset("ADTTE", ADTTE),
      cdisc_dataset("ADRS", ADRS)
    )
    
    app <- init(
      data = data,
      modules = list(
        tm_data_table(
          variables_selected = list(ADSL = c("STUDYID", "USUBJID", "SUBJID", "SITEID", "AGE", "SEX")),
          dt_args = list(caption = "ADSL Table Caption")
        ),
        funny_module()
      ),
      filter = default_filters
    )
    
    runApp(app)
    
    ```
    
    ---------
    
    Signed-off-by: kartikeya kirar <kirar.kartikeya1@gmail.com>
    Co-authored-by: kartikeya <kartikeya.kirar@unicle.life>
    Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com>
    Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
    Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    6 people committed Jun 21, 2023
    Configuration menu
    Copy the full SHA
    28ff2b2 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. fix docs

    gogonzo committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    0e79b9b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7249bf5 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2023

  1. 299 decouple scda from teal.slice (#357)

    A resolution for #299 where we removed package from DESCRIPTION file and
    staged_dependencies.yaml as the package is not used anywhere in
    particular.
    m7pr committed Jun 23, 2023
    Configuration menu
    Copy the full SHA
    e4e821c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d11d26c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3016c88 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2023

  1. Configuration menu
    Copy the full SHA
    13f3be8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1650c9e View commit details
    Browse the repository at this point in the history
  3. 329 storage for teal_slices (#339)

    A follow-up after #329 
    
    This PR provides new `store` and `restore` functions that saves
    `teal_slices` objects in JSON format and also restores them.
    It also changes the implementation of `format.teal_slice*` that is
    consistent with the format we decided on for storing.
    
    Below are a few examples of the output and a small logic of how things
    work now
    
    - `print` is cat over `format` (both in `teal_slice` and `teal_slices`)
    - `store` is applicable only for `teal_slices`
    - `format` for `teal_slices` uses the format for `teal_slice` + appends
    attributes
    - `format` for `teal_slice` calls `to_json` which calls `to_list`
    - `format` for `teal_slice` has an option to `show_all` (values set to
    NULL)
    - `format` for `teal_slice` has an option to trim JSON 
    - `format` for `teal_slice` centers JSON
    
    
    
    ---------
    
    Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    Co-authored-by: Aleksander Chlebowski <aleksander.chlebowski@contractors.roche.com>
    Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
    Co-authored-by: Dawid Kałędkowski <6959016+gogonzo@users.noreply.github.com>
    Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    Co-authored-by: pawelru <pawelru@users.noreply.github.com>
    8 people committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    96ce823 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. bug fix: srv_available_filters dropdownMenu initializes partially off…

    … the screen (#365)
    
    This PR fixes:
    #343
    
    
    To address the issue caused by the dynamic transformation of the
    tippy_popper CSS class, particularly the transform property where the
    first element is dynamically changing based on screen size but on
    initialization its not behaving correctly,
    
    ![image](https://github.com/insightsengineering/teal.slice/assets/6700955/f9be71c4-5895-4ab0-b667-208ac7cbfe31)
    
    The transform property was not calculating the correct position in the
    DOM during the initial setup in these scenarios. I attempted to make it
    more static by fixing the transformX property, but this solution only
    worked properly in the regular version or with Bootstrap 4/5.
    
    I delved deeper into other options available with tippy.JS, which can be
    found at
    [atomiks.github.io/tippyjs/v5/all-props/](https://atomiks.github.io/tippyjs/v5/all-props/),
    specifically exploring the dropMenuOptions
    ([dropMenuOptions](https://dreamrs.github.io/shinyWidgets/reference/dropMenuOptions.html)).
    However, none of these options provided the desired result.
    
    Upon further investigation, I discovered that increasing the width of
    the displayed section correctly calculated the position of the element
    in comparison. Therefore, I made modifications to the inner element
    property to maximize its width, which successfully resolved the current
    issue.
    
    Personally, I'm not entirely satisfied with this solution, but it is the
    only workaround that fixes the issue in all versions of Bootstrap and
    the regular version. If you have any suggestions for alternative ways to
    address this issue, I would greatly appreciate it.
    
    for bs version
    `options("teal.bs_theme" = bslib::bs_theme(version = 4))`
    
    testing app
    ```
    library(teal.slice)
    library(teal)
    library(scda)
    funny_module <- function (label = "Filter states", datanames = "all") {
      checkmate::assert_string(label)
      module(
        label = label,
        filters = datanames,
        ui = function(id, ...) {
          ns <- NS(id)
          div(
            h2("The following filter calls are generated:"),
            verbatimTextOutput(ns("filter_states")),
            verbatimTextOutput(ns("filter_calls")),
            actionButton(ns("reset"), "reset_to_default")
          )
        },
        server = function(input, output, session, data, filter_panel_api) {
          checkmate::assert_class(data, "tdata")
          observeEvent(input$reset, set_filter_state(filter_panel_api, default_filters))
          output$filter_states <-  renderPrint({
            logger::log_trace("rendering text1")
            filter_panel_api %>% get_filter_state()
          })
          output$filter_calls <- renderText({
            logger::log_trace("rendering text2")
            attr(data, "code")()
          })
        }
      )
    }
    
    ADSL <- synthetic_cdisc_data("latest")$adsl
    ADSL$numeric <- runif(nrow(ADSL))
    ADSL$numeric[sample(1:nrow(ADSL), size = 10)] <- NA
    ADSL$numeric[sample(1:nrow(ADSL), size = 10)] <- Inf
    
    default_filters <- teal::teal_filters(
      filter_var(dataname = "ADSL", varname = "numeric"),
      mapping = list(`filter module` = "ADSL numeric")
    )
    
    app <- init(
      data = cdisc_data(
        cdisc_dataset("ADSL", ADSL)
      ),
      modules = modules(
        funny_module("filter module")
      ),
      filter = default_filters
    )
    
    
    runApp(app)
    ```
    
    ---------
    
    Co-authored-by: kartikeya <kartikeya.kirar@unicle.life>
    Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
    3 people committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    a5c9e48 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3c2d68b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    33129de View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. 371 fix format for dates/times (#372)

    fix #371
    
    ---------
    
    Co-authored-by: Dawid Kałędkowski <dawid.kaledkowski@gmail.com>
    m7pr and gogonzo committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    08235e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cd02fb5 View commit details
    Browse the repository at this point in the history
  3. Rename datalabel to experiment (#369)

    gogonzo committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    35ce207 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. filter_var and filter_expr to teal_slice (#370)

    rename and docs fixing
    gogonzo committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    8bb6093 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db26a21 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. Configuration menu
    Copy the full SHA
    1ed19fe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e3d738e View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. 378 trim_lines parameter in format (#379)

    Closes #378 
    
    This PR provides an ability to pass `trim_lines` parameter for
    `$format()` method of FilterState, FilerStates, FilteredDataset and
    FilteredData R6 objects.
    
    ---------
    
    Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
    Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
    Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
    3 people committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    7c5dc53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a5901f View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. duplicated available slices (#377)

    fixes
    gogonzo committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    0ee90f3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8594655 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. - update NEWS

    - deprecate unused 
    - update authors
    gogonzo committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    d4c01c7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58a1d68 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Configuration menu
    Copy the full SHA
    7c8e757 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    031f933 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. Update vignettes (#380)

    closes #52
    
    ---------
    
    Co-authored-by: Aleksander Chlebowski <aleksander.chlebowski@contractors.roche.com>
    Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
    Co-authored-by: m7pr <marcin.kosinski.mk1@roche.com>
    4 people committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    a3fb7e8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f34cc55 View commit details
    Browse the repository at this point in the history
  3. fix MAE counts tests

    gogonzo committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    2a94e61 View commit details
    Browse the repository at this point in the history