Skip to content

Revert renaming Scale$trans to Scale$transformation #5626

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 4 commits into from
Jan 8, 2024

Conversation

teunbrand
Copy link
Collaborator

@teunbrand teunbrand commented Jan 4, 2024

This PR to the RC aims to fix some reverse dependency problems.

To briefly describe the problem: people are using foo <- Scale$trans all over their code. We have removed the Scale$trans field in #5566, in favour of the Scale$transformation field, which broke all that code. This PR reverses the renaming of the field specifically.

I think the Scale$get_transformation() getter is still useful, so I left it in. It is mostly useful for view scales where the transformation is hidden in the ViewScale$scale$trans.

@teunbrand

This comment was marked as resolved.

@teunbrand teunbrand requested a review from thomasp85 January 5, 2024 10:52
@thomasp85
Copy link
Member

I think you need to start from scratch because you've confused yourself about what to rename where. There is a method transform() which is not touched and you shouldn't try to rename the.

I think basically it is only the field that should be renamed, the get_transformation() method should be updated for that and that would be it

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.

See previous comment

@teunbrand
Copy link
Collaborator Author

I'm not sure I'm following along here. The following bit has me confused:

There is a method transform() which is not touched and you shouldn't try to rename the.

I am not touching the Scale$transform() method in this PR, just the secondary axis' transform field, which recieves the user-provided transformation function. Perhaps the confusing thing is that in #5566 I renamed the secondary axis field to transform instead of transformation?

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
Copy link
Collaborator Author

Thanks for the reviews Thomas!

@teunbrand teunbrand merged commit 358325d into tidyverse:rc/3.5.0 Jan 8, 2024
@teunbrand teunbrand deleted the partially_revert_5566 branch January 8, 2024 13:57
thomasp85 pushed a commit that referenced this pull request Feb 23, 2024
* revert renaming `Scale$trans` to `Scale$transformation`

* use `get_transformation()` more consistently

* use `get_transformation()` for y in function stat
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