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

Text for upstream dependency update prompt is confusing #207

Closed
wch opened this issue Oct 12, 2018 · 7 comments
Closed

Text for upstream dependency update prompt is confusing #207

wch opened this issue Oct 12, 2018 · 7 comments

Comments

@wch
Copy link
Member

wch commented Oct 12, 2018

When installing shiny, it asked me if I wanted to update digest. The text is confusing. Apparently just hitting enter cancels installation of the dependency (digest), but not of the target package (shiny), but that's not clear from the text.

Select package(s) to update

1:   digest (0.6.17 -> 0.6.18) [CRAN]

Enter one or more numbers separated by spaces, or an empty line to cancel
1: 
@jimhester
Copy link
Member

jimhester commented Oct 12, 2018

I agree it is confusing.

The ambiguous text is from utils::select.list(), which we can move away from, but we would have to implement then text menu in remotes and drop the graphical menu support included in select.list().

@wch
Copy link
Member Author

wch commented Oct 12, 2018

That is unfortunate that the text is hard-coded.

@jimhester
Copy link
Member

jimhester commented Nov 16, 2018

There seems to be pretty strong sentiment against the popup menus https://twitter.com/jimhester_/status/1063063224537567232, so we can think about implementing a custom text based menu.

@maurolepore
Copy link

maurolepore commented Jan 24, 2019

#245 seems to duplicate this issue

@maurolepore
Copy link

maurolepore commented Jan 24, 2019

What I find most confusing is the word 'cancel'. 'ignore' might be more accurate.

How about modifying select.list() quietly with purrr:::quietly() and rewriting the information printed to the console?

select_list <- function(choices) {
  items <- paste0(seq_along(choices), ": ", choices)
  cat(
    "These packages have more recent versions available.",
    "Which would you like to update?\n",
    items,
    sep = "\n"
  )

  cat("\nEnter one or more numbers separated by spaces, or an empty line to ignore")
  res <- purrr::quietly(utils::select.list)(choices, multiple = TRUE)
  res$result
}

Example selecting option 3 interactively

choices <- letters[1:3]
select_list(choices)

image

@gadenbuie
Copy link

gadenbuie commented Feb 12, 2019

I think it would be best for empty line to cancel to actually cancel the target package installation. All, CRAN packages only and None are already options in the menu, and I often realize I want to manually update a few packages (e.g. install CRAN versions instead of GitHub) when confronted with the list of updates.

Here's an example where I wanted to back out of the installation to install scales from CRAN. The presence of All/None in the menu sends a strong signal that "cancel" refers to the whole installation process.

These packages have more recent versions available.
Which would you like to update?

 1:   dplyr      (0.7.6        -> 0.7.8       ) [CRAN]
 2:   ggplot2    (3.0.0        -> 3.1.0       ) [CRAN]
 3:   scales     (2ccb2fb99... -> c37401464...) [GitHub]
 4:   CRAN packages only
 5:   All
 6:   None
Enter one or more numbers separated by spaces, or an empty line to cancel
1: 

@rachwhatsit
Copy link

rachwhatsit commented Apr 12, 2019

Ah, yeah, I second that 'ignore' over 'cancel' is much more understandable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants