Skip to content

Guides setup parameters before declaring key #5643

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

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

teunbrand
Copy link
Collaborator

This PR to the RC fixes a mild annoyance of mine in guide behaviour.

Briefly, this PR restores the opportunity encode position and/or direction information into the key.

Elaborating some more: prior to #5483, guides had the opportunity to encode position/direction information in the key.
Since position/direction is now resolved at the ggplot_gtable() stage, guide keys have no such opportunity anymore.
By using the Guide$setup_params() method before taking the key from the parameters, this opportunity is restored.
I came across this while messing about with guide extensions, and while not crucial for the guides in ggplot2, it is nice to have for other guide extensions.

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@teunbrand teunbrand merged commit 26de56e into tidyverse:rc/3.5.0 Jan 16, 2024
@teunbrand teunbrand deleted the setup_params_first branch January 16, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants