-
Notifications
You must be signed in to change notification settings - Fork 2.1k
WIP: S7 theme elements #6355
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
43
commits into
tidyverse:main
Choose a base branch
from
teunbrand:S7_elements
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.
Open
WIP: S7 theme elements #6355
Conversation
This file contains 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 reverts commit b038e8f.
yjunechoe
pushed a commit
to yjunechoe/ggplot2
that referenced
this pull request
Mar 8, 2025
…6335) * Document vector passing to position_nudge * Put nudge_y into aes call As discussed in tidyverse#6355. * Update documentation * redocument --------- Co-authored-by: Teun van den Brand <[email protected]>
A few things to consider:
|
Merge branch 'main' into S7_elements # Conflicts: # R/geom-.R # R/save.R # R/theme-elements.R # R/theme.R
Merge branch 'main' into rc/3.5.2 # Conflicts: # DESCRIPTION # NAMESPACE # R/aes.R # R/bin.R # R/coord-.R # R/coord-cartesian-.R # R/facet-.R # R/fortify.R # R/geom-.R # R/geom-defaults.R # R/geom-label.R # R/ggproto.R # R/guide-.R # R/guide-axis.R # R/guides-.R # R/layer.R # R/margins.R # R/plot-build.R # R/plot-construction.R # R/plot.R # R/position-.R # R/save.R # R/scale-.R # R/scale-colour.R # R/stat-.R # R/stat-ellipse.R # R/theme-current.R # R/theme-elements.R # R/theme.R # README.Rmd # cran-comments.md # man/coord_polar.Rd # man/element.Rd # man/get_geom_defaults.Rd # man/is_tests.Rd # man/stat_connect.Rd # man/stat_ellipse.Rd # revdep/README.md # revdep/cran.md # revdep/failures.md # revdep/problems.md # tests/testthat/_snaps/utilities-checks.md # tests/testthat/test-utilities-checks.R
Release 3.5.2
Merge branch 'main' into S7_elements # Conflicts: # R/geom-label.R # R/guide-.R # R/guide-axis.R # R/margins.R # R/theme-elements.R # R/theme.R # man/element.Rd # man/is_tests.Rd # tests/testthat/test-theme.R
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR aims to fix part of #6352.
In essence it converts all S3
element_*()
functions andmargin()
to S7 classes.As it stands, there are some backwards compatibility issues for extensions:
inherits(x, "element_blank")
will no longer work. From 4.3.0 onwards, usinginherits(x, element_blank)
will work, andS7::S7_inherits(x, element_blank)
should work. Alternatively, one could in theory useinherits(x, c("element_blank", "ggplot2::element_blank"))
for backward compatibility, but it'd require a change in the extension.$
,[
or[[
of properties will no longer work and extensions will have to use@
. On ggplot2's end, we can provide methods for the typical generics, but we'd run into Weird S7/S3 interaction RConsortium/S7#390.marquee::element_marquee()
orggtext::element_markdown()
will also have to write their elements as S7 classes. I cannot see a good solution to have this be backwards compatible.