Commit Graph

10 Commits

Author SHA1 Message Date
Kyle Nel e1d72bde0a
Marketplace: Add the query parameters to product page URLs (#39901)
* Marketplace: Add the right URL parameters to product URLs

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

---------

Co-authored-by: raicem <unalancem@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
2023-09-18 11:10:56 +03:00
And Finally 21d1bab26e [wccom-17942] Making sure snackbar doesn't appear before content has loaded.
- Fixing `prettier` linter errors.
2023-09-04 16:00:30 +01:00
And Finally 6d65d54ed5 [wccom-17942] Making sure snackbar doesn't appear before content has loaded.
- Fixing `prettier` linter errors.
2023-09-04 15:45:24 +01:00
And Finally 6ae83b08ec [wccom-17942] Making sure snackbar doesn't appear before content has loaded.
- Addressing feedback. Renamed `MARKETPLACE_API_HOST` TO `MARKETPLACE_HOST` to make it less confusing – we don't only use it for API URLs.
2023-08-31 16:14:06 +01:00
And Finally 3c8f4861e4 [wccom-17942] Only showing feedback snackbar when content of in-app marketplace has finished loading. Making sure snackbar is fixed position, so it's visible wherever you are on the page.
- `ProductListContextProvider` provides `setIsLoading` function as well as `isLoading`.
- `Discover` uses these values from context, instead of keeping a loading state in itself.
- `FeedbackModal` calls `maybSetTimeout` when `isLoading` changes. If `isLoading` isn't truthy, and snackbar hasn't already rendered, it sets a timeout of 5 seconds to show it.

- Removed wrapping <WooFooterItem> from around Footer component, so it's no longer a child of the WooCommerce Admin `.woocommerce-layout__footer` footer.
- Removed the `position: relative` from `.woocommerce-layout__footer`. It needs to be `position: fixed`.
- Added FooterContent component to Footer, to allow the layout we want.

- Changed use of context. This now only has states for the selected tab and loading state.
- We use this context in `Tabs` and `Content` to keep track of which tab is selected, and set the selected tab.
- We also use it in `Discover` and `Extensions`, which both report loading state to the context. This allows us to use it to only render the snackbar when loading is complete.
- Extensions: moved `productList` and `setProductList` and logic for getting product list from the context provider to a state in this component. We don't need to share the list of products in the context.
- Renamed `ProductListContext`, `ProductListContextProvider` and `productListContextValue` to more generic `MarketplaceContext`, `MarketplaceContextProvider` and `marketplaceContextValue`.
- Renamed a constant and created constants for API paths.
- Only shows snackbar after content has loaded, and after a timeout. We set a date `marketplace_redesign_2023_last_shown_date` in local storage to ensure we only show one snackbar.
2023-08-26 12:47:23 +01:00
raicem 60c07013d4 Marketplace: Cache Discover page content
We were hitting the WCCOM API directly from the front end. However,
that limits of in terms of caching and reducing the load on WCCOM.

To prevent that, we added a REST API endpoint. This endpoint
fetches discover page content from WCCOM and puts in a transient.
This is actually how the page works in the previous version. So
we were able to reuse a lot of the code.
2023-08-18 18:59:36 +03:00
raicem fefe5223bc Marketplace: Add no results page 2023-08-15 15:37:50 +03:00
Kyle Nel b3992d3844
Reimplement existing marketplace tracking (#39672)
* Tracking: add UTM params to vendor links

# Conflicts:
#	plugins/woocommerce-admin/client/marketplace/utils/functions.tsx

Co-authored-by: raicem <unalancem@gmail.com>
2023-08-15 10:03:27 +02:00
raicem 31aa9ebd59 Marketplace: add category filtering 2023-08-15 09:38:17 +03:00
And Finally b56654867a Changes from `add/marketplace-product-card-component` after rebasing on feature branch. 2023-08-08 15:29:08 +01:00