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.
Hi there,
I apologise for not abiding by the checklist. We have been preparing a new release of ggplot2 and during a reverse dependency check, it became apparent that the prospecive ggplot2 3.5.0 would break thematic.
The function that would break checks is the
theme_relationships()
, as there are now elements that inherit from two parents instead of 1:1 inheritance (minor axis ticks length). The proposed changes herein do not resolve the multiple inheritance, but merely prevents breaking the function.Here is an example of minor ticks in use with this PR:
Created on 2024-01-19 with reprex v2.1.0
A second thing we've changed is the resolution of legend text and titles. These are now resolved internally based on the text/title position within the legend, to give these appropriate margins and justifications. The pre-computation of these theme elements in full, renders these internal resolutions void, and legend text/titles would appear misplaced. In this PR, justification and margin overrides for the relevant theme elements has been disabled. This change is not absolutely necessary, but I figured it might be desired.
In addition to aforementioned issues, I think it might be a good idea to review the visual checks and possibly make a decision of whether the new
legend.frame
,legend.ticks
andlegend.key.spacing.y
elements should also be exempt from pre-computation. This is more of a matter of taste, so I'm not in a position to advise here.For reasons of unfamiliarity, I wasn't able to judge the shiny tests in any meaningful capacity.
To test the code changes with the release candidate, you can install it with the code below:
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 thematic get out a fix if necessary.