Skip to content

Conversation

@yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Feb 7, 2025

What, Why and How?

Closes #69084

This PR fixes an issue where selecting Original Ratio while cropping an image applies an incorrect ratio to the Image block. Additionally, since Original Ratio represents the default state, it should be pre-selected by default.

Testing Instructions

  1. Create an Image Block and pick an Image.
  2. From the Toolbar Controls toggle Crop then Aspect Ratio.
  3. Choose Original from Aspect Ratio.
  4. Confirm that the Image now properly reflects to the Original ratio.

Screencast

pr-demo-enhanced.mov

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review February 7, 2025 07:14
@github-actions
Copy link

github-actions bot commented Feb 7, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: mikinchauhan <mikinc860@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Package] Block editor /packages/block-editor labels Feb 9, 2025
@Mamaduka Mamaduka self-requested a review February 9, 2025 08:10
@yogeshbhutkar
Copy link
Contributor Author

The AspectRatioGroup component was refactored in PR #47271, but the following line was missed and should also be updated from aspect to ratio:

Additionally, the failing tests are unrelated to the changes introduced in this PR.

@mikinchauhan
Copy link

I connected my Git account to my profile.

@Mamaduka
Copy link
Member

@yogeshbhutkar, rebasing on top of the latest trunk should resolve the e2e test issue.

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected ✅

@Mamaduka Mamaduka merged commit a507759 into WordPress:trunk Feb 12, 2025
59 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.3 milestone Feb 12, 2025
Kallyan01 pushed a commit to Kallyan01/gutenberg that referenced this pull request Feb 24, 2025
)


Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: mikinchauhan <mikinc860@git.wordpress.org>
@yogeshbhutkar yogeshbhutkar deleted the fix-69084/typo-in-crop branch March 18, 2025 08:44
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
)


Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: mikinchauhan <mikinc860@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selecting "Original Ratio" while cropping an image does not properly reset it.

3 participants