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 imageareaselect bug for non-integer image dimensions #1774

Closed
wants to merge 3 commits into from

Conversation

alshakero
Copy link

Trac ticket: https://core.trac.wordpress.org/ticket/54308#ticket

The ticket has all the information needed.

Fixes Automattic/wp-calypso#52182


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Floor numbers instead of rounding them
@alshakero alshakero changed the title Fix imageareaselect bug for non-integer image dimentions Fix imageareaselect bug for non-integer image dimensions Oct 22, 2021
@autumnfjeld
Copy link

@arthur791004 @alshakero
Just confirming that both this PR #1774 and #2302 should be merged to fix https://core.trac.wordpress.org/ticket/54308#ticket.

@alshakero
Copy link
Author

alshakero commented Feb 22, 2022

@autumnfjeld AFAICT, my PR is sufficient to resolve the issue because it circumvents the issue solved in #2302. I explored both approaches in my trac ticket.

@arthur791004
Copy link

@alshakero Thanks for adding my approach to your trac ticket! I think your PR is good and it can fix the case you mentioned. But I'm not sure there is any other case or not. For example, it seems that the developer can set the initial selection via options here. If the value is greater than image width/height, it might resolve NaN again. So I still think initializing those variables is perhaps safer.

@alshakero
Copy link
Author

@arthur791004 that's a great point!

@autumnfjeld
Copy link

@alshakero Just curious if there are any blockers to finishing this work. Did you need any further assistance?

cc: @arthur791004

@alshakero
Copy link
Author

Hi @autumnfjeld! I'm just waiting for review in Trac. Is there anything I can do to accelerate getting this merged?

@alshakero alshakero changed the base branch from master to trunk October 13, 2022 07:52
@costdev
Copy link
Contributor

costdev commented Nov 29, 2022

I think the PR needs to either rebase on trunk, or merge trunk to resolve the test failure on PHP 8.2 single site.

@alshakero
Copy link
Author

alshakero commented Nov 29, 2022

Hi @costdev! Thanks. I rebased it 👍🏼

@ironprogrammer
Copy link

ironprogrammer commented Jan 3, 2023

Merged/resolved in changeset 54903. This PR can be closed.

@alshakero alshakero closed this Jan 4, 2023
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.

Customizer: Can't crop header images.
5 participants