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

Fix missing labels slot #6010

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix part of #6008.

Briefly, reverse dependencies sometimes make assumptions about length(ggplot()) or names(ggplot()). In #5879 we removed the labels field, causing these assumptions to no longer hold. This PR brings back the labels field to make these assumptions valid again.

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.

Maybe add a comment on why we keep this vestigal slot there...

@teunbrand
Copy link
Collaborator Author

I wouldn't mark this as vestigial. It doesn't track layers anymore, but it still keeps labels if users use + labs(...).

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 f87ea34 into tidyverse:main Sep 23, 2024
11 checks passed
@teunbrand teunbrand deleted the restore_label_slot branch September 23, 2024 07:39
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