Conversation
Closes #168 More about color changes inspired by the official GitHub colors: * Switched to their red for "bug" * Our "feature" now uses GitHub's color for "enhancement" https://twitter.com/github/status/954467266434945024 "Parts of GitHub might look a little different today. We've changed the text color for issue labels to meet accessibility standards based on WCAG guidelines."
R/github-labels.R
Outdated
| #' provide via `labels`. | ||
| #' | ||
| #' @param delete_default If `TRUE`, will remove default labels. | ||
| #' `gh_labels()` returns the labels and colours commonly used by tidyverse |
There was a problem hiding this comment.
Should this include tidy since it's a tidyverse convention?
R/github-labels.R
Outdated
| #' It does not generally remove labels, unless you explicit ask to | ||
| #' remove GitHub's defaults. | ||
| #' @description `use_github_labels()` creates new labels and/or changes label | ||
| #' colours. It does not generally remove labels, unless you explicitly ask to |
There was a problem hiding this comment.
unless explicitly requested with remove = TRUE?
There was a problem hiding this comment.
Reworded to be mention delete_default = TRUE
| #' use_github_labels(delete_default = TRUE) | ||
| #' } | ||
| use_github_labels <- function(labels = gh_labels(), | ||
| delete_default = FALSE, |
There was a problem hiding this comment.
Are you suggesting that remove = TRUE requests to drop labels that are not present in labels, regardless of whether they are GitHub defaults?
Based on my interactions with usethis labels while working on this, that would create more work. For example, pretty sure I would have accidentally deleted the non-package label by now.
R/github-labels.R
Outdated
| def_labels <- setdiff(cur_label_names[default], names(labels)) | ||
|
|
||
| if (length(def_labels) > 0) { | ||
| done("Removing default labels: ", collapse(value(def_labels))) |
There was a problem hiding this comment.
Now reads "Removing labels", which should stand the test of time.
R/github-labels.R
Outdated
| ) | ||
| #' @rdname use_github_labels | ||
| #' @export | ||
| gh_labels <- function() { |
There was a problem hiding this comment.
I don't love the current colours, but I find the new colours ugly 😞
There was a problem hiding this comment.
I reverted the changes to existing colours.
|
Would the docs for this function be a good place to park out descriptions of when to use the different labels? |
Darker shade of 6c71c4, the violet from Solarized. Made darker in order to force text to become white.
Yes, I opened #252 for that. We could merge this in the meantime. I reverted the color changes and picked a nicer violet for "good first issue". This repo has had the proposed version of Can I merge? It's easy to tweak colours in future. |
gh_labels()tidy_labels()which returns named vector of in-house standard labels and colourslabelsargument, in case anyone wants something other thangh_labels()tidy_labels()Adopt GitHub default colours for "bug" (just a different red) and "feature" (the light blue they use for "enhancement")This repo has had this version of
use_github_labels()called on it, so here's the effect:https://github.com/r-lib/usethis/labels