Skip to content

Conversation

@mattsherman
Copy link
Contributor

@mattsherman mattsherman commented May 16, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

This PR fixes the modal block editor crashing when clicking the + (Add) button in the modal block editor header to bring up the block inserter sidebar when Gutenberg 18.3.0 is installed.

Please note that the block inserter sidebar looks different with different Gutenberg versions...

No Gutenberg, or Gutenberg 18.2.0 or below

Screenshot 2024-05-17 at 11 32 26

Gutenberg 18.3.0

Screenshot 2024-05-17 at 11 36 13

Gutenberg 18.4.0.rc-1 or later

Screenshot 2024-05-17 at 12 12 37

Closes #47560.

How to test the changes in this Pull Request:

Go through the following test instructions for each of the following environments:

  • Gutenberg plugin not installed
  • Gutenberg 18.2.0 plugin installed (zip)
  • Gutenberg 18.3.0 plugin installed (get from plugin directory)
  • Gutenberg 18.4.0-rc.1 (zip)
  • Gutenberg with fix branch (zip) (might need to clear your browser cache when switching to this, as it has the same version number as 18.4.0-rc.1)

With a WooCommerce env with the new product editor enabled (WooCommerce > Settings > Advanced > Features > Experimental features)...

  1. Go to Products > Add New
  2. Click on Description > Full Editor to bring up the modal editor
  3. Click the + button in the modal header to bring up the block inserter sidebar
  4. Add a block and verify it gets added to the editor
  5. Click the X button in the modal header to close the block inserter sidebar
  6. If using Gutenberg with fix branch...
    • Open up the block inserter sidebar again by clicking the + button in the modal header
    • Click the x button in the sidebar header (next to the Blocks, Patterns, Media tabs) and verify the block inserter sidebar closes

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@mattsherman mattsherman self-assigned this May 16, 2024
@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

@mattsherman mattsherman changed the title Fix/product editor modal block editor add crash Product Editor: Fix modal block editor crashing when Add button clicked with Gutenberg 18.3.0 May 17, 2024
@mattsherman mattsherman added focus: new product ux Bug The issue is a confirmed bug. labels May 17, 2024
@mattsherman mattsherman marked this pull request as ready for review May 17, 2024 16:34
@mattsherman mattsherman requested a review from a team May 17, 2024 16:36
@github-actions
Copy link
Contributor

Hi , @woocommerce/mothra

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

@retrofox retrofox left a comment

Choose a reason for hiding this comment

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

LGTM.
Tested and it fixes the bug that breaks the app.
Nice one!
:shipit:

@mattsherman mattsherman merged commit a6b0bb7 into trunk May 20, 2024
@mattsherman mattsherman deleted the fix/product-editor-modal-block-editor-add-crash branch May 20, 2024 12:36
@github-actions github-actions bot added this to the 9.0.0 milestone May 20, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label May 20, 2024
@alvarothomas alvarothomas modified the milestones: 9.0.0, 8.9.0 May 20, 2024
github-actions bot pushed a commit that referenced this pull request May 20, 2024
alvarothomas pushed a commit that referenced this pull request May 20, 2024
Product Editor: Fix modal block editor crashing when Add button clicked with Gutenberg 18.3.0 (#47561)

Co-authored-by: Matt Sherman <[email protected]>
alvarothomas pushed a commit that referenced this pull request May 20, 2024
Update changelog after cherry-picking #47561 and update release date to 2024-05-21.
@rodelgc rodelgc added needs: internal testing Indicates if the PR requires further testing conducted by Solaris status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels May 22, 2024
thealexandrelara pushed a commit that referenced this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug The issue is a confirmed bug. fix release: 8.9.1 needs: internal testing Indicates if the PR requires further testing conducted by Solaris status: analysis complete Indicates if a PR has been analysed by Solaris

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Product Editor: Modal block editor (description field) crashes when Add button is clicked with Gutenberg installed

6 participants