Skip to content

Conversation

@joshuatf
Copy link
Contributor

Submission Review Guidelines:

Changes proposed in this Pull Request:

Adds a modal editor that can be used in the product editor for descriptions and other fields that require separate editors.

This PR only addresses fitting the iframe editor into the editor and does not include the toolbar, sidebars, or other functionality which will be addressed in follow-ups.

Screen Shot 2023-04-21 at 1 29 02 PM

Closes #37898 .

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. Click the modal's close button ("x")
  6. Make sure the description button now reads "Edit description"
  7. Save the product
  8. Refresh the page
  9. Click "Edit description"
  10. Make sure the description has persisted

@joshuatf joshuatf requested a review from a team April 21, 2023 20:37
@joshuatf joshuatf self-assigned this Apr 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 21, 2023

Hi @joelclimbsthings, @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

github-actions bot commented Apr 21, 2023

Test Results Summary

Commit SHA: 8f3a5b5

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202691m 3s
E2E Tests1870010019718m 19s

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.

Base automatically changed from add/37771 to trunk April 25, 2023 18:05
@joelclimbsthings joelclimbsthings requested review from joelclimbsthings and removed request for a team April 25, 2023 21:24
@joelclimbsthings
Copy link
Contributor

Hey @joshuatf , I attempted to review this but the pnpm upgrades were causing issues. I attempted to downgrade again, but still no 🎲 . This will need a rebase as is, so feel free to ping me for that review when that's done!

@joshuatf
Copy link
Contributor Author

Hey @joelclimbsthings I just rebased this and should be good for review. You may still have to upgrade pnpm or clean cache as I know these have been updated in trunk.

@joelclimbsthings joelclimbsthings requested review from a team and removed request for a team April 25, 2023 22:18
Copy link
Contributor

@joelclimbsthings joelclimbsthings 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 ! I had a couple minor questions regarding the styles. I'm also assuming that the appearance isn't intended to be part of this PR, but just in case I'll mention that the paragraph blocks still appear gray on my end.

image


@import 'components/radio-field/style.scss';
@import 'components/iframe-editor/style.scss';
@import 'components/details-categories-field/style.scss';
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you intend to remove these two files for the categories field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. Error on my part during wonky rebase. Added back in.

@@ -0,0 +1 @@
@import './modal-editor.scss';
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious why we have multiple levels of scss imports here? Do we need both this file and modal-editor-scss files to exist?

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 was following our pattern of having an index.ts file with a separate component-name.tsx file that is imported there. It's easier to find and identify stylesheets this way that are named component-name.scss. It also creates an entry file when multiple imports do exist.

That said, I'm not overly opinionated on this and have removed it for the time being.

Copy link
Contributor

@joelclimbsthings joelclimbsthings left a comment

Choose a reason for hiding this comment

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

Thanks @joshuatf , all looks well on my end 🚢

@joshuatf joshuatf merged commit bf14b26 into trunk Apr 28, 2023
@joshuatf joshuatf deleted the add/37898 branch April 28, 2023 14:48
@github-actions github-actions bot added this to the 7.8.0 milestone Apr 28, 2023
lanej0 pushed a commit that referenced this pull request May 1, 2023
* Add modal editor for use in product editor

* Allow title of modal to be modified by consumer

* Add changelog entry

* Remove errant style imports after rebase

* Handle PR feedback
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.

Iframe editor should be placed inside of a modal

3 participants