Skip to content

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
@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