Skip to content

Conversation

@averissimo
Copy link
Contributor

@averissimo averissimo commented Feb 11, 2026

Pull Request

Fixes insightsengineering/teal.slice#394

image image

Sample app

pkgload::load_all("../teal.slice")
pkgload::load_all("../teal")

filters <- c(
  # iris
  "iris_sl1", "iris_sw1", "iris_pl1", "iris_pw1", "iris_species", "iris_id", 
  # mtcars
  "mtcars_mpg", "mtcars_cyl", "mtcars_disp", "mtcars_hp", "mtcars_drat", 
  "mtcars_wt", "mtcars_qsec", "mtcars_vs", "mtcars_am", "mtcars_gear"
)

mapping <- lapply(1:13 |> sprintf("mod%d", ... = _) |> setNames(nm = _), \(x) sample(filters, floor(runif(1, 0, 12) + 1)))

names(mapping)[3] <- "mod3 with longer label"

app <- init(
  data = within(teal_data(), {
    new_iris <- tibble::rownames_to_column(iris, var = "id")
    new_mtcars <- tibble::rownames_to_column(mtcars, var = "id")
  }),
  modules = teal::modules(
    teal::example_module(label = "mod1"),
    teal::example_module(label = "mod2"),
    teal::example_module(label = "mod3 with longer label"),
    teal::example_module(label = "mod4"),
    teal::example_module(label = "mod5"),
    teal::example_module(label = "mod6"),
    teal::example_module(label = "mod7"),
    teal::example_module(label = "mod8"),
    teal::example_module(label = "mod9"),
    teal::example_module(label = "mod10"),
    teal::example_module(label = "mod11"),
    teal::example_module(label = "mod12"),
    teal::example_module(label = "mod13")
  ),
  filter = teal::teal_slices(
    # Iris filters (10 filters)
    teal_slice(dataname = "new_iris", varname = "Sepal.Length", id = "iris_sl1"),
    teal_slice(dataname = "new_iris", varname = "Sepal.Width", id = "iris_sw1"),
    teal_slice(dataname = "new_iris", varname = "Petal.Length", id = "iris_pl1"),
    teal_slice(dataname = "new_iris", varname = "Petal.Width", id = "iris_pw1"),
    teal_slice(dataname = "new_iris", varname = "Species", id = "iris_species"),
    teal_slice(dataname = "new_iris", varname = "id", id = "iris_id"),

    # Mtcars filters (10 filters)
    teal_slice(dataname = "new_mtcars", varname = "mpg", id = "mtcars_mpg"),
    teal_slice(dataname = "new_mtcars", varname = "cyl", id = "mtcars_cyl"),
    teal_slice(dataname = "new_mtcars", varname = "disp", id = "mtcars_disp"),
    teal_slice(dataname = "new_mtcars", varname = "hp", id = "mtcars_hp"),
    teal_slice(dataname = "new_mtcars", varname = "drat", id = "mtcars_drat"),
    teal_slice(dataname = "new_mtcars", varname = "wt", id = "mtcars_wt"),
    teal_slice(dataname = "new_mtcars", varname = "qsec", id = "mtcars_qsec"),
    teal_slice(dataname = "new_mtcars", varname = "vs", id = "mtcars_vs"),
    teal_slice(dataname = "new_mtcars", varname = "am", id = "mtcars_am"),
    teal_slice(dataname = "new_mtcars", varname = "gear", id = "mtcars_gear"),

    module_specific = TRUE,

    mapping = mapping
  )
) |> shiny::runApp()

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

badge

Code Coverage Summary

Filename                          Stmts    Miss  Cover    Missing
------------------------------  -------  ------  -------  -----------------------------------------------------------------------------------------------
R/after.R                            59      21  64.41%   42-52, 64, 69, 77-79, 81-89, 100, 104-105
R/checkmate.R                        24       0  100.00%
R/dummy_functions.R                  61       2  96.72%   54, 56
R/include_css_js.R                   11       0  100.00%
R/init.R                            136       0  100.00%
R/module_bookmark_manager.R          99      54  45.45%   78-133
R/module_data_summary.R             177       8  95.48%   40, 50, 205, 236-240
R/module_filter_data.R               64       0  100.00%
R/module_filter_manager.R           210       7  96.67%   119-120, 316, 343, 355, 362-363
R/module_init_data.R                 84       0  100.00%
R/module_nested_tabs.R              371      36  90.30%   163, 267-282, 302-306, 324, 361, 479-482, 486-489, 493-496
R/module_session_info.R              18       0  100.00%
R/module_snapshot_manager.R         272       9  96.69%   302-306, 373, 376-378
R/module_source_code.R               69       0  100.00%
R/module_teal_lockfile.R            131      53  59.54%   45-57, 60-62, 76, 86-88, 100-102, 110-119, 122, 124, 126-127, 142-146, 161-162, 177-186
R/module_teal_reporter.R            122       9  92.62%   60, 77-78, 81, 98, 128, 142, 144, 158
R/module_teal.R                     211       7  96.68%   127, 142-143, 183, 217, 260-261
R/module_transform_data.R           116       6  94.83%   48, 132-136
R/module_validate_error.R            73       0  100.00%
R/modules.R                         341      59  82.70%   170-174, 229-232, 332, 339, 353, 472, 538-546, 562-568, 698-704, 717-725, 740-755, 788, 800-808
R/reporter_previewer_module.R        41      12  70.73%   41, 45, 68-85
R/teal_data_module-eval_code.R       23       0  100.00%
R/teal_data_module-within.R           7       0  100.00%
R/teal_data_module.R                 20       0  100.00%
R/teal_data_utils.R                  49       0  100.00%
R/teal_modifiers.R                   57       0  100.00%
R/teal_slices-store.R                29       0  100.00%
R/teal_slices.R                      48       2  95.83%   153-154
R/teal_transform_module.R            45       0  100.00%
R/TealAppDriver.R                   355     355  0.00%    50-753
R/utils.R                           291      48  83.51%   403-452, 540-549
R/validate_inputs.R                  32       0  100.00%
R/validations.R                      58       0  100.00%
R/zzz.R                              19       0  100.00%
TOTAL                              3723     688  81.52%

Diff against main

Filename                     Stmts    Miss  Cover
-------------------------  -------  ------  -------
R/module_filter_manager.R       +3       0  +0.05%
TOTAL                           +3       0  +0.01%

Results for commit: 4e313fe

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

Unit Tests Summary

  1 files   33 suites   2m 28s ⏱️
423 tests 362 ✅ 61 💤 0 ❌
665 runs  604 ✅ 61 💤 0 ❌

Results for commit 4e313fe.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
module_teal 💔 $113.53$ $+2.52$ $0$ $0$ $0$ $0$

Results for commit 0f2f606

♻️ This comment has been updated with latest results.

@llrs-roche llrs-roche self-assigned this Feb 11, 2026
Copy link
Contributor

@llrs-roche llrs-roche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one important comment about testing this (I am not sure when the scrollbar shows up: with 10 modules, 30). Related what if there are many filters: do need to allow overflow-y: scroll too?

@gogonzo
Copy link
Contributor

gogonzo commented Feb 11, 2026

Nice and precise PR 👍

@averissimo averissimo enabled auto-merge (squash) February 11, 2026 14:39
@averissimo averissimo merged commit 748800a into main Feb 11, 2026
25 checks passed
@averissimo averissimo deleted the 394-filter_modal_names branch February 11, 2026 14:50
@github-actions github-actions bot locked and limited conversation to collaborators Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

filter manager dialog doesn't handle too many modules

3 participants