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

inline add_margins() #13

Merged
merged 1 commit into from
Jan 19, 2024
Merged

inline add_margins() #13

merged 1 commit into from
Jan 19, 2024

Conversation

teunbrand
Copy link
Contributor

Hello there,

We have been preparing a new release of ggplot2 and during a reverse dependency check, it became apparent that the prospective ggplot2 3.5.0 would break shadowtext.

This PR copies the contents of the removed add_margins() function. Briefly, the use of unexported functions is discouraged, as ggplot2 makes no that they continue to exist. For more information about this issue, please see https://www.tidyverse.org/blog/2022/09/playing-on-the-same-team-as-your-dependecy/. While add_margins() is the one that broke shadowtext this time, there are others that are equally brittle found here:

"%||%" <- getFromNamespace("%||%", "ggplot2")
zeroGrob <- getFromNamespace("zeroGrob", "ggplot2")
modify_list <- getFromNamespace("modify_list", "ggplot2")
add_margins <- getFromNamespace("add_margins", "ggplot2")
rotate_just <- getFromNamespace("rotate_just", "ggplot2")
font_descent <- getFromNamespace("font_descent", "ggplot2")

To test the code changes with the release candidate, you can install it with the code below:

remotes::install_github("tidyverse/ggplot2", ref = remotes::github_pull("5592"))

The release of ggplot2 3.5.0 is scheduled for the 12th of February. The progress of the release can be tracked in tidyverse/ggplot2#5588. We hope that this PR might help shadowtext get out a fix if necessary.

@GuangchuangYu GuangchuangYu merged commit 4e7c54a into GuangchuangYu:master Jan 19, 2024
@GuangchuangYu
Copy link
Owner

thanks.

@teunbrand teunbrand deleted the ggplot2_3.5.0 branch January 19, 2024 06:40
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

Successfully merging this pull request may close these issues.

2 participants