Commit Graph

88 Commits

Author SHA1 Message Date
Leif Singer 8ee74ede0e
Update Woo.com references to WooCommerce.com (#46259)
* replace capitalized Woo.com with WooCommerce.com

* replace http URLs

* replace https URLs

* replace developer.woo.com

* add missing version in `@since` tag

* unslash the HTTP_REFERER

* WordPress.Security.ValidatedSanitizedInput.InputNotSanitized

* add changelog file

* add more changelog files

* address linter errors

* address more linter errors

* fix test

* more linter errors
2024-04-09 09:50:15 +01:00
And Finally 2789f39bc7
Update example plugin in Activity Notes docs to correct further issues (#45158)
* Improves documentation of example plugins for WooCommerce Admin Notes.

- Adds namespacing for `Automattic\WooCommerce\Admin\Notes\Notes`.
- Uses namespacing in `class_exists` checks.
- Deletes duplicate code.

* Changelog.
2024-03-04 10:03:34 +00:00
And Finally 0a3c285b08
Update example plugin for Activity Notes to include namespacing (#44504)
* Updates example plugin for Activity Notes to include namespacing of `Automattic\WooCommerce\Admin\Notes\Note` and `Automattic\WooCommerce\Admin\Notes\Notes`. Without this, the example doesn't work in `wp-content/plugins`.

* Added changelog.
2024-02-22 14:16:03 +00:00
Chi-Hsuan Huang 6832a4b249
Update onboarding task documentation & add back `example` command (#44026) 2024-01-30 12:05:46 +08:00
Christopher Allford 6d685e5185 Renamed `woocommerce/client/admin` Package
NPM package names _must_ either be single-word or have
a scope. The current structure is unsupported and has been
changed. The new package name is `@woocommerce/admin-library`.
2023-12-09 12:59:24 -08:00
Christopher Allford 8c6b414fe0
Revert "Refactoring Task Infrastructure" (#41928)
Revert "Refactored Task Infrastructure (#41202)"

This reverts commit 96a973b9fa.
2023-12-06 11:36:12 -08:00
Christopher Allford 96a973b9fa
Refactored Task Infrastructure (#41202)
* Fixed NPM packages with invalid names.
* Renamed plugin packages.
* Standardized package NPM scripts.
* Replaced Turborepo with Wireit.
2023-12-06 09:32:32 -08:00
Leif Singer 5944fdcdff replace developer.woocommerce.com with developer.woo.com 2023-11-10 16:09:27 +01:00
Leif Singer 9edad5270d appease the linter 2023-11-10 15:49:08 +01:00
Leif Singer 808a0fc54f update references to woocommerce.com to now reference woo.com 2023-11-10 15:49:08 +01:00
Chi-Hsuan Huang b8aa7eb1fe
Update task list documentation and example (#38245)
* Update woocommerce task list examples

* Update onboarding-tasks.md

* Add changelog

* Update changelog

* Update task list doc

* Update onboarding-tasks.md

* Update examples readme

* Fix lint

* Update onboarding-tasks.md

* Fix build wca example cmd

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update plugins/woocommerce-admin/docs/features/onboarding-tasks.md

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update task list image

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-05-18 11:21:53 +08:00
Jeffrey Paul df0583f9b8
Fix/37502: Correct spelling errors. (#37887)
* change reference of Catpure to Capture

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference of expicitly to explicitly

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference 'cutted' to 'cut'

* change reference 'determening' to 'determining'

* change reference 'retreive' to 'retrieve'

* change reference 'neccessary' to 'necessary'

* change reference 'Fitler' to 'Filter'

* change reference of "seperate" to "separate"

Co-Authored-By: Ankit K Gupta <ankit.himcs@gmail.com>

* change reference of "wether" to "whether"

Co-Authored-By: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>

* change reference of "staus" to "status"

* change reference of "retrive" to "retrieve"

* change references of "gatways" to "gateways"

* change references of "existant" to "existent"

* change reference of "requries" to "requires"

* change reference of "configuation" to "configuration"

* change reference of "processsing" to "processing"

* change reference of "represenation" to "representation"

* change reference of "dimentions" to "dimensions"

* change references of "reigster" to "register"

* change reference of "colum" to "column"

* change reference of "transtions" to "transitions"

* change references of "intially" to "initially"

* change references of "orignal" to "original"

* change references of "deprected" to "deprecated"

* change references of "paramter" to "parameter"

* change reference of "intance" to "instance"

* change reference of "elemets" to "elements"

* change references of "funcitons" to "functions"

* change reference of "specificed" to "specified"

* change references of "atributes" to "attributes"

* change reference of "tast" to "task"

* change reference of "chaning" to "changing"

* change reference of "retreiving" to "retrieving"

* change reference of "caluclation" to "calculation"

* change references of "Invaid" to "Invalid"

* change references of "paramaters" to "parameters"

* change reference of "Additonal" to "Additional"

* change reference of "teh" to "the"

* change reference of "evalutes" to "evaluates"

* change reference of "addedd" to "added"

* change reference of "excempt" to "exempt"

* change reference of "sequencially" to "sequentially"

* change reference of "previos" to "previous"

* change reference of "elegible" to "eligible"

* change references of "Boostrap" to "Bootstrap"

* change references of "compability" to "compatibility"

* change reference of "heirarchy" to "hierarchy"

* change references of "visibilty" to "visibility"

* change reference of "comparsion" to "comparison"

* change reference of "capabilties" to "capabilities"

* change reference of "datatores" to "datastores"

* change reference of "occured" to "occurred"

* change reference of "coresponding" to "corresponding"

* change references of "thier" to "their"

* change reference of "sucessfully" to "successfully"

* change reference of "insde" to "inside"

* change reference of "nagivation" to "navigation"

* change references of "visiblity" to "visibility"

* change reference of "documentaiton" to "documentation"

* change reference of "anayltics" to "analytics"

* change reference of "intalling" to "installing"

* change reference of "mininum" to "minimum"

* change references of "intial" to "initial"

* change reference of "Feld" to "Field"

* change reference of "taks" to "task"

* change reference of "trasnfer" to "transfer"

* change reference of "respone" to "response"

* change reference of "Extenstions" to "Extensions"

* change reference of "detault" to "default"

* change reference of "simultanious" to "simultaneous"

* change reference of "overides" to "overrides"

* change references of "Indvidual" to "Individual"

* change reference of "refering" to "referring"

* change reference of "aginst" to "against"

* change reference of "execuatable" to "executable"

* change reference of "repsonse" to "response"

* change reference of "documention" to "documentation"

* change reference of "asumed" to "assumed"

* change reference of "Minium" to "Minimum"

* change reference of "unqiue" to "unique"

* change references of "existance" to "existence"

* change reference of "compatability" to "compatibility"

* change reference of "Taxnomy" to "Taxonomy"

* change reference of "quering" to "querying"

* change reference of "retrun" to "return"

* change reference of "informations" to "information"

Co-Authored-By: Viktor Szépe <viktor@szepe.net>

* Add changelog

* Add changelog

* Fix typo

---------

Co-authored-by: Vikram  <93216400+vikrampm1@users.noreply.github.com>
Co-authored-by: Ankit K Gupta <ankit.himcs@gmail.com>
Co-authored-by: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-05-08 15:55:09 +08:00
Christopher Allford c0b76f70cc
Rename @woocommerce/admin-library (#33460)
This commit changes it to woocommerce/client/admin. This is an invalid NPM package name and an invalid Composer package name. This will prevent conflicts but also identify it as a component of Core.
2022-06-17 13:28:34 -07:00
Christopher Allford b7931409f2
Migrate From Nx to Turborepo (#33079)
This replaces all `nx` commands with `turbo` commands and removes Nx from the repository. All of the `project.json` files have been removed and any commands that broke with Turborepo have been adjusted.
2022-06-09 14:40:07 -07:00
Chi-Hsuan Huang 20736a5280 Remove docsify-cli and releated files 2022-04-14 13:50:29 +08:00
Chi-Hsuan Huang dfa51ac747 Update docs 2022-04-14 13:50:27 +08:00
Chi-Hsuan Huang ed8885f0b7 Fix admin extensions webpack config 2022-04-14 13:49:51 +08:00
Joshua T Flowers 611903ef5d Separate onboarding concerns into separate classes (https://github.com/woocommerce/woocommerce-admin/pull/8280)
* Separate onboarding concerns into separate classes

* Fix up onboarding product types

* Fix up references to profile data option

* Fix up call to allowed themes

* Move onboarding features to internal namespace

* Remove old onboarding redirect

* Fix failing tests

* Add changelog entry

* Move inernal classes to the new src-internal folder

* Fix lint error

* Add deprecated class for Onboarding

* Add empty construct method

* Remove some of the unnecessary static functions and make sure OnboardingTasks still gets initialized

* Fix missed changes during rebase

* Fix tests

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-03-17 17:10:43 -03:00
louwie17 c65d43a35e Cleanup Loader.php and move it to Internal namespace (https://github.com/woocommerce/woocommerce-admin/pull/8416)
* Seperated Asset, page, and translation logic into seperate classes out of Loader.php

* Move user, and assets logic out of Loader.php

* Move Loader to Internal and move page helper functions to PageController

* Fix unit tests

* Add changelog
2022-03-09 10:04:34 -04:00
Chi-Hsuan Huang 86fc8b62e5 Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349)
* Add pnpm-workspace.yaml

* Add missing dependencies & replace file: with workspace:* in
package.json

* Replace "npm" with "pnpm"

* Replace "npx" with "pnpx"

* Remove package-lock.json

* Add pnpm setup action to github workflows

* Update webpack babel exclude path

* Upgrade woo e2e and fix e2e test command

Update e2e.yml

Use pnpm run e2e:docker-up in e2e.yml

* Remove unused docker-compose.yaml

* Replace lerna with pnpm commands

Update publish commands

* Exclude _locutus_shared_bc.js in babel.config.js

* Add .npmrc to set enable-pre-post-scripts=true by default

* Fix storybook babel config

Update babel.config.js

* Add changelog

* Update pnpm-lock.yaml

* Replace pnpx with pnpm exec

* Update pnpm-lock.yaml

* Remove js-tests/package-lock.json

* Fix @woocommerce/tracks -> workspace:*

* Update pnpm-lock.yaml

* Add @woocommerce/experimental to onboarding/package.json

* Add "@woocommerce/component" to onboarding/package.json

* Update pnpm-lock.yaml

* Use || instead of && for "test:watch"

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>

* Fix packages/number "clean" command

* Add root: true to .eslintrc.js to enforce it to use the root config file

* Exclude packages/**/node_modules from babel transpiling

* Fix js-tests build config

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
2022-03-04 12:01:16 +08:00
louwie17 3998f88597 Remove unpublished wc-admin-settings package and update getSetting usage (https://github.com/woocommerce/woocommerce-admin/pull/8057)
* Remove use of wc-admin-settings from packages

* Move getSetting to getAdminSetting and remove wc-admin-settings package

* Add changelog

* Update package.json and remove last use of wc-admin-settings
2022-01-06 08:53:30 -04:00
Ilyas Foo fd396d018d Add Inbox Note example code to docs (https://github.com/woocommerce/woocommerce-admin/pull/8019)
* Add Inbox Note example extension

* Typo

* Put into class

* Fix premature class import, moved note check logic to its own method
2021-12-10 12:52:03 +08:00
Joshua T Flowers 5f8db47c16 Add payment gateway suggestion docs and example extensions (https://github.com/woocommerce/woocommerce-admin/pull/7966)
* Remove dated doc references

* Clean up slotfill and install script docs

* Add filter to suggestion specs

* Register example gateways

* Mock gateway installation and activation

* Add simple gateway

* Update gateway IDs

* Add slot filled gateway

* Add slot fill for slot filled gateway

* Allow gateway to be enabled and marked as configured if already enabled

* Add changelog entry

* Add quick start blurb to markdown file

* Remove duplicate JS registration and add default export

* Add payment settings save hook
2021-12-03 15:13:05 -05:00
Joshua T Flowers 91473959c8 Update add task extension example (https://github.com/woocommerce/woocommerce-admin/pull/7809)
* Update task extension example

* Fix up namespaced classes

* Register task on init hook for REST usage
2021-10-27 15:03:27 -04:00
Joel Thiessen 3ee60dc833 Fixing an unwanted page refresh when using Woo Navigation (https://github.com/woocommerce/woocommerce-admin/pull/7615)
* Adding changelog

* Fixing page refresh on woo navigation

* Narrowing scope of navigation slot fills
2021-09-15 09:42:54 -07:00
Joshua T Flowers 8f836c292f Create task list APIs (https://github.com/woocommerce/woocommerce-admin/pull/7577)
* Add endpoint to hide task lists

* Migrate old setup task list hidden option

* Use option to store all hidden lists

* Add getter for deprecated options

* Migrate old task list options

* Move task lists into separate class

* Add TaskList class for individual task list control

* Update hidden checks to use TaskList api

* Update docs for hidden lists

* Update use of should_show_tasks to check for visible task lists

* Remove hide endpoint to reduce scope on PR

* Fix up failing tests

* Fix up rebase

* Add back in should_show_tasks with deprecation notice

* Add delay between payment tests
2021-09-02 17:40:02 -04:00
Fernando 089c5b5905 Add a delete option to completed tasks (https://github.com/woocommerce/woocommerce-admin/pull/7300)
* Added onDelete prop to `task-item`.

* Added `onDelete` and `Remid me later` options to task example in docs.

* Added changelog

* Fixed lint error

* Fixed another lint error

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-07-06 15:35:40 -03:00
Fernando 602056952f Add `slotFill` to Abbreviated Notification panel (https://github.com/woocommerce/woocommerce-admin/pull/7091)
* Add `slotfill` to Abbreviated Notification panel

This commit adds `slotfill` approach to Abbreviated Notification panel

# Conflicts:
#	client/header/activity-panel/index.js
#	client/header/activity-panel/panels/inbox/inbox-panel.js

* Renamed `AbbreviatedNotification` slot

# Conflicts:
#	client/header/activity-panel/panels/inbox/inbox-panel.js

* Renamed `hasExtraFills`

# Conflicts:
#	client/header/activity-panel/index.js
#	client/header/activity-panel/panels/inbox/inbox-panel.js

* Added changelog

* Fixed hasExtendedNotifications check

* Fixed changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-06-11 10:37:21 -03:00
Ilyas Foo bd51529aea Revert Card component removal (https://github.com/woocommerce/woocommerce-admin/pull/7167)
* Revert "Remove the deprecated Card component (https://github.com/woocommerce/woocommerce-admin/pull/7114)"

This reverts commit c07a5d77a6.

* Update changelog
2021-06-11 14:26:02 +08:00
Fernando 8ced81d369 Show task and activity notifications in the Inbox panel (https://github.com/woocommerce/woocommerce-admin/pull/7017)
* Added abbreviated panels

This commit adds abbreviated panels

* Added notifications getter

* Variables renamed

* Added unread-indicators refactor

* Open panel by default

* Refactor unread-indicators

* Renamed a few files and added event recording

* Modified "critical alert" presentation

* Removed useless control

* Renamed const

* Added control to InboxPanel component

* Multiple critical alerts handling

* Fixed styles

* Moved Inbox panel styles

# Conflicts:
#	packages/experimental/src/inbox-note/style.scss

* Added tests

* Inbox panel width reduced

* Small refactor for unread notifications

* Renamed abbreviated card component

* Added changelog

# Conflicts:
#	readme.txt

# Conflicts:
#	readme.txt

* Renamed inbox-panel and the cards config file

* Renamed unread notifications variable

* Fixed abbreviated card box-shadow

* Small refactor to unread-indicators file

* Refactored method getInitialState

* Added scroll to task list

# Conflicts:
#	client/task-list/task-list.js

* Small CSS changes to titles

* Fixed changelog

# Conflicts:
#	readme.txt

# Conflicts:
#	readme.txt

* Added param to filter `woocommerce_admin_onboarding_task_list`

* Removed extensibility from `getAbbreviatedNotifications`

* Fixed chunk name

* Removed `critical` prop from `AbbreviatedCard` comopnent

* Moved AbbreviatedCard component to `packages`

This commit moves the component `AbbreviatedCard` to `packages`

# Conflicts:
#	docs/components/_sidebar.md
#	packages/components/CHANGELOG.md
#	packages/components/src/index.js

# Conflicts:
#	packages/components/CHANGELOG.md

* Removed `critical alerts` tag from abbreviated card

This commit removes the tag `critical alerts` from the `Things to do next` abbreviated card

* Removed filter `woocommerce_admin_abbreviated_card_list`

* Fixed icon

* Added defaut value to `hasUnreadNotifications`

* Fix mapSelect error when the dismissed tasks option isn't populated.

* Added AbbreviatedNotificationsPanel

* Added tests

* Renamed `getUnreadNotes` to `isNotesPanelVisible`

* Removed abbreviated-card.js

* Added singular/plural copy handling

* Renamed method `getInitialState` to `getInitialOpenState`

* Fixed Link prop

* Revert "Fixed Link prop"

This reverts commit 74e6a7fae030766eb5d6be098caa15478f2cb2c6.

* Fixed Link prop

* Added task list visibility check

* Fixed scroll after redirect

# Conflicts:
#	client/task-list/index.js

* Added propType to `AbbreviatedCard`

* Fixed `Add-task doc example

* Removed default values from ActivityPanel

* Fixed multiple calls to a filter

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2021-06-09 10:56:45 -03:00
Sam Seay c07a5d77a6 Remove the deprecated Card component (https://github.com/woocommerce/woocommerce-admin/pull/7114) 2021-06-04 07:43:56 +12:00
louwie17 b642576e34 Remove the use of Dashicons and replace with `@wordpress/icons` or `gridicons` (https://github.com/woocommerce/woocommerce-admin/pull/7020)
* Updated mobile banner icon with cross-small gridicon

* Update analytics dashboard icons, removing use of dashicon

* Remove use of dash icon in tag component

* Remove dash icon from ellipsis menu

* Remove use of dashicon in calendar

* Update icon imports and remove use of Dashicon in collapsible list

* Remove Dashicon usage from store alerts as it is depreciated

* Remove dashicon usage in shipping label

* Fix up old css for icons

* Removed dashicon usage in favorite button

* Update the wordpress/icons package

* Add changelogs

* Fix broken test
2021-05-25 12:14:14 -03:00
Lee Willis d99fe58925 Remove hardcoded dependencies from examples. (https://github.com/woocommerce/woocommerce-admin/pull/6542)
Authored-by: Lee Willis <lee@ademti-software.co.uk>
2021-03-24 11:10:32 +13:00
Lee Willis 7ffe4a0f85 Remove redundant code (https://github.com/woocommerce/woocommerce-admin/pull/6523)
Co-authored-by: Lee Willis <lee@ademti-software.co.uk>
2021-03-08 17:15:46 +13:00
Joshua T Flowers d4d0eb8870 Add settings client pages and plumbing (https://github.com/woocommerce/woocommerce-admin/pull/6092)
* Move wc-admin-settings folder

* Add the settings container

* Add settings client
2021-02-12 14:32:42 -05:00
John Coy 58a2cd036e Fix typo in README (https://github.com/woocommerce/woocommerce-admin/pull/6183)
Corrected WordPress spelling.
2021-02-02 08:25:14 +08:00
Fernando 2ab28c977f Extended task list refactor (https://github.com/woocommerce/woocommerce-admin/pull/6081)
* Fixed hiding core task list

This commit fixes the hiding of the core task list

* Added tests

* Added fix to readme.txt

* Fixed readme.txt

* Added new test

* Hooks were fixed

* Refactored task lists handling

This commit refactors a few things related to the task lists handling

* Added tests

* Fixed task lists handling

* Fixed tests

* Renamed 'taskListHidden' to 'taskListsHidden'

* Added taskListsHidden util

* Fix completed tasks tracking infinite loop

This commit fixes the completed tasks tracking infinite loop (for multiple extended tasks)

* Refactored update check

* Hide task list if there aren't any visible tasks

* Fixed comment

* Fixed typo

* Renamed example method

* Fixed example extension

* Added tab to the extension example

* Fixed extended task list enabling option

* Added more tests

* Added PHP tests

* Fixed some comments

* Removed utils.js file

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-01-27 15:40:02 -03:00
Joshua T Flowers 6a3b30a2b2 Update task list to use wp card component (https://github.com/woocommerce/woocommerce-admin/pull/5895)
* Update task list to use wp card component

* Fix lint errors
2020-12-21 14:05:29 -05:00
Fernando dc02c47499 Home Screen - Small refactor to tasks extensibility (https://github.com/woocommerce/woocommerce-admin/pull/5833)
* Added unregister extended task

This commit adds a method to unregister extended task when the plugin is deactivated

* Refactored task lists handling

This commit refactors the task lists handling

* Added default task type

This commit adds a default task type

* Fixed method comment

* Moved method to group objects to lib

This commit moves method to group objects to `lib`

* Refactored getUngroupedTasks method

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-12-10 23:29:45 -03:00
Fernando 91bf42d7f4 Home Screen - modified tasks extensibility (https://github.com/woocommerce/woocommerce-admin/pull/5794)
* Added tasks extensibility

This commit addes tasks extensibility

* Fixed tests

This commit fixes the tests

* Fixed add task example

This commit fixes the add task example

* Fixed method possiblyCompleteTaskList

This commit fixes the method "possiblyCompleteTaskList"

* Fixed method getIncompleteTasks

This commit fixes the method getIncompleteTasks

* Fixed add task example

* Added callback onDismiss

This commit adds the callback for the "onDismiss"

* Added onDismiss and isDismissable to add task example

This commit adds the props "onDismiss" and "isDismissable" to add task example

* Not showing extensions task list if empty

* Fixed onDismiss callback

* Add changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2020-12-03 17:16:04 -04:00
Joshua T Flowers 88a4ed76eb Try: Register plugins under separate navigation menu (https://github.com/woocommerce/woocommerce-admin/pull/5513)
* Create separate methods for registering plugin items

* Fix add plugin category

* Allow scrolling of nav menu

* Use group title

* Add example plugin items

* Make menu item and category methods private

* Add analytics pages to navigation

* Register home item if dashboard feature is enabled

* Allow navigation registration from all wca items

* Update example plugin item registration

* Update order of menu groups

* Update plugins group name to extensions

* Remove temporary scroll fixes
2020-11-05 09:00:04 -05:00
Joshua T Flowers c2fe5c2cfd Add navigation plugin example (https://github.com/woocommerce/woocommerce-admin/pull/5425)
* Add nav items example plugin

* Fix URLs

* Use WP components button in example
2020-10-26 14:26:48 -04:00
Bec Scott ad8f8c5b08 Rename admin notes classes and file names to fit conventions (https://github.com/woocommerce/woocommerce-admin/pull/5142)
* Rename admin notes classes and file names to fit conventions

* Use a facade class that adds deprecation warnings to each function call

* Tidy up after rebase

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-28 14:35:10 +10:00
Jeff Stieler 7ad5ea7d8d Use filtered headers array in onColumnsChange callback. (https://github.com/woocommerce/woocommerce-admin/pull/4964)
* Use filtered headers array in onColumnsChange callback.

* Table column example: show headers when there are no results.
2020-08-14 12:14:04 -04:00
Claudio Sanches 073a3f706f Fix usage of "package" tag in file headers (https://github.com/woocommerce/woocommerce-admin/pull/4940)
* Don't require package tag or file comment inside src

* Removed package tag from files inside src

* Fixed tests directory in phpcs.xml.dist

* Fixed usage of package tag

* Fixed new classes

* Fixed coding standards

* Fixed coding standards in tests
2020-08-11 16:18:47 -03:00
Jeff Stieler dd54268ad7 Master -> main. (https://github.com/woocommerce/woocommerce-admin/pull/4618) 2020-06-17 13:39:41 -04:00
Fernando aefbafea9b Inbox notification: layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4218)
* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Add undo snackbar button after deletion (https://github.com/woocommerce/woocommerce-admin/pull/4281)

* Added undo snakbar button for a single note

# Conflicts:
#	client/wc-api/notes/mutations.js
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Notes.php

* Added a button to undo the deletion of all notes

# Conflicts:
#	client/wc-api/notes/operations.js
#	src/API/Notes.php

* Code adapted to make code reviewing easier

There was some code that also was present in another PR, that code was removed to make code reviewing easier.

* UnitTest added

This commit adds some unit tests

* Added verification for API response

* Added casting to $note_id

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

* Update client/header/activity-panel/panels/inbox/style.scss

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

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

# Conflicts:
#	client/header/activity-panel/panels/inbox/card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Bugfix: solved problem when a note was undismissed

There was a problem with the undismiss functionality. When a note was undismissed, it always was recovered with "plain" layout. This commit solves this problem.

* Inbox notification: add event recording (https://github.com/woocommerce/woocommerce-admin/pull/4320)

* Added events recording

This commit adds events recording to the inbox notifications

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Added 'home_screen' verification

Changed recorded name, now when the client is in the WooCommerce 'home' page we record 'home_screen' instead of 'wc-admin'.

* Added a naming fix and a new prop to the recordEvent

* bugfix: added control before interaction with bodyNotificationRef

* Added more unit tests for new endpoints

This commit adds tests for deleting a single note and for deleting all the notes, both without permission.

* Modified variable name

* Refactor: prop rename and small logic change

* Screen name getter moved into the InboxNoteCard

This commit moves the screen name getter inside the InboxNoteCard.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Removed "screen" from state

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Refactor in admin-notes unit tests

Some unnecessary controls were removed from the admin-notes unit tests

* Indentation fixed in Install.php. Replaced spaces with tabs.

* Inbox notification: added new placeholder and empty card (https://github.com/woocommerce/woocommerce-admin/pull/4379)

* Added a new placeholder and an empty card

This commit adds a new placeholder and a new empty card to the inbox panel

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js
#	client/header/activity-panel/panels/inbox/style.scss

* Added border to read notes

* Improved note filtering in unreadNotes method and validNotes

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Actions render refactored

The actions render was refactored in InboxNoteCard component

* Refactor of InboxPanel component

The methods getUnreadNotesCount and hasValidNotes were separated from the InboxPanel component

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Refactor inbox panel subtitle classes

* Added changes for when a note is undismissed

This commit adds the requested changes in behavior and design for when a note is dismissed.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Bugfix: Added key to itemlist

The InboxNotePlaceholder is shown as an itemlist but it didn't have a key. This commit adds it.

* Removed unnecessary validation

* Refactored actionList map

This commit adds a refactor to the actionList map

* Changes to the getUndoDismissRequesting functionality

This commit adds a few changes to the getUndoDismissRequesting functionality

* Changed className prop

* Changed other className prop

* Modified InboxPanel rendering

* Removed unnecessary method in placeholder.js

* Simplified the card.js renderActions method

* Change renderActions return in card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: add client unit tests (https://github.com/woocommerce/woocommerce-admin/pull/4386)

* Added client unit tests

* Added test cases for getUnreadNotesCount and hasValidNotes

* Corrected typo error

* Removed Enzyme and added React Testing Library

* Removed unnecessary param

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Resolved some conflicts with master

* Marketing note test repaired

This commit repairs the marketing note test

* Added note type 'marketing' to delete all functionality

* Removed set_icon method from some notes and docs

* Added set_icon method as deprecated to prevent errors.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-06-03 08:43:35 -03:00
Paul Sealock f45fecfbed Advanced Filters: fix currency initialization (https://github.com/woocommerce/woocommerce-admin/pull/4356)
* Advanced Filters: fix currency initialization

* fix readme

* get formatCurrency method
2020-05-19 14:38:02 +12:00
Gregory Karpinsky d0697d6ce9 Removed duplicate array entry (https://github.com/woocommerce/woocommerce-admin/pull/4049) 2020-04-03 10:47:32 +10:00
Paul Sealock cb4ba39e30 Dynamic Currency with Context API (https://github.com/woocommerce/woocommerce-admin/pull/4027)
* Make currency setting dynamic with context API

* reference Currency

* what is 'this'

* remove comment

* All report tables

* Customers report

* activity panel

* leaderboard test

* business details

* store details

* single source of truth

* shipping rates

* remove currency-format.js

* tidy up

* make Currency a factory function

* factory revenue table

* tables

* Chart y-axis labels

* customers table

* cleanup

* business details

* shipping

* number-format

* stock and downloads tables

* changelog

* cleanup

* SQL example: update to dynamic currencies (https://github.com/woocommerce/woocommerce-admin/pull/4033)
2020-04-03 10:54:38 +13:00