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

Change behaviour of theme_update to be more like an update #1519

Merged
merged 7 commits into from Feb 4, 2016

Conversation

@oneillkza
Copy link

@oneillkza oneillkza commented Jan 25, 2016

Per discussion in #1489, this changes theme_update() to use the + operator, so that unspecified attributes of the element being set are taken from the current theme, rather than NULLing them out. I've added theme_replace() with the same behaviour as the current theme_update(), in case that behaviour is desired (though I'm hard-pressed to think of a use case).

I've also added some verbiage to the documentation clarifying what these do, along with examples.

koneill added 3 commits Jan 25, 2016
…g theme_replace that has the same behaviour as the old theme_update. Also expanded and clarified the documentation for these.
@hadley
Copy link
Member

@hadley hadley commented Jan 26, 2016

@wch do you remember the motivation for using %+replace% here?

#' @export

theme_replace <- function(...) {
# Make a call to theme, then add to theme

This comment has been minimized.

@hadley

hadley Jan 31, 2016
Member

Can you please remove this comment? (and in the previous fun)


#' @rdname theme_update
#' @export

This comment has been minimized.

@hadley

hadley Jan 31, 2016
Member

Please remove this empty line

@hadley
Copy link
Member

@hadley hadley commented Jan 31, 2016

Looks good. Just a few minor tweaks and can you please add a bullet point to NEWS?

@hadley hadley modified the milestone: v2.1.0 Jan 31, 2016
@oneillkza
Copy link
Author

@oneillkza oneillkza commented Feb 1, 2016

Done!

@@ -1,5 +1,9 @@
# ggplot2 2.0.0.9000

* `theme_update()` now uses the `+` operator instead of `%+replace%`, so that
unspecified values will no longer be `NULL`ed out. `theme_replace()`
preserves the old behaviour if desired (#1519).

This comment has been minimized.

@hadley

hadley Feb 2, 2016
Member

Could you please cite your github user name in the brackets?

@oneillkza
Copy link
Author

@oneillkza oneillkza commented Feb 2, 2016

Done!

@hadley hadley merged commit 4b7fcbd into tidyverse:master Feb 4, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hadley
Copy link
Member

@hadley hadley commented Feb 4, 2016

Thanks!

@lock
Copy link

@lock lock bot commented Jan 18, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants