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

Bug report modal links #4

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ghqc.app
Title: Create QC Checklists in Github Issues
Version: 0.1.1
Version: 0.1.2
Authors@R: c(
person("Jenna", "Johnson", email = "[email protected]", role = c("aut", "cre")),
person("Anne", "Zheng", email = "[email protected]", role = c("aut")),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

# ghqc.app (beta version)

# ghqc.app 0.1.2

- Fixes bug in record app warning modal pop-up for unclosed milestones/issues/checklist items: Milestone link wasn't clickable
- Improves "No closed milestones" modal pop-up warning in record app. Language change to "It is recommended to close milestones" and adds a reset link to modal for users to click after closing milestones.

# ghqc.app 0.1.1

# Minor bug fixes
Expand Down
10 changes: 7 additions & 3 deletions R/app_03_record_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ ghqc_record_server <- function(id, remote, org, repo, all_milestones) {
modalDialog(
title = tags$div(
tags$span("Warning", style = "float: left; font-weight: bold; font-size: 20px;"),
modalButton("Dismiss"),
actionButton(ns("return"), "Return", class = "btn-sm"),
actionButton(ns("reset"), "Reset", class = "btn-sm"),
style = "overflow: hidden; text-align: right;"
),

HTML(warn_icon_html, glue::glue("There were no closed Milestones found in {org}/{repo}.<br>
Close relevant Milestones on GitHub to indicate finished QC, then click \"Reset\" in the top right corner of this app.<div style=\"margin-bottom: 9px;\"></div>")),
tags$a(href = milestone_list_url, "Click here to close Milestones on GitHub", target = "_blank"),
It is recommended to close relevant Milestones on GitHub to indicate finished QC.<div style=\"margin-bottom: 9px;\"></div>")),
tags$span(
tags$a(href = milestone_list_url, target = "_blank", HTML("Click here to close Milestones on GitHub.")),
"Next, click \"Reset\" to refresh the app."
),
easyClose = TRUE,
footer = NULL
)
Expand Down
5 changes: 3 additions & 2 deletions R/app_03_record_utils.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#' @importFrom log4r warn error info debug
generate_html_list_with_hyperlink <- function(items) {
paste("<li><a href='", items$url, "' target='_blank'>", items$title, "</a></li>", collapse = "")
html <- paste("<li><a href='", items$url, "' target='_blank'>", items$title, "</a></li>", collapse = "")
html
}

generate_tiered_html_list_with_hyperlink <- function(items) {
milestone_dfs <- split(items, items$milestone)

milestone_sections <- lapply(names(milestone_dfs), function(milestone_name) {
milestone_url <- milestone_dfs[[milestone_name]]$milestone_url[1]
milestone_heading <- glue::glue("<a href='{milestone_url}'>{milestone_name}</a>:")
milestone_heading <- glue::glue("<a href='{milestone_url}' target='_blank'>{milestone_name}</a>:")

milestone_list_items <- paste(
"<li><a href='",
Expand Down
Loading