Commit Graph

21 Commits

Author SHA1 Message Date
Joshua T Flowers 81e92392d5
Fix double scrollbars on product editor page (#38281)
* Refactor Layout component to functional component

* Add class to pages based on page path

* Add styling for interface skeleton on product pages

* Add changelog entries

* Move product page styles out of product editor package and into client

* Fix linting issues

* Check for location before checking path in page tracking

* Dont add body classes when no page path exists

* Record page view without router location for embed pages
2023-05-18 05:25:36 -03:00
louwie17 fc1745b03b
Add/36075 render fields sections from php config (#36414)
* Add initial component to auto load fills from API config

* Add changelog

* Update logic to make use of new store and re-usable components

* Add changelog

* Add loading state for product form data to add/edit product pages
2023-01-19 04:52:02 -04:00
Joshua T Flowers 1337a6d36e
Add product tour to new product management experience (#36428)
* Add product tour container and modal

* Fix modal open class name

* Add product tour

* Add changelog entry

* Move product tour state logic into hook

* Fix tour selectors for pricing and actions

* Add tests around product tour container

* Add tests around useProductTour hook

* Make tour responsive

* Use tabs instead of spaces

* Fix more scss lint errors

* Remove extra whitespace
2023-01-18 11:11:02 -08:00
Joshua T Flowers d46a1045e8
Add product variation form and routes (#36033)
* Add route for editing product variation

* Fix up ID selector for getItem in CRUD data store

* Add product variation form

* Add changelog entries
2022-12-16 11:20:10 -03:00
louwie17 d406eeb299
Fix react chunk build warnings (#35930)
* Reorganize imports to fix build warnings and remove overlapping css import

* Add changelog

* Update changelog
2022-12-12 09:43:34 -04:00
Nathan Silveira 31773d4b06
Create ProductForm component to merge duplicated UI (#35783)
* Extract new component 'ProductForm', to reduce duplicated code between add-product-page and edit-product-page

* Add changelog

* Try to merge add-product-page and edit-product-page into a single product-page: running into some issues probably with the controller

* Revert "Try to merge add-product-page and edit-product-page into a single product-page: running into some issues probably with the controller"

This reverts commit bc30b67ef2.
2022-12-05 17:46:21 -03:00
louwie17 0e8fbe083d
Add/35129 product mvp ces (#35652)
* Add product mvp ces footer

* Add changelog

* Reset action option name after CES action

* Make sure we make use of cesAction

* Add close button

* Fix formatting

* Fix css styling issues

* Add icon to success notice

* Add product mvp CES hook and modify logic a little bit

* Update the CES product action name

* Address PR feedback and fix styling for smaller screens

* Add second question to CES product footer and update options

* Add changelog

* Fix lint error

* Fix tests
2022-12-02 05:35:47 -04:00
Joshua T Flowers 233e23704f
Add product settings menu to new product management experience (#35592)
* Add icons

* Add classic editor url

* Remove welcome guide link and icon

* Add initial settings menu

* Fix up button styling

* Move product settings to its own folder

* Remove unnecessary registerPlugin call

* Use number type control for menu order field

* Add tests around product settings component

* Allow reviews by default on all new products

* Alphabetize product properties

* Add changelog entry

* Add data changelog entry

* Convert indentation to tabs

* Fix up scss linting errors

* Remove whitespace
2022-11-17 09:59:51 -08:00
Joshua T Flowers 23ca8d6297
Add product title to header when available (#35431)
* Move shared product header components to separate file

* Fill header title with product name

* Create method to get product title

* Add tests around title

* Add changelog entry

* Remove unnecessary plugin registration
2022-11-15 11:19:58 -08:00
Joshua T Flowers 28f8e7f996
Enhance getInputProps to allow passing of non-overridden props (#35034)
* Allow additional props to be passed to the Form getInputProps method

* Remove getTextControlProps

* Pass additional shared props through getInputProps in shipping

* Simplify checkbox props

* Unwrap currency props

* Use onBlur event to sanitize prices

* Add changelog entry

* Add option to get checkbox props to form context helpers

* Update checkbox tracks handler naming and typing

* Fix up usage of getInputProps

* Add helper sanitize method

* Use sanitize helper method for product input fields

* Fix inventory input props after rebase

* Fix shipping typo

* Fix up form types after rebase

* Align all checkboxes on product page

* Rename new checkbox helper to getCheckboxControlProps

* Add helper method to get select control props

* Add data changelog entry

* Check for product name length on blur

* Add initial value for name to prevent uncontrolled value

* Add initial value for sku
2022-10-21 07:03:49 -07:00
Joshua T Flowers 3a2a22905b
Add manual stock management section to product management experience (#35047)
* Add manual stock management section to product management experience

* Add changelog entry

* Add default value for stock status

* Fix up lint issues

* Handle PR feedback
2022-10-20 14:14:54 -07:00
Joshua T Flowers 8fbdbaf354
Add product page inventory quantity management (#34984)
* Add manage stock section to product inventory section

* Fix up h4 styles in form sections

* Check if stock management is enabled in store settings

* Fix up more styles in form

* Extract inventory validation and add new validation rules

* Add changelog entry

* Add changelog entry

* Remove sku related validation
2022-10-12 14:30:02 -07:00
Joshua T Flowers 0ca3f6d589
Add product management SKU (#34978)
* Add product inventory section and sku control

* Add validation and errors

* Add changelog entry

* Add dependencies comment block

* Call input props onBlur for product name field

* Remove slug validation

* Watch product name value change in inventory section

* Fix up usePrevious hook TS

* Revert watching changes by previous touched status
2022-10-12 13:11:05 -07:00
Fernando Marichal 98162b9d42
Images Product management MVP 1.0 (#34769)
* Add image section

# Conflicts:
#	plugins/woocommerce-admin/client/products/add-product-page.tsx

* Add `keepSpaceWhenDragging` to sortable

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/sortable/sortable.tsx

* Export ImageGalleryItem

* Add props to `image-gallery`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery-item.tsx
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Changed `media-uploader` label

* Add changelogs

* Fix image-gallery and sortable components

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx
#	packages/js/components/src/sortable/sortable.tsx

* Set gallery min-height

* Add onOrderChange

* Show images section edit-product

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

* Fix styles

* Fix styles

* Fix image alt

* Fix TS any

* Add prop `onDragOver`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Fix styles

* Fix padding

* Fix image area min-height

* Fix subtitle copy

* Fix image margin

* Change `draggedImageId`

* Fix `setDraggedImageId` reset

* Rename `isRemoveZoneVisible`

* Add `CardBody` and remove redundant `setValue`

* Fix card styles

* Remove `getUniqueImages`

* Use url as a key when there is no image id

* Fix `orderedImages`

* Add hover to gallery images

* Fix gallery arrows and set cover problems

* Altering blur handler to prevent toolbar closure on media modal

* Fix toolbar drag and drop

* Add replace fn

* Restoring modal class for blur function

* Fix storybook

* Ensuring onBlur doesn't happen while dragging, resolving issue in Firefox

* Adding expected event object to drag callbacks

* Fix image size

* Fix lint

* Another fix lint

* Update plugins/woocommerce-admin/client/products/sections/images-section.tsx

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Fix `draggedImageId` default value

* Fix toolbar icon style

* Rename consts

* Update pnpm-lock.yaml

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joel <dygerati@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-10-12 15:16:22 -03:00
louwie17 c01c48c8c3
Add initial attributes section for empty state (#34751)
* Add new attributes section and attributes field with just an empty state

* ADd changelogs

* Add check to not render the blank section when attributes exist

* Fix misspelling
2022-09-26 14:44:06 -03:00
Maikel David Pérez Gómez 2eda531d46
Add shipping class section and dropdown (#34684)
* Add shipping class section and dropdown

* Add comment suggestions

* Add a Spinner during shipping classes resolution
2022-09-23 09:54:52 -03:00
Fernando 33405283cd
Add Pricing section (#34382)
* Add pricing inputs

# Conflicts:
#	plugins/woocommerce-admin/client/products/add-product-page.tsx
#	plugins/woocommerce-admin/client/products/layout/product-section-layout.scss
#	plugins/woocommerce-admin/client/products/sections/product-details-section.tsx

* Add pricing inputs

* Add validation

* Fix scss

* Moved validations

* Add tests

* Add regex validations

* Add tax settings

* Fix comment

* Add product name validation

* Fix validation copy

* Rename `woocommerce-add` classes

* Fix texts i18n

* Remove image section

* Fix decimal separator error

* Add `FormSection` component

* Fix `Enriched-label` component

* Add packages changelog

* Removed not used styles

* Add error handling

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-30 10:26:24 -03:00
louwie17 78c28ae9f3
Add product link field (#34313)
* Add initial product field and modal for editing product link

* Create a product link modal for editing product link

* Only show permalink when product is published

* Add changelogs

* Add changelog for data package

* Change save button to primary

* Fix merge conflcts

* Add getPermalinkParts selector to products store

* Made use of getPermalinkParts to support draft products
2022-08-19 12:05:13 -03:00
louwie17 a498cc8280
Add product form buttons and specific product edit page (#34211)
* Add initial product form action buttons to form

* Add new edit page and allow for updating and creating products

* Move crud functions to helper hook to keep things seperated better

* Add changelog

* ADd package changelogs

* Add isPending selector to products store

* Fix trash screen showing up when deleting product and add loading indicators

* Add extra types to Product type

* Update track names and add product data to tracks

* Update track logic when product is published

* Remove the Image section for now, to prevent confusion as it is not ready yet

* Add tests for the product form actions

* Update copy for publish & duplicate

* Remove unused code

* Set window.location correctly with href

* Reset changes in pnpm lock

* Moved pending action variables to product helper and updated buttons to reflect new suggestions

* Fix backwards compabitibility issue with Form changes

* Add switch to draft button
2022-08-11 11:04:14 -03:00
louwie17 470fc899e1
Add/33 two column product page layout (#34113)
* Add product page layout components

* Add a quick sample page to test the product form layout

* Add changelog

* Add option 2

* Refactor the product field layout structure

* Update page component structure of product form

* Add simple SlotFill support

* Update product page chunk name

* Add order to slot fill and move product field layout wrapper into product category layout

* Remove unused import

* Consolidate the slot fill ordering logic

* Rename category component to section component to prevent confusion

* Remove edit product page and use the new add product page instead

* Add tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-04 10:15:30 -03:00
Fernando 835f3d548e
Add/42 new product page (#34115)
* Add feature falg

* Modify href to menu item

* Modify page title href button

* Add product files on Client

* Change button's URL for new Nav

* Add changelog

* Moved changelog

* Fix URL for new nav

* Change URL for add product task

* Add Tracks event

* Change const name

* Renamed tracks event name

* Undo Add New Product redirect

* Undo use Products addition

* Undo lint fix to woocommerce_admin.js

* Rename component and file (AddProductPage)

* Set flag in core.json to false

* Fix typo

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-03 14:42:22 -03:00