-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 for bug #21989, #21650 #27691
Fix for bug #21989, #21650 #27691
Conversation
I found a bug in gallery block and I've fixed it. Bug is following: when adding images to gallery block and changing image size via inspector panel from drop down menu box, the content of the box does not get updated (it is always 'large'). It is a bug - wrong property is used for setting sizeSlug on change (see my proposed replacement in line 284.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue seems to have been introduced here, and this PR indeed fixes a bug (confirmed on both Web and Mobile).
I'm not sure, though, if it fully fixes the issues described in #21989 and #21650, since those issues were opened in April, but this regression only appeared in October. I believe this edge case may still exist, so I guess we should leave those issues open for now.
This PR still addresses the issue for the non-edge-case scenarios. Thank you for the fix! 👍
I've updated the description with a link to a |
Upon further inspection, I believe you are right. This issue was introduced on Oct 15. Earlier code may or may not have similar problems, but issues opened in April have nothing to do with this bug. Thank you for clarifying that and I am glad if I helped, hopefully I would help more in the future. |
Congratulations on your first merged pull request, @Lovor01! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
Thank you for the contribution! 🎉 👍 In order to bring contributions like this to the mobile apps, the typical process is to open a "companion" pull request in this repository: https://github.com/wordpress-mobile/gutenberg-mobile as well. That repository includes this repository as a submodule. I've handled that for this fix to bring it to the mobile side as well with this PR: wordpress-mobile/gutenberg-mobile#2897. Feel free to reach out if you have any questions about that process, or have feedback regarding our contributing documentation. |
Related PR:
gutenberg-mobile
: wordpress-mobile/gutenberg-mobile#2897I found a bug in gallery block and I've fixed it. The bug is following: when adding images to gallery block and changing image size via inspector panel from drop down menu box, the content of the box does not get updated (it is always 'large'). It is a bug - wrong property is used for setting sizeSlug on change (see my proposed replacement in line 284).
Description
sizeSlug: newSizeSlug was added in setAttributes call. Previously it was just newSizeSlug, which means newSizeSlug:newSizeSlug, which is erroneous and does not change sizeSlug attribute
How has this been tested?
Teste on local environment - WAMP stack
Tests showed that now block appears to work OK.
Change does not affect other code
Screenshots
Types of changes
Bug fix
Checklist: