Skip to content

Commit

Permalink
add tooltips to form
Browse files Browse the repository at this point in the history
  • Loading branch information
LiNk-NY committed May 13, 2024
1 parent fda575b commit 4e30939
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 19 deletions.
16 changes: 11 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ Package: BiocWorkshopSubmit
Type: Package
Title: Provides a shiny app for workshop submissions
Version: 0.99.11
Authors@R: person(
"Marcel", "Ramos", , "[email protected]",
c("aut", "cre"), c(ORCID = "0000-0002-3242-0582")
)
Authors@R: c(
person(
"Marcel", "Ramos", , "[email protected]",
c("aut", "cre"), c(ORCID = "0000-0002-3242-0582")
),
person(
"Alexandru", "Mahmoud", , , "ctb"
))
Description: The package provides a form interface for submitting workshops
via a shiny app. It requires a GitHub organization token for creating a
comment on the Bioconductor/workshop-contributions repository. The
Expand All @@ -15,6 +19,8 @@ License: Artistic-2.0
Depends: shiny
Imports:
BiocBaseUtils,
bsicons,
bslib,
gh,
jsonlite,
rjsoncons,
Expand All @@ -25,5 +31,5 @@ Imports:
utils,
whisker
Encoding: UTF-8
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Date: 2024-05-13
83 changes: 69 additions & 14 deletions R/BiocWorkshopSubmit.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
)
}

mandatory <- function(label) {
labelFormat <- function(label, description, mandatory = FALSE) {
mandatorySpan <- if (mandatory) span("*", class = "mandatory_star")
tagList(
label,
span("*", class = "mandatory_star")
mandatorySpan,
bslib::tooltip(
bsicons::bs_icon("question-circle", title = description),
label
)
)
}

Expand Down Expand Up @@ -84,37 +89,87 @@ BiocWorkshopSubmit <- function(...) {
id = "form",
textInput(
"id",
mandatory("Workshop ID"),
labelFormat(
"Workshop ID",
"An ad-hoc workshop identifier, e.g., 'bioc2023abc123'",
TRUE
),
placeholder = "abc123"
),
textInput(
"title",
label = mandatory("Title"),
placeholder = "A Bioconductor Workshop Title"
labelFormat(
"Title",
"e.g., Package Demo: Package",
TRUE
),
placeholder = "A Short Workshop Title"
),
textInput(
"section",
label = mandatory("Section"),
label = labelFormat(
"Section",
"Event section name as provided by organizers",
TRUE
),
placeholder = "BioC2023"
),
## TODO: point out workshop.bioconductor.org examples
textInput("description", "Description"),
textInput(
"description",
labelFormat(
"Description",
"A short secondary title, e.g., Integration of Multi-'Omics Experiments in Bioconductor"
)
),
textInput(
"gitrepo",
label = "Git Repository",
label = "Git Repository URL",
placeholder = "https://github.com/username/repository"
),
textInput(
"startfile", "Start File", value = "README.md"
"startfile",
labelFormat(
"Start File",
"Initial file to open in the container"
),
value = "README.md"
),
textInput(
"url",
label = "Container URL",
label = labelFormat(
"Container URL",
"URL of the container image, e.g., ghcr.io/username/repo"
),
placeholder = "ghcr.io/username/repo"
),
textInput("tag", "Container Tag", placeholder = "devel"),
textInput("pkglist", "Packages to pre-install", placeholder="S4Vectors,username/repo,GenomicRanges"),
textInput("vignettes", "Vignettes to add to container (comma sep.)", placeholder="Relative paths to vignettes or URL list e.g., vignettes/workshop.Rmd OR https://gist.githubusercontent.com/user/repo/vignettes/workshop.Rmd"),
textInput(
"tag",
label = labelFormat(
"Container Tag",
"Tag of the container image, e.g., latest"
),
placeholder = "devel"
),
textInput(
"pkglist",
labelFormat(
"Packages to pre-install",
"Not needed for workshops with a DESCRIPTION file"
),
placeholder = "S4Vectors,username/repo,GenomicRanges"
),
textInput(
"vignettes",
labelFormat(
"Vignettes to add to container (comma sep.)",
"Not needed for workshops with a vignettes folder"
),
placeholder = paste0(
"Relative paths to vignettes or URL list e.g., ",
"vignettes/workshop.Rmd OR ",
"https://gist.githubusercontent.com/user/repo/vignettes/workshop.Rmd"
)
),
actionButton("render", "Render", class = "btn-primary")
),
hr(),
Expand Down

0 comments on commit 4e30939

Please sign in to comment.