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

Reverted breaking API change, removal of the denormalizeRectWithOffset #182

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

oleksandr-danylchenko
Copy link
Contributor

Changes Made

Reverted the 945c09d commit, where the normalizeRects.ts utility file was deleted.
However, its utilities are used by the consumers that implement custom popup components.

@rsimon
Copy link
Member

rsimon commented Nov 21, 2024

Sorry, in this case I have to contradict. I'm fine if we find sensible names for it. But this way, when I looked at those methods for a second time, I had already forgotten what direction "normalize" vs. "denormalize" goes. Having two args of the same type doesn't help either. We're really talking about a single line of code here, and it's pretty obvious what it does if you see it. But with just generic "(de)normalize" as name, readability IMO suffers massively, for a single line of (readable) avoided code.

@oleksandr-danylchenko
Copy link
Contributor Author

oleksandr-danylchenko commented Nov 21, 2024

Hmm, that's reasonable. Maybe I overprojected my familiarity with the "normalize/denormalize" functions.

Would smth like the "toParentBounds" & "toViewportBounds" sound clearer to you?

@oleksandr-danylchenko
Copy link
Contributor Author

cc @rsimon, could you please take a look at the PR in your spare time? 🙏🏻
I don't wanna bring it into the fork too eagerly to prevent furthering the merge conflicts.

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