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

List Custom Fields for New Product Editor #45360

Merged
merged 16 commits into from Mar 11, 2024
Merged

List Custom Fields for New Product Editor #45360

merged 16 commits into from Mar 11, 2024

Conversation

mdperez86
Copy link
Contributor

@mdperez86 mdperez86 commented Mar 6, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

Partially close #44169
Depends on #45291

How to test the changes in this Pull Request:

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

  1. Make sure feature New product editor is enabled under /wp-admin/admin.php?page=wc-settings&tab=advanced&section=features
  2. Make sure feature product-custom-fields is enabled under Features tab from /wp-admin/tools.php?page=woocommerce-admin-test-helper (WooCommerce Beta Tester plugin) is required
  3. Go to Products -> Add new from the left menu to create a new product
  4. Then go to the Organization tab
  5. At the end of the page a new Show custom fields toggle should be shown
  6. Clicking the toggle will show a new Custom fields section listing the custom fields that belong to the editing product metas
  7. An empty state will be shown when there are no custom fields to show
image
  1. You can add the custom fields from the classic editor and those ones will be listed here in the new editor
image

NOTE: total_sales is automatically added as a custom field to each product in the classic editor. This field is not added or shown automatically in the new editor for now.

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

@mdperez86 mdperez86 added focus: new product ux revamped product management experience team: Mothra labels Mar 6, 2024
@mdperez86 mdperez86 requested a review from a team March 6, 2024 18:50
@mdperez86 mdperez86 self-assigned this Mar 6, 2024
Copy link
Contributor

github-actions bot commented Mar 6, 2024

Hi @octaedro,

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

github-actions bot commented Mar 6, 2024

Test Results Summary

Commit SHA: f1969c4

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 38s
E2E Tests341001003517m 35s

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.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 6, 2024
@octaedro octaedro requested review from octaedro and removed request for a team March 11, 2024 11:53
'description' => sprintf(
/* translators: %1$s: Custom fields guide link opening tag. %2$s: Custom fields guide link closing tag. */
__( 'Custom fields can be used in a variety of ways, such as sharing more detailed product information, showing more input fields, or internal inventory organization. %1$sRead more about custom fields?%2$s', 'woocommerce' ),
'<a href="https://woo.com" target="_blank" rel="noreferrer">',
Copy link
Contributor

Choose a reason for hiding this comment

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

The link in the design is pointing to woo.com but I think that it would be better to point to the WordPress custom fields documentation.

Copy link

Choose a reason for hiding this comment

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

Yes, agree! That's the correct link, thank you!

"lock": false,
"__experimentalToolbar": false
},
"usesContext": [ "postType" ],
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that we can remove this.

Copy link
Contributor

@octaedro octaedro left a comment

Choose a reason for hiding this comment

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

Good job @mdperez86! This is testing well on my end and the code looks good. I just left one comment that could be addressed in the other PR.

@mdperez86 mdperez86 merged commit 3658ac2 into trunk Mar 11, 2024
39 checks passed
@mdperez86 mdperez86 deleted the add/44169-list branch March 11, 2024 14:48
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 11, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 11, 2024
Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* Create woocommerce/product-custom-fields block

* Register woocommerce/product-custom-fields block

* Add product-custom-fields block to the simple product template

* Create useCustomFields hook

* Create empty state

* Create CustomFields component

* Add custom fields table

* Add custom field remove button

* Hide the custom fields table base on the toggle value

* Remove non list features

* Add changelog files

* Fix linter errors

* Fix empty state styles

* Fix php linter error

* Remove context from the woocommerce/product-custom-fields-toggle-field block definition since it is not used

* Change url for the Read more about custom fields
@alopezari alopezari added focus: new product ux revamped product management experience status: analysis complete Indicates if a PR has been analysed by Solaris and removed focus: new product ux revamped product management experience needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 13, 2024
@nigeljamesstevenson nigeljamesstevenson added the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: new product ux revamped product management experience plugin: woocommerce Issues related to the WooCommerce Core plugin. release: highlight Issues that have a high user impact and need to be discussed/paid attention to. status: analysis complete Indicates if a PR has been analysed by Solaris team: Mothra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Fields for New Product Editor
5 participants