woocommerce/plugins/woocommerce-admin
Boro Sitnikovski ce66b55bc5
In app search improvements feature branch (#51413)
* Add search results count to the in-app marketplace (#51266)

* Add searchResults to context

* Use setSearchResults in Content

* Add ribbons to the tabs

* Changelog

* Use setState as the function name

* Only show ribbon counts when there's an active search

* Refactor how 'setSearchResultsCount' is used (h/t @mcliwanow)

* Don't populate initial search results

* Unify css styling

* Marketplace: bring back the loading state (#51342)

* Marketplace: bring back the loading state

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>

* Remove in-app marketplace Search results tab and unify results into existing tabs (#51297)

* Remove search results component and any references to it

* Persist current tab for searching, or default to extensions if tab is not set

* Persist term when switching across tabs

* Lint

* When a search is initiated, fetch all categories to keep the tab counts up to date.

The necessary filtering to display data to the current screen will be performed on the frontend.

* Apply correct colors to the tabs, as per design

* Beyond query.term, also rely on isLoading so that search result counts don't jump

* Address an issue when the user searches for something that returns no results in the business services tab

* Changelog

* Addressed :)

* Change key to category

* Fix category filter being broken

Whenever a category is requested, we need to do an additional request with the category param being the current category (overriding extensions/theme/business services).

Ideally the backend API would make a distinction between type (theme/extension/business service) and category, but this hack should do for now.

* Lint

* Remove unused variables h/t @KokkieH

* Lint

* Revert "Lint"

This reverts commit 0b2d2dca6d.

* Actually fix lint without introducing infinite loop

Reproducible at http://localhost:8080/wp-admin/admin.php?page=wc-admin&term=payments&tab=extensions&path=%2Fextensions&category=customer-service

* Show category selector even if there are no results displayed

* Update comment to be less misleading

* Query isn't used here

* Update Marketplace search component (#51313)

* Update Search placeholder text

* Replace search component with one from @wordpress/components

* Make mobile search field font consistent with desktop

* Add changefile(s) from automation for the following project(s): woocommerce

* Handle import errors for SearchControl component

---------

Co-authored-by: github-actions <github-actions@github.com>

* Marketplace: update category selector (#51309)

* Marketplace: update category selector

Remove the dropdown on the desktop view and show all items, even if
overflowing. Added helper buttons to scroll to the right to show more.

* Add changefile(s) from automation for the following project(s): woocommerce

* Marketplace: remove category sroll helpers from tabindex

GitHub:
https://github.com/woocommerce/woocommerce/pull/51309/files#r1758448638

* Marketplace: Remove selectedTab reference from product.tsx

This is probably included due to the merge conflict

* Marketplace: tweak category scroll button narrower

---------

Co-authored-by: github-actions <github-actions@github.com>

* Lint

* Fix 2 lint errors

* Fix another lint error (useMemo) h/t @KokkieH

* Add load more button in-app (#51434)

* Add additional fields returned by search API to marketplace types

Ensure components have access to additional fields

* Add LoadMoreButton component

* Only render Load More button if there are additional pages of results

* Fetch and display next page of results in Load More button is clicked

* Simplify renderContent function to have less repetition

- Hide load more button while fetching results

* Improve loading of new products

- Ensure keyboard focus goes to first new product after Load More is clicked

* Add changefile(s) from automation for the following project(s): woocommerce

* Add blank line to separate sections

* Set category param based on current tab when loading more products

* Improve busy-state screen reader text

Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>

* Add missing dependency

* Move getProductType() function to functions.tsx

- Do not show load more button if isLoading state is true

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Boro Sitnikovski <buritomath@gmail.com>

* Rework the values used with `setSearchResultsCount`

After https://github.com/Automattic/woocommerce.com/pull/21678/files we
get a `totalProducts` so we can re-use that.

Also remove setting the counts when paginating since we set them to the
total.

* Add search complete announcement h/t @KokkieH

* Show update count only if greater than 0 h/t @andfinally

* Switch to Extensions tab if on My subscriptions when searching

* yoda

---------

Co-authored-by: Cem Ünalan <raicem@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
2024-09-18 14:14:30 +02:00
..
bin Clean up 'Profile Wizard' code (#51190) 2024-09-10 11:29:14 +08:00
changelog Fix typos. (#50047) 2024-08-23 18:26:09 +01:00
client In app search improvements feature branch (#51413) 2024-09-18 14:14:30 +02:00
docs Deprecate unsupported Inbox note banner layout (#51275) 2024-09-13 01:11:11 +00:00
.browserslistrc
.distignore Create E2E package (https://github.com/woocommerce/woocommerce-admin/pull/7084) 2021-07-13 16:38:05 -03:00
.eslintignore Ignore core js packages from woo admin's eslint 2022-03-29 16:07:09 +08:00
.eslintrc.js CI: update linting jobs to skip build step (#49193) 2024-07-08 08:39:39 +02:00
.gitattributes Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349) 2022-03-04 12:01:16 +08:00
.gitignore Enable Typescript checking on ./client folder (https://github.com/woocommerce/woocommerce-admin/pull/8372) 2022-03-01 12:19:07 +08:00
.npmrc Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349) 2022-03-04 12:01:16 +08:00
.prettierrc.js Update @wordpress/eslint-plugin dependency to latest version. (https://github.com/woocommerce/woocommerce-admin/pull/5856) 2021-01-26 13:24:28 +13:00
.stylelintignore CSS Linting: Exclude Storybook CSS (https://github.com/woocommerce/woocommerce-admin/pull/6785) 2021-04-13 10:03:44 +12:00
README.md Fix link to e2e tests documentation from WooCommerce Admin directory (#41631) 2023-11-27 09:53:22 +01:00
babel.config.js Remove redundant deps on e2e in wc-admin (#39746) 2023-08-16 12:15:03 +12:00
composer.json Fix Component Project Changelog Checking (#42794) 2023-12-13 15:41:11 -08:00
composer.lock Fix Component Project Changelog Checking (#42794) 2023-12-13 15:41:11 -08:00
package.json Use syncpack to lock pnpm version till we can fix issues (#50828) 2024-08-22 12:34:42 +12:00
stylelint.config.js Stylelint: Update config to double quotes (#45607) 2024-03-26 10:41:34 -03:00
tsconfig.json Move product-editor CES-related components and utilities (#37131) 2023-03-28 13:38:08 -04:00
unminify.js Improve webpack cache-busting version parameter by using file contents hash (#44838) 2024-02-27 08:07:53 +00:00
webpack.config.js Upgrade storybook to version 7 and add pages workflow for GH publishing (#51168) 2024-09-09 12:06:01 -03:00

README.md

WooCommerce Admin

This is a javascript-driven, React-based admin interface for WooCommerce.

Development

Please refer to the WooCommerce Admin Development.

End-to-end tests

Please refer to the WooCommerce End to End Tests.

Common Issues

If you're encountering any issue setting things up, chances are we have been there too. Please have a look at our wiki for a list of common problems.