Skip to content

Polishes triggered by revdep failures #6506

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

teunbrand
Copy link
Collaborator

@teunbrand teunbrand commented Jun 13, 2025

INITIALLY: Fix revdep failure: don't extract <element_blank>@hjust

This affects only 2 packages (smallsets and utile.visuals), but it is our faux pas.
Essentially, because element_blank does not have the hjust property, trying to extract it will error.
In this PR, we are more careful in trying to extract this property.

@teunbrand
Copy link
Collaborator Author

Also snuck in another tiny issue I ran into

@teunbrand teunbrand changed the title Fix revdep failure: don't extract <element_blank>@hjust Polishes triggered by revdep failures Jun 13, 2025
@teunbrand
Copy link
Collaborator Author

teunbrand commented Jun 18, 2025

When we use labs(shape = NULL), we want to render no title for the shape guide. Throwing warnings to the tune of 'We're ignoring your empty labels', is irksome because the natural response to this is 'Yes, I know, that is exactly what I want you to do'.

@teunbrand teunbrand added this to the ggplot2 4.0.0 milestone Jun 19, 2025
@@ -317,13 +317,13 @@ S7::method(gtable_ggplot, class_ggplot_built) <- function(data) {
# TODO: the S3 generic should be phased out once S7 is adopted more widely
#' @rdname gtable_ggplot
#' @export
ggplot_gtable <- function(plot) {
ggplot_gtable <- function(data) {
Copy link
Collaborator Author

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 to plot because it felt more descriptive. However, this got us into trouble with S3 method/generic consistency.

Comment on lines +1002 to +1003
parent_props <- if (S7::S7_inherits(e2)) S7::props(e2) else unclass(e2)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so that parent_props$name works, regardless of S3/S7

@teunbrand teunbrand requested a review from thomasp85 June 23, 2025 07:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants