forked from woocommerce/woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating details fields to product-editor package (woocommerce#36945)
- Loading branch information
1 parent
79841c5
commit 2332c7c
Showing
34 changed files
with
148 additions
and
60 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/js/product-editor/changelog/update-36395-move-product-fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: add | ||
|
||
Adding DetailsNameField and associated hooks/components. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/js/product-editor/src/components/details-categories-field/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './details-categories-field'; | ||
export * from './category-field'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/js/product-editor/src/components/details-description-field/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './details-description-field'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/js/product-editor/src/components/details-feature-field/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './details-feature-field'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/js/product-editor/src/components/details-name-field/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './details-name-field'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/js/product-editor/src/components/details-summary-field/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './details-summary-field'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
export const NUMBERS_AND_ALLOWED_CHARS = '[^-0-9%s1%s2]'; | ||
export const NUMBERS_AND_DECIMAL_SEPARATOR = '[^-\\d\\%s]+'; | ||
export const ONLY_ONE_DECIMAL_SEPARATOR = '[%s](?=%s*[%s])'; | ||
|
||
// This should never be a real slug value of any existing shipping class | ||
export const ADD_NEW_SHIPPING_CLASS_OPTION_VALUE = | ||
'__ADD_NEW_SHIPPING_CLASS_OPTION__'; | ||
export const UNCATEGORIZED_CATEGORY_SLUG = 'uncategorized'; | ||
export const PRODUCT_VARIATION_TITLE_LIMIT = 32; | ||
export const STANDARD_RATE_TAX_CLASS_SLUG = 'standard'; | ||
|
||
// Fill constants | ||
|
||
export const TAB_GENERAL_ID = 'tab/general'; | ||
export const TAB_PRICING_ID = 'tab/pricing'; | ||
export const TAB_INVENTORY_ID = 'tab/inventory'; | ||
export const TAB_SHIPPING_ID = 'tab/shipping'; | ||
export const TAB_OPTIONS_ID = 'tab/options'; | ||
|
||
export const VARIANT_TAB_GENERAL_ID = `variant/${ TAB_GENERAL_ID }`; | ||
export const VARIANT_TAB_PRICING_ID = `variant/${ TAB_PRICING_ID }`; | ||
export const VARIANT_TAB_INVENTORY_ID = `variant/${ TAB_INVENTORY_ID }`; | ||
export const VARIANT_TAB_SHIPPING_ID = `variant/${ TAB_SHIPPING_ID }`; | ||
|
||
export const DETAILS_SECTION_ID = `${ TAB_GENERAL_ID }/details`; | ||
export const IMAGES_SECTION_ID = `${ TAB_GENERAL_ID }/images`; | ||
export const ATTRIBUTES_SECTION_ID = `${ TAB_GENERAL_ID }/attributes`; | ||
export const PRICING_SECTION_BASIC_ID = `${ TAB_PRICING_ID }/basic`; | ||
export const PRICING_SECTION_TAXES_ID = `${ TAB_PRICING_ID }/taxes`; | ||
export const PRICING_SECTION_TAXES_ADVANCED_ID = `${ TAB_PRICING_ID }/taxes/advanced`; | ||
export const INVENTORY_SECTION_ID = `${ TAB_INVENTORY_ID }/basic`; | ||
export const INVENTORY_SECTION_ADVANCED_ID = `${ TAB_INVENTORY_ID }/advanced`; | ||
export const SHIPPING_SECTION_BASIC_ID = `${ TAB_SHIPPING_ID }/basic`; | ||
export const SHIPPING_SECTION_DIMENSIONS_ID = `${ TAB_SHIPPING_ID }/dimensions`; | ||
|
||
export const VARIANT_PRICING_SECTION_BASIC_ID = `variant/${ PRICING_SECTION_BASIC_ID }`; | ||
export const VARIANT_PRICING_SECTION_TAXES_ID = `variant/${ PRICING_SECTION_TAXES_ID }`; | ||
export const VARIANT_PRICING_SECTION_TAXES_ADVANCED_ID = `variant/${ PRICING_SECTION_TAXES_ADVANCED_ID }`; | ||
export const VARIANT_INVENTORY_SECTION_ID = `variant/${ INVENTORY_SECTION_ID }`; | ||
export const VARIANT_INVENTORY_SECTION_ADVANCED_ID = `variant/${ INVENTORY_SECTION_ADVANCED_ID }`; | ||
export const VARIANT_SHIPPING_SECTION_BASIC_ID = `variant/${ SHIPPING_SECTION_BASIC_ID }`; | ||
export const VARIANT_SHIPPING_SECTION_DIMENSIONS_ID = `variant/${ SHIPPING_SECTION_DIMENSIONS_ID }`; | ||
|
||
export const PRODUCT_DETAILS_SLUG = 'product-details'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './components'; | ||
export { DETAILS_SECTION_ID, TAB_GENERAL_ID } from './constants'; | ||
|
||
/** | ||
* Utils | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
@import 'components/product-section-layout/style.scss'; | ||
@import 'components/edit-product-link-modal/style.scss'; | ||
@import 'components/details-categories-field/style.scss'; | ||
@import 'components/details-categories-field/create-category-modal.scss'; |
1 change: 0 additions & 1 deletion
1
plugins/woocommerce-admin/client/products/fields/category-field/index.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
plugins/woocommerce-admin/client/products/fills/details-section/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
export * from './details-field-name'; | ||
export * from './details-field-categories'; | ||
export * from './details-field-feature'; | ||
export * from './details-field-summary'; | ||
export * from './details-field-description'; | ||
export * from './details-section-fills'; |
4 changes: 4 additions & 0 deletions
4
plugins/woocommerce/changelog/update-36395-move-product-fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: update | ||
|
||
Moving some components out of core and into product-editor package. |
Oops, something went wrong.