-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Polishes triggered by revdep failures #6506
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
Open
teunbrand
wants to merge
24
commits into
tidyverse:main
Choose a base branch
from
teunbrand:revdep_deprecated_theme
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+983
−10,530
Open
Changes from 15 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c4ffa57
don't extract <element_blank>@hjust
teunbrand 6c13d47
ensure `if` switch is scalar
teunbrand 16c3084
contingency where `merge_element(..., e2 = <S3_element>)`
teunbrand bad1e32
cast a wider net for function matching
teunbrand 593f326
Fix NOTE: no visible binding for global variable 'properties'
teunbrand e169794
stabilise missingness detection for 2D structures
teunbrand 7a886b8
avoid recursion issue when `theme` is missing
teunbrand a15f1ac
avoid renaming argument for S3 method consistency purposes
teunbrand 6743479
demote warning to message
teunbrand ec193c0
stop complaints about 0-length labels, which is commonly used in labe…
teunbrand 2429d31
allow merging <S3> + <S3>
teunbrand 27465ff
fix #6521
teunbrand 5cb124c
fix #6513
teunbrand afb019e
avoid rare error when using GeomSf based extensions
teunbrand b82fc4a
`label.size` should be soft-deprecated first
teunbrand 29e08d3
Merge branch 'main' into revdep_deprecated_theme
teunbrand e7e08d5
put `convert` into `local()` too
teunbrand 3655a59
restore accent colour for `geom_contour()`
teunbrand 3ab6b3a
new revdepcheck
thomasp85 fd63768
Merge branch 'revdep_deprecated_theme' of https://github.com/teunbran…
teunbrand 2b22612
don't prepend `""` as class
teunbrand db292e6
mark the binning change as a breaking change
teunbrand 78e6aec
fix #6531
teunbrand d3d2956
fix #6529
teunbrand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -518,9 +518,9 @@ | |
) | ||
if (is.null(elements[["legend.title"]])) { | ||
elements$legend.title <- element_text(hjust = elements$legend.title.align) | ||
} else { | ||
elements$legend.title$hjust <- elements$legend.title$hjust %||% | ||
elements$legend.title.align | ||
} else if (!is_theme_element(elements$legend.title, "blank")) { | ||
elements$legend.title$hjust <- | ||
try_prop(elements$legend.title, "hjust", elements$legend.title.align) | ||
} | ||
elements$legend.title.align <- NULL | ||
} | ||
|
@@ -531,9 +531,9 @@ | |
) | ||
if (is.null(elements[["legend.text"]])) { | ||
elements$legend.text <- element_text(hjust = elements$legend.text.align) | ||
} else { | ||
elements$legend.text$hjust <- elements$legend.text$hjust %||% | ||
elements$legend.text.align | ||
} else if (!is_theme_element(elements$legend.text, "blank")) { | ||
elements$legend.text$hjust <- | ||
try_prop(elements$legend.text, "hjust", elements$legend.text.align) | ||
} | ||
elements$legend.text.align <- NULL | ||
} | ||
|
@@ -980,7 +980,7 @@ | |
# Backward compatbility | ||
# TODO: deprecate next release cycle | ||
is_old_element <- !S7::S7_inherits(e1) && inherits(e1, "element") | ||
if (is_old_element && is_theme_element(e2)) { | ||
if (is_old_element && (is_theme_element(e2) || inherits(e2, "element"))) { | ||
return(combine_s3_elements(e1, e2)) | ||
} | ||
|
||
|
@@ -999,22 +999,24 @@ | |
} | ||
} | ||
|
||
parent_props <- if (S7::S7_inherits(e2)) S7::props(e2) else unclass(e2) | ||
|
||
Comment on lines
+1002
to
+1003
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is so that |
||
# If e1 has any NULL properties, inherit them from e2 | ||
n <- S7::prop_names(e1)[lengths(S7::props(e1)) == 0] | ||
S7::props(e1)[n] <- S7::props(e2)[n] | ||
S7::props(e1)[n] <- parent_props[n] | ||
|
||
# Calculate relative sizes | ||
if (is_rel(try_prop(e1, "size"))) { | ||
e1@size <- e2@size * unclass(e1@size) | ||
e1@size <- parent_props$size * unclass(e1@size) | ||
} | ||
|
||
# Calculate relative linewidth | ||
if (is_rel(try_prop(e1, "linewidth"))) { | ||
e1@linewidth <- e2@linewidth * unclass(e1@linewidth) | ||
e1@linewidth <- parent_props$linewidth * unclass(e1@linewidth) | ||
} | ||
|
||
if (is_theme_element(e1, "text")) { | ||
e1@margin <- combine_elements(e1@margin, e2@margin) | ||
e1@margin <- combine_elements(e1@margin, parent_props$margin) | ||
} | ||
|
||
# If e2 is 'richer' than e1, fill e2 with e1 parameters | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argument was
data
before, which I changed toplot
because it felt more descriptive. However, this got us into trouble with S3 method/generic consistency.