Skip to content

Guides setup parameters before declaring key - #5643

Merged
teunbrand merged 1 commit into
tidyverse:rc/3.5.0from
teunbrand:setup_params_first
Jan 16, 2024
Merged

teunbrand merged 1 commit into
tidyverse:rc/3.5.0from
teunbrand:setup_params_first

Conversation

@teunbrand

Copy link
Copy Markdown
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.

@thomasp85 thomasp85 left a comment

Copy link
Copy Markdown
Member

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