Skip to content

Conversation

@mdperez86
Copy link
Contributor

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes #38969

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Go to /wp-admin/admin.php?page=wc-settings&tab=advanced&section=features
  2. Make sure Try the new product editor (Beta) is turned on
  3. Open the browser devtools console
  4. Visit /wp-admin/admin.php?page=wc-admin&path=/add-product
  5. You should not longer see the warning messages described in Console Errors when the New Product Editor is enabled #38969

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

Message

Comment

@mdperez86 mdperez86 requested a review from a team June 29, 2023 14:41
@mdperez86 mdperez86 self-assigned this Jun 29, 2023
@github-actions github-actions bot added focus: react admin [team:Ghidorah] plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Jun 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2023

Hi @mattsherman, @nathanss,

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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 29, 2023

Test Results Summary

Commit SHA: 0f3aefb

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 52s
E2E Tests1900018020814m 22s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@nathanss nathanss self-requested a review July 3, 2023 18:17
Copy link
Contributor

@nathanss nathanss left a comment

Choose a reason for hiding this comment

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

I found a regression with this. It seems to affect the UI.

Here are some screenshots, on trunk:
image

on this branch:
image


wp_add_inline_script(
'wp-blocks',
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add some protection in case unstable__bootstrapServerSideBlockDefinitions doesn't exist? Wouldn't that cause bigger issues?

Suggested change
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions && wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not able to see any regression

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that checking to make sure the function exists before calling it would be a good idea, since things work without calling this (we just get the console warnings).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done -> c55478e

@mattsherman
Copy link
Contributor

I found a regression with this. It seems to affect the UI.

Here are some screenshots, on trunk: image

on this branch: image

I see this as well.

@mattsherman
Copy link
Contributor

After cleaning my dev env with...

git clean -fdx
pnpm store prune
rm -fr "$(pnpm store path)"
pnpm install

things work as expected! No console errors, and layout is correct.

@mdperez86 mdperez86 requested a review from mattsherman July 5, 2023 17:41
@mdperez86 mdperez86 merged commit 98b9670 into trunk Jul 5, 2023
@mdperez86 mdperez86 deleted the fix/38969 branch July 5, 2023 18:32
@github-actions github-actions bot added this to the 8.0.0 milestone Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console Errors when the New Product Editor is enabled

4 participants