With the major version 3
of the Depict UI there some breaking changes that apply to everyone.
The reason for most of them is that Depict is now designed to own your categories, brand pages, campaign pages, etc. That means that when creating a category, you’d go into Depict. And this in turn means that your routing should have Depict as source of truth. Use the get listings API to know which product listings are available and render the menu and navigation on your site - let us know how we can simplify that part.
As for the Depict UI, you have to do the following things to update to version 3:
@depict-ai/react-ui
to at least version 3.0.18
or @depict-ai/js-ui
to at least 3.0.16
).locale
object to the provider(s). This locale object now both dictates the UI language as well as the language used in the response of the Depict Backend. Please see the locale selector in the header of demo.depict.ai for what locales you should use.CategoryPage
component), what products to show is now decided by a new property called listingQuery
instead of categoryId
. See this excerpt of the integration guide for more details on what to specify. The type of that property looks as follows:
pageURLCreator
has been removed, please migrate your code to use displayTransformers
instead.userId
has been removed, there is now only one id used to tie together tracking events for personalisation and analytics: sessionId
. If you specify something falsey as sessionId, Depict will generate a random string and store it in localStorage._dep_id
and use that as session id, otherwise the provided value will be used.disableOverrideQueryId
has been renamed to disableOverrideListingId
onCategoryIdChange
has been renamed to onListingQueryChange
and now receives a ListingQuery
instead of a string
for the previous and next querymerchant
or market
is passed to your ProductCard anymore which you might have received beforeProductCardTemplateWithoutMerchantAndMarket
type is no longer exportedmetaTitleSuffix
is deleted