-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(headless): refresh commerce recommendations server-side #4617
Conversation
packages/headless/src/controllers/commerce/recommendations/headless-recommendations.ssr.ts
Outdated
Show resolved
Hide resolved
Pull Request ReportPR Title✅ Title follows the conventional commit spec. Live demo linksBundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : buildInteractiveInstantResult search : buildInteractiveRecentResult search : buildInteractiveCitation search : buildGeneratedAnswer recommendation : missing SSR support case-assist : missing SSR support insight : missing SSR support commerce : missing SSR support |
packages/headless/src/controllers/commerce/recommendations/headless-recommendations.ssr.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nit pik.
It's quite complex tho for me to review this. @fbeaudoincoveo will probably understand it better than me.
packages/headless/src/app/commerce-ssr-engine/factories/recommendation-static-state-factory.ts
Outdated
Show resolved
Hide resolved
packages/headless/src/app/commerce-ssr-engine/types/fetch-static-state.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
https://coveord.atlassian.net/browse/KIT-3758 While drafting Commerce SSR docs, I noticed that we had no annotations for NavigatorContext, which I thought would be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
packages/headless/src/app/commerce-ssr-engine/factories/build-factory.ts
Outdated
Show resolved
Hide resolved
packages/samples/headless-ssr-commerce/app/(listing)/[category]/page.tsx
Show resolved
Hide resolved
packages/samples/headless-ssr-commerce/components/recommendations/popular-viewed.tsx
Outdated
Show resolved
Hide resolved
…factory.ts Co-authored-by: Frederic Beaudoin <fbeaudoin@coveo.com>
Adding server-side rendering for commerce SSR package only.
headless-react
package to reflect the new changesheadless-ssr-commerce
sample to reflect the new changesFeatures
Customizable Recommendation Controller
Recommendation Name Validation
Code to increase readability
Factory methods
Moved factory methods into dedicated files to avoid bloating the
commerce-engine-ssr
file.Examples include:
hydrated-state-factory.ts
static-state-factory.ts
Core Engine Types
Centralized all core engine types into
types/core-engine.ts
.Recommendation State Factories
Created dedicated factories for handling static and hydrated states for recommendations (
recommendation-static-state-factory.ts
).Improved Controller Handling
Simplified the logic for building controllers based on solution type to eliminate complex, hard-to-read conditional blocks (677fd45)
https://coveord.atlassian.net/browse/KIT-3503