Skip to content
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

fix(Commerce SSR): export the appropriate sort criteria for commerce #4687

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

fpbrault
Copy link
Contributor

Copy link

github-actions bot commented Nov 19, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 241.4 241.4 0
commerce 346 346 0
search 413 413 0
insight 403.8 403.8 0
recommendation 253.6 253.6 0
ssr 406.5 406.5 0
ssr-commerce 358.3 358.3 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

Copy link
Contributor

@alexprudhomme alexprudhomme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure you should just need to export from features/commerce/sort/... instead of features/sort-criteria/.... Wouldn't that work ?

export type {
  SortCriterion,
  SortBy} from './features/commerce/sort/sort.ts'

packages/headless/src/features/sort/sort.ts Outdated Show resolved Hide resolved
@fpbrault
Copy link
Contributor Author

I am pretty sure you should just need to export from features/commerce/sort/... instead of features/sort-criteria/.... Wouldn't that work ?

export type {
  SortCriterion,
  SortBy} from './features/commerce/sort/sort.ts'

I'll make that change, that way I don't need to add displayName to SortByFieldsFields. Ty!

Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

packages/samples/headless-ssr-commerce/components/sort.tsx Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants