-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Reimplement classes in S7 #6364
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
66
commits into
tidyverse:main
Choose a base branch
from
teunbrand:S7_objects
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.
+1,746
−1,232
Open
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
8bd9f31
add S7 as import
teunbrand d54e464
custom properties for theme elements
teunbrand 91302e0
convert theme elements to S7 classes
teunbrand 8c199a1
adapt element definitions
teunbrand 202b80d
convert element_grob to S7 generic
teunbrand df02b37
replace merge_element by S7
teunbrand b038e8f
implement `$.element` for backward compatibility
teunbrand 09eef8d
Use S7 properties
teunbrand 62d8db4
fix `inherits()` issues
teunbrand 27cdb73
fix misc issues
teunbrand 3bc0d63
Revert "implement `$.element` for backward compatibility"
teunbrand 360c975
don't rely on `element$prop`
teunbrand 68fe80b
move element properties
teunbrand 8c3471e
convert `margin` to S7
teunbrand 9f69323
I liked index properties as an idea but apparently they print badly
teunbrand e4b870b
adapt failing example
teunbrand 0154671
import S7
teunbrand b4163e0
convert theme to S7
teunbrand 7fce100
Reimplement S3 <uneval> into S7 <mapping>
teunbrand 32ccdb2
convert labels to S7
teunbrand 032ca6a
make S7 class_ggplot
teunbrand c37317b
Use `@` as accessor
teunbrand 90d644f
double dispatch for `ggplot_add()`
teunbrand 0310be8
Write methods for external generics as S7
teunbrand 2607597
backward compatibility for ggplot class
teunbrand 30b1118
Implement <ggplot_built> as S7
teunbrand ef5db54
implement `as.gtable` methods
teunbrand 206c394
rename mapping to class_mapping
teunbrand 53504c3
refine class_ggplot_built and related functions
teunbrand bbdc7a5
also access ggplot_built slots with normal extractors
teunbrand 2f06dd5
resolve gnarlyness in S3/S7 method conflicts
teunbrand 39765cd
fix esoteric 'promise already under evaluation' error
teunbrand 07ebce6
fix series of minor issues
teunbrand fece790
export theme as class
teunbrand f8ed252
export labels class
teunbrand 8fde6e8
collect classes in one place
teunbrand 5453b28
revert @include decisions
teunbrand 9736300
Make S7 generic of `get_alt_text()`
teunbrand 028068f
backport `@`
teunbrand c754551
exempt classes from pkgdown
teunbrand 9acc1ee
lol at my incompetence
teunbrand edda7e4
resolve merge conflict
teunbrand 5d41f0e
allow variant error messages
teunbrand 77cb52d
workaround for old R versions
teunbrand 8177f06
update pkgdown index
teunbrand 4f8a351
resolve merge conflict
teunbrand b2f143e
backport `@`
teunbrand 4fbf5cf
resolve merge conflict
teunbrand 98fb83e
S7-aware `is_theme_element()`
teunbrand f56a504
utility for grabbing props
teunbrand a775635
use classic extractors and subassignment
teunbrand b38f3e5
fallback for `register_theme_elements()`
teunbrand aa14c88
contingencies for `inherits(x, <S7>)` on old R versions
teunbrand c8a0683
resolve merge conflict
teunbrand 69ae934
use `is_theme()`
teunbrand 67dae2d
sprinkle notes
teunbrand fcfdc69
bump staged deprecations
teunbrand 924b8b6
add linejoins
teunbrand 764a2ce
resolve merge conflict
teunbrand 6eb2264
Disable `ggtext::element_markdown()` example
teunbrand 7595556
fix failing tests
teunbrand 38ae287
resolve merge conflict
teunbrand 5797664
redocument
teunbrand 18b9273
resolve merge conflict
teunbrand 4b7a189
fix doc links
teunbrand 8b285a5
Merge pull request #16 from teunbrand/S7_elements
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
Oops, something went wrong.
Oops, something went wrong.
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.
When we have an S3 generic we need for both S3 and S7 objects, we need to implement methods for the S7 objects in the S3 fashion, because using
S7::method()
will invalidate the S3 methods.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.
Do you know the timeline for resolving this?