Skip to content

Conversation

@mdperez86
Copy link
Contributor

@mdperez86 mdperez86 commented Oct 3, 2022

All Submissions:

Changes proposed in this Pull Request:

Closes #34657.

How to test the changes in this Pull Request:

  1. Go to Add new product page.
  2. Under Shipping Class section click on the Shipping class dropdown, an Add new shipping class option should be shown as the second option of the list.
  3. When click Add new shipping class option a modal to add a new shipping class should be shown.
  4. If the product does not have a category then the fields Name and Slug on the modal should be filled with New shipping class and new-shipping-class values respectively.

Screen.Recording.2022-10-03.at.4.23.36.PM.mov

5. If the product contains a valid category different than Uncategorized then that value should be used to fill the fields Name and Slug on the modal.

Screen.Recording.2022-10-03.at.4.31.05.PM.mov

6. After adding the new shipping class the dropdown behind the modal should be updated with the new option added.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> run changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@mdperez86 mdperez86 requested a review from a team October 3, 2022 19:15
@github-actions github-actions bot added focus: react admin package: @woocommerce/components issues related to @woocommerce/components package: @woocommerce/data issues related to @woocommerce/data labels Oct 3, 2022
@mdperez86 mdperez86 force-pushed the add/34657-add-new-shipping-class branch from 77d0ca3 to 0b5d0ec Compare October 3, 2022 19:18
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Oct 3, 2022
@mdperez86 mdperez86 self-assigned this Oct 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2022

Test Results Summary

Commit SHA: 4be7ad8

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests15800201600m 39s
E2E Tests186003018918m 44s

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.

@mdperez86 mdperez86 force-pushed the add/34657-add-new-shipping-class branch from 0b5d0ec to b70c4d0 Compare October 3, 2022 19:49
@mdperez86 mdperez86 marked this pull request as ready for review October 3, 2022 19:49
@mdperez86 mdperez86 force-pushed the add/34657-add-new-shipping-class branch from b70c4d0 to 5b35ba6 Compare October 3, 2022 20:14
@mdperez86 mdperez86 changed the title Add new shippping class modal to a shipping class section in product page Add new shipping class modal to a shipping class section in product page Oct 3, 2022
@pmcpinto
Copy link

pmcpinto commented Oct 4, 2022

@mdperez86 overall, the flow looks good to me. I just have two comments:

  • It would be good to inform users that the shipping class will be global (available to any product)
  • When the user creates a shipping class: I feel that we should automatically add the product to this class rather than having the user open the dropdown again.
    @jarekmorawski what do you think?

@AnnaMag
Copy link
Contributor

AnnaMag commented Oct 10, 2022

It would be good to inform users that the shipping class will be global (available to any product)
When the user creates a shipping class: I feel that we should automatically add the product to this class rather than having the user open the dropdown again.

Let's keep the scope of the PR and open a new issue for the follow-up changes. cc @jarekmorawski

AnnaMag
AnnaMag previously approved these changes Oct 10, 2022
Copy link
Contributor

@AnnaMag AnnaMag left a comment

Choose a reason for hiding this comment

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

Tests well. In agreement with the initial AC.
Thanks!

Copy link
Contributor

@AnnaMag AnnaMag left a comment

Choose a reason for hiding this comment

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

LGTM

@mdperez86 mdperez86 merged commit e95bb37 into trunk Oct 11, 2022
@mdperez86 mdperez86 deleted the add/34657-add-new-shipping-class branch October 11, 2022 15:00
@github-actions github-actions bot added this to the 7.1.0 milestone Oct 11, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2022

Hi @mdperez86, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: @woocommerce/components issues related to @woocommerce/components package: @woocommerce/data issues related to @woocommerce/data plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Shipping] Shipping class dropdown add new option

4 participants