Skip to content

Conversation

@joshuatf
Copy link
Contributor

Submission Review Guidelines:

Changes proposed in this Pull Request:

Adds a ContentPreview component and hooks up the description with a preview area.

Note that the preview area does not show video content currently. I'm not sure if this absolutely necessary to have and may create loading and/or render issues in the product form.

Screen Shot 2023-04-25 at 2 41 04 PM

Closes #37900 .

How to test the changes in this Pull Request:

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

  1. Navigate to Tools -> WCA Test Helper -> Features and enable the new product blocks editing experience
  2. Navigate to Products -> Add new
  3. Click on "Add description" under the description
  4. Add some content via the blocks editor
  5. Close the description editor
  6. Note that the content you added is now visible in the preview area.

@joshuatf joshuatf requested a review from a team April 25, 2023 21:48
@joshuatf joshuatf self-assigned this Apr 25, 2023
@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

@github-actions
Copy link
Contributor

Test Results Summary

Commit SHA: 5b3a077

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202690m 53s
E2E Tests1870010019714m 8s

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.

Copy link
Contributor

@louwie17 louwie17 left a comment

Choose a reason for hiding this comment

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

Nice work @joshuatf this looks great, and tested well!
Glad this was relatively straightforward.

I did notice a couple issues with the editor (which I know isn't related to this PR, but thought I call them out):

  • It looks like when I type some text and hit back some of the changes are not being reflected, I assume this is because of the useDebounce, although this will probably be fixed if we make use of the buttons within the Modal.
  • There appears to be some missing styling still, for example when I add a button, the initial button styling is missing and I can't justify it to the right or to the left. This is reflected correctly on the front-end. The alignment issue mostly pertains to missing css that sets the block to flex.

'li',
'ol',
'div',
];
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review, Lourens!

It looks like when I type some text and hit back some of the changes are not being reflected, I assume this is because of the useDebounce, although this will probably be fixed if we make use of the buttons within the Modal.

I notice this even without debounce. I'll create an issue to look into this. I believe there may already be some level of debouncing occurring within the Gutenberg components.

There appears to be some missing styling still, for example when I add a button, the initial button styling is missing and I can't justify it to the right or to the left. This is reflected correctly on the front-end. The alignment issue mostly pertains to missing css that sets the block to flex.

Good catch! I'll create an issue around this as well.

I'm going to merge this one as-is since two issues are unrelated to this PR and I'll get some issues created to tackle both of these in follow-ups.

@joshuatf joshuatf merged commit 64dbeba into trunk Apr 27, 2023
@joshuatf joshuatf deleted the add/37900 branch April 27, 2023 02:29
@github-actions github-actions bot added this to the 7.8.0 milestone Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Product Block Editor: A preview area should be shown for the description

3 participants