Repository navigation
Fix guide merging when there are repeated labels - #3599
Merged
paleolimbot merged 4 commits intoNov 4, 2019
Merged
Conversation
clauswilke
approved these changes
Oct 30, 2019
clauswilke
left a comment
Member
There was a problem hiding this comment.
This looks good to me, but maybe get one more review before merging.
thomasp85
approved these changes
Nov 4, 2019
thomasp85
left a comment
Member
There was a problem hiding this comment.
LGTM... I cannot predict whether we may get unexpected behaviour somewhere, but I guess time will tell 🙂
|
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/ |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 is a PR to fix #3573, a bug whereby guides with repeated labels were merged incorrectly. This bug occurred because the two guides keys were merged using
merge(), which only works when there are no duplicate values in the.labelcolumn.Details
Current behaviour:Behaviour after this PR:
In the current implementation of merging, guides are only merged when they have identical
direction,key$.label,title, andname. Becausekey$.labelhas to be identical for both guides, it should be safe to usecbind()inguide_merge.guide_legend()instead ofmerge(). I took the opportunity to write (non-visual) tests for guide merging to make sure it didn't break anything. As always, happy to be convinced otherwise (or that this shouldn't be fixed right now).