Skip to content

Commit

Permalink
Reduce default label_width
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Feb 20, 2024
1 parent 70c680b commit bbbb88b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/class_mermaid.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mermaid_init <- function(
network,
label = NULL,
label_break = "<br>",
label_width = 60L,
label_width = 21L,
show_legend = TRUE,
show_color = TRUE
) {
Expand Down
2 changes: 1 addition & 1 deletion R/class_visnetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ visnetwork_init <- function(
network,
label = NULL,
label_break = "\n",
label_width = 60L,
label_width = 21L,
level_separation = NULL,
degree_from = 1L,
degree_to = 1L,
Expand Down
2 changes: 1 addition & 1 deletion R/tar_config_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ tar_config_get_project <- function(name, yaml) {
as_job = yaml$as_job %|||% FALSE,
garbage_collection = yaml$garbage_collection %|||% FALSE,
label = yaml$label %|||% "description",
label_width = yaml$label_width %|||% 60L,
label_width = yaml$label_width %|||% 21L,
level_separation = yaml$level_separation,
reporter_make = yaml$reporter_make %|||% "verbose",
reporter_outdated = yaml$reporter_outdated %|||% "silent",
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-tar_config_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tar_test("tar_config_set() label", {
tar_test("tar_config_set() label_width", {
skip_cran()
expect_false(file.exists("_targets.yaml"))
expect_equal(tar_config_get("label_width"), 60L)
expect_equal(tar_config_get("label_width"), 21L)
tar_config_set(label_width = 120L)
expect_equal(tar_config_get("label_width"), 120L)
expect_true(file.exists("_targets.yaml"))
Expand All @@ -74,7 +74,7 @@ tar_test("tar_config_set() label_width", {
expect_equal(tar_config_get("label_width"), 120L)
expect_true(file.exists("_targets.yaml"))
unlink("_targets.yaml")
expect_equal(tar_config_get("label_width"), 60L)
expect_equal(tar_config_get("label_width"), 21L)
expect_error(
tar_config_set(label_width = -1L),
class = "tar_condition_validate"
Expand Down

0 comments on commit bbbb88b

Please sign in to comment.