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 for bug #21989, #21650 #27691

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Fix for bug #21989, #21650 #27691

merged 1 commit into from
Dec 17, 2020

Conversation

Lovor01
Copy link
Contributor

@Lovor01 Lovor01 commented Dec 11, 2020

Related PR:

gutenberg-mobile: wordpress-mobile/gutenberg-mobile#2897

I 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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

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.
@Lovor01 Lovor01 requested a review from mkevins as a code owner December 11, 2020 21:26
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 11, 2020
Copy link
Contributor

@mkevins mkevins left a 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! 👍

@mkevins
Copy link
Contributor

mkevins commented Dec 14, 2020

I've updated the description with a link to a gutenberg-mobile PR (a submodule reference update) to bring the fix to mobile as well.

@Lovor01
Copy link
Contributor Author

Lovor01 commented Dec 14, 2020

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.

@mkevins mkevins merged commit 6d35801 into WordPress:master Dec 17, 2020
@github-actions
Copy link

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!

@github-actions github-actions bot added this to the Gutenberg 9.7 milestone Dec 17, 2020
@mkevins
Copy link
Contributor

mkevins commented Dec 17, 2020

I am glad if I helped, hopefully I would help more in the future

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants