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

Move selected icon in dropbdowns to left side #187

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

averissimo
Copy link
Contributor

@averissimo averissimo commented Aug 29, 2023

Pull Request

Fixes insightsengineering/teal.modules.clinical#802

Changes description

  • Global CSS/Styling rule for all dropdowns created via pickerInput, such as teal.widgets::optionalSelectInput

note: the CSS was created via discussion of the feature, a PR was an easy convertion

2 column layout

image

image

image

1 column layout

image

@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2023

badge

Code Coverage Summary

Filename                   Stmts    Miss  Cover    Missing
-----------------------  -------  ------  -------  --------------------------------------------
R/basic_table_args.R          23       0  100.00%
R/draggable_buckets.R         82      82  0.00%    57-152
R/get_dt_rows.R               13      13  0.00%    27-39
R/ggplot2_args.R              49       0  100.00%
R/include_css_js.R             7       1  85.71%   17
R/optionalInput.R            225     182  19.11%   87-362, 414, 465, 471, 486-499
R/panel_group.R               90      90  0.00%    12-132
R/plot_with_settings.R       382      21  94.50%   272-285, 344-345, 356-357, 607-608, 610, 612
R/standard_layout.R           35       0  100.00%
R/table_with_settings.R      173       1  99.42%   79
R/utils.R                     11       1  90.91%   7
R/verbatim_popup.R            99      49  50.51%   63-78, 104-105, 107, 115-143, 164
R/white_small_well.R           7       7  0.00%    18-24
TOTAL                       1196     447  62.63%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 758bf05

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2023

Unit Tests Summary

    1 files    10 suites   18s ⏱️
101 tests 101 ✔️ 0 💤 0
208 runs  208 ✔️ 0 💤 0

Results for commit 9533b6a.

♻️ This comment has been updated with latest results.

@chlebowa chlebowa self-assigned this Aug 30, 2023
@chlebowa
Copy link
Contributor

Could you add some padding for bootstrap versions 4 and 5?

bs3
checkmark_left_bootstrap3

bs4
checkmark_left_bootstrap4

bs5
checkmark_left_bootstrap5

@averissimo
Copy link
Contributor Author

Should be solved now with a min-width inclusion.

Sample example (changing bs_theme version)
pkgload::load_all()
library(teal.modules.general)
ADSL <- teal.modules.general::rADSL
ADAE <- teal.modules.general::rADAE

options("teal.bs_theme" = bslib::bs_theme_update(bslib::bs_theme(version = "4")))

app <- teal::init(
  data = teal.data::cdisc_data(
    teal.data::cdisc_dataset("ADSL", ADSL, code = "ADSL <- teal.modules.general::rADSL"),
    teal.data::cdisc_dataset("ADAE", ADAE, code = "ADSL <- teal.modules.general::rADAE"),
    check = TRUE
  ),
  modules = teal::modules(
    teal.modules.general::tm_data_table(
      label = "ADS Data Table",
      variables_selected = list(ADSL = c("STUDYID", "USUBJID", "SUBJID", "SITEID", "AGE", "SEX", "COUNTRY")),
      dt_args = list(caption = "ADSL Table Caption")
    ),
    teal.modules.general::tm_missing_data(
      label = "ADS Missing Data",
      ggplot2_args = list(
        "Combinations Hist" = teal.widgets::ggplot2_args(
          labs = list(subtitle = "Plot produced by Missing Data Module", caption = NULL)
        ),
        "Combinations Main" = teal.widgets::ggplot2_args(labs = list(title = NULL))
      )
    )
  ),
  filter = teal_slices(
    teal_slice("ADSL", "COUNTRY", "country", selected = "USA"),
    teal_slice("ADSL", "RACE", "race", selected = "ASIAN"),
    teal_slice("ADSL", id = "custom1", title = "Adult Female", expr = "SEX == 'F' & AGE >= 18"),
    module_specific = TRUE,
    mapping = list(
      "ADS Missing Data" = c("race", "custom1"),
      "ADS Data Table" = c("country")
    ),
    count_type = "all"
  )
)

runApp(app)

image

Copy link
Contributor

@chlebowa chlebowa left a comment

Choose a reason for hiding this comment

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

Great 👍

@averissimo averissimo merged commit a11a75c into main Sep 1, 2023
20 checks passed
@averissimo averissimo deleted the 802-select_checkbox@main branch September 1, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: move selected icon in Select patient in tm_t_pp_basic_info to the left side
2 participants