Commit Graph

21 Commits

Author SHA1 Message Date
Chi-Hsuan Huang 7068c78101
Fix JS lint errors (#33484)
* Fix @woocommerce/data lint errors

* Fix internal-e2e-builds lint error

* Fix lint errors
2022-06-21 16:37:34 +08:00
RJChow 1ba60ee69d Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
Paul Sealock 3c6483e842 Remove wc api 🎉 (https://github.com/woocommerce/woocommerce-admin/pull/5075)
* remove wc-api selects and constansts

* remove extendedItems dependence on wc-api

* remove wc-api

* PR feedback
2020-09-04 09:45:40 +12:00
Fernando 29e2dbffc9 Migrated "import" store to "wp.data" (https://github.com/woocommerce/woocommerce-admin/pull/4982)
* Migrated the "import" store to "wp.data"

This commit migrates the "import" store to "wp.data"

# Conflicts:
#	client/analytics/settings/historical-data/layout.js
#	packages/data/src/index.js

# Conflicts:
#	packages/data/src/index.js

# Conflicts:
#	packages/data/src/index.js

* Added error handling

This commit adds error handling to the apiFetch

* Fixred reducer.js

* Added reducer.js tests

* Removed "endpoint" references

* Tests fixed

* Removed old import store files and wc-api-spec import references

This commit removes old import store files and "wc-api-spec" import references

# Conflicts:
#	client/wc-api/wc-api-spec.js

# Conflicts:
#	client/wc-api/wc-api-spec.js

* Added interval to invalidate resolution of getImportStatus

* Fixed timestamp

* Store dependency removed

* Fixed reimport functionality

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Refactored layout.js

* Refactored clearCache method

* inProgress check refactored

* Using activeImport from store

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Fixed console warning

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Migration done!

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Fixed hasImportFinished

* Test fixed

* Removed "setImportFinished" from actions.js and index.js

* Added style to disabled button

* Fixed incorrect "Finalizing"  status

* Fixed tests

* Fixed notes update on importation start

* Removed local constants

* Removed css for disabled button

* Typo corrected

* Fixed param for getImportError method

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-01 10:21:31 -03:00
Daniel Bitzer d8098d6fd7 Adds `@woocommerce/tracks` package (https://github.com/woocommerce/woocommerce-admin/pull/5017)
* Add @woocommerce/tracks package.json

* Add @woocommerce/tracks .npmrc

* Move lib/tracks.js in to tracks package

* Add tracks package debug dependency

* Add readme for tracks package

* Add changelog for tracks package

* Add info about debugging and opt-ins to tracks package readme

* Load tracks package script

* Add tracks package to packages readme

* Add tracks package to webpack config

* Add tracks package external to starter-pack

* Replace lib/tracks uses with @woocommerce/tracks

* Update package-lock.json
2020-08-20 14:29:52 +09:30
Joshua T Flowers 483055dd75 Migrate notes data store to wp data (https://github.com/woocommerce/woocommerce-admin/pull/4943)
* Add initial notes data store using wp data

* Cache individual note queries

* Update notes undo endpoint to batch update endpoint

* Allow batch updates of notes

* Add requesting state

* Update components to use new note store

* Remove old notes store from wc-api

* Get note IDs from json and validate data in REST API

* Add an updating state to each note

* Throw errors in actions so they can be caught by client

* Add store reducer tests

* Handle PR feedback

* Fix failing tests

* Don't set inbox panel visibility while batch updating

* Move woocommerce block to external dependencies
2020-08-13 16:23:38 +03:00
Paul Sealock c145783e0a Fix dependency declarations (https://github.com/woocommerce/woocommerce-admin/pull/4972)
* renmove WC comment block

* client routes

* more fixes

* moar search

* getting there

* by hand now

* david beating goliath

* mission accomplished

* client filepath

* save

* got it

* remove script

* fixes

* deal with package internal dep

* remove webpack alias

* fix webpack relative paths

* remove commented rule

* remove extra line

* remove unused modules entry
2020-08-13 14:05:22 +12:00
Darren Ethier 33c5b41e3f Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674)
* align code styles with the same configuration as Woo-Blocks

* initial pass of reformat-files

* applies manual fixes to various new linting errors surfaced by the configuration change.

* Fix state mutation in image-upload

* remove unused pre-commit-hook.js

* requestAnimationFrame -> window.requestAnimationFrame

* wc-api eslint changes

* eslint fixes on client/lib and client/settings

* client/header eslint changes

* fixes for client/dashboard part 1

* fixes client/dashboard part 2 of 2

* client/analytics part 1

* client/analytics continued

* client/analytics, last batch

* rename __mock__ directory

* pass in useEffect, useState from React component or function

* remove '+' from sprintf string argument

* use ref instead of findDOMNode

* reformat and repaply package.json changes

* install deps before running linter in Travis

* useGetCountryStateAutofill

* counryStateAutofill

* countryStateAutofill

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-02-14 15:23:21 +13:00
Joshua T Flowers 90112354b1 Update historical data notice to actioned on import (https://github.com/woocommerce/woocommerce-admin/pull/3539)
* Add hook for regenerating data init

* Set note to actioned on data import

* Update note status on client-side import start
2020-01-09 10:11:39 +08:00
Ron Rennick f78c143f3b Move in-house rest endpoints to private namespace (https://github.com/woocommerce/woocommerce-admin/pull/3204)
* move in-house rest endpoints to private namespace

* PHPCS sniff fixes
2019-11-12 14:15:55 -04:00
Paul Sealock d98eceffc7 Revert "Revert "Update to new Snackbar component and notice store"" (https://github.com/woocommerce/woocommerce-admin/pull/2643)
* Revert "Revert "Update to new Snackbar component and notice store""

* Update uploader component to use createNotice

* Bump required WP version to 5.2

* Update required PHP and WP versions in plugin header
2019-07-23 11:26:46 +08:00
Jeff Stieler 69245c848b Merge pull request woocommerce/woocommerce-admin#2638 from woocommerce/add/2605-tracks-priority-3
Add priority 3 Tracks events
2019-07-16 09:10:11 -06:00
Albert Juhé Lluveras f392b5588d Replace 'stringifyQuery' with 'addQueryArgs' (https://github.com/woocommerce/woocommerce-admin/pull/2655) 2019-07-16 10:56:24 +02:00
Jeff Stieler 562a1a231d Send tracks event when historical data is deleted. 2019-07-12 11:46:38 -06:00
Timmy Crawford f4735658d7 Revert "Update to new Snackbar component and notice store (https://github.com/woocommerce/woocommerce-admin/pull/2596)"
This reverts commit 980ff6fa71.
2019-07-10 09:58:51 -07:00
Joshua T Flowers 980ff6fa71 Update to new Snackbar component and notice store (https://github.com/woocommerce/woocommerce-admin/pull/2596)
* Add new wordpress/components version and fix dependencies

* Add in snackbar styling and gutenberg variables

* Convert all existing notice actions to wordpress/notices

* Fix linting errors

* Add package.lock changes

* Update search list control snapshots with new attributes
2019-07-08 12:10:34 +08:00
Albert Juhé Lluveras 5d01cee56c Add progress bars to Historical Data Import screen (https://github.com/woocommerce/woocommerce-admin/pull/2312)
* Hook up import/status endpoint to Historical Data Import screen

* Fix PHP tests

* Add speak message when the import is complete

* Several fixes

* Cleanup

* Update progress bars every 3 seconds and bugfixes

* Rename ongoingImport to activeImport

* Use timestamp to identify queries

* Use timestamps for historical data state

* Add 'initializing' status

* Cleanup

* Pass less props around

* Refactor getStatus

* Set stop timestamp on request error

* Typo
2019-06-11 14:47:53 +02:00
Albert Juhé Lluveras a382fd6143 Hook up import/totals endpoint to Historical Data Import screen (https://github.com/woocommerce/woocommerce-admin/pull/2208)
* Hook up import/totals endpoint to Historical Data Import screen

* Remove getImportTotalsError and isGetImportTotalsRequesting selectors which were not used

* Remove duplicate style import

* Fix RTL displays
2019-05-20 22:50:25 +02:00
Albert Juhé Lluveras 54a09ab232 Replace Rebuild reports settings with Import Historical Data (https://github.com/woocommerce/woocommerce-admin/pull/2198)
* Hide progress bars and status from Import Historical Data screen

* Remove Rebuild Reports Sections from Settings

* Add Delete Imported Data button to the default actions

* Unify @todo comments
2019-05-10 11:34:03 +02:00
Albert Juhé Lluveras 77ff3ea5cf Hook up API Historical Data screen to API endpoints (https://github.com/woocommerce/woocommerce-admin/pull/2177)
* Hook up API Historical Data screen to API endpoints

* Avoid making an unnecessary Math.abs()
2019-05-09 11:11:58 +02:00
Albert Juhé Lluveras 46d3be23dd Add Historical Data Import Screen (https://github.com/woocommerce/woocommerce-admin/pull/2073)
* Add Historical Data Import Screen

* Fix date picker not being accessible

* Cleanup

* Fix period selector typo

Co-Authored-By: Aljullu <aljullu@gmail.com>

* Move state to props

* Add filter to status labels

* Get rid of 'step' state property

* Format 'importDate' as YYYY-MM-DD

* Minor improvements

* Hardcode control height

* Use dateValidationMessages when possible

* Update imported all data actions

* Update filter name
2019-05-07 09:18:48 +02:00