From 64c616ec050c7180727736c9c3c1ab7b7e76de99 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Wed, 31 Jan 2024 12:20:07 +0100 Subject: [PATCH] methods: Add help popover --- DESCRIPTION | 1 + R/methods.R | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 27a1e71..ed93de3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -19,6 +19,7 @@ RoxygenNote: 7.2.0 Depends: R (>= 4.1) Imports: + bsicons, bslib, data.table, DT, diff --git a/R/methods.R b/R/methods.R index 96d719d..2c61526 100644 --- a/R/methods.R +++ b/R/methods.R @@ -23,13 +23,24 @@ methods_ui <- function(id, options) { ), lapply(options$methods, function(method) { verticalLayout( - checkboxInput( - NS(id, method$id), - span( - method$description, - class = "control-label" + div( + style = "display: flex;", + checkboxInput( + NS(id, method$id), + span( + method$description, + class = "control-label" + ), + value = TRUE ), - value = TRUE + div( + style = "margin-left: 5px;", + bslib::popover( + bsicons::bs_icon("question-circle"), + title = method$name, + method$help + ) + ) ), sliderInput( NS(id, sprintf("%s_weight", method$id)),