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

Rename aspect property to ratio to carry the defaultAspect in AspectRatioDropdown #69085

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

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
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 <[email protected]>

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
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.
2 participants