-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allow Category tree on vtex legacy Filters and fixes url with the same page on Department Filters #179
base: main
Are you sure you want to change the base?
Allow Category tree on vtex legacy Filters and fixes url with the same page on Department Filters #179
Conversation
packs/vtex/utils/transform.ts
Outdated
if (mapSegments.length === 1) { | ||
return `${url.pathname}${url.search}`; | ||
} | ||
// if (mapSegments.length === 1) { |
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.
Why? Should it be removed?
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.
this verification causes all top-level department pages to have their filters come with the same page url. You can check in this pages:
@lucis I have commited a new fixes to all points. Can you check? |
@lucis I made the adjustments you mentioned. You can verify? |
@@ -447,11 +447,6 @@ export const legacyFacetToFilter = ( | |||
const pathSet = new Set(pathSegments); | |||
|
|||
const getLink = (facet: LegacyFacet, selected: boolean) => { | |||
// Do not allow removing root facet to avoid going back to home page |
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.
Removing this line causes the aforementioned bug
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.
@tlgimenes I don't understand this comment, can you explain?
What would a fix for this look like?
this line of code in the verification makes all the returned filters have the wrong url when it is a department: https://australroupas.deco.site/masculino?O=OrderByScoreDESC
Co-authored-by: Tiago Gimenes <[email protected]>
Feature description:
This PR Allows the category tree filters to Vtex Legacy ProductListingPage. By sending to front the categories below the current department or category.
Use case:
https://www.austral.com.br/masculino?O=OrderByScoreDESC
https://australroupas.deco.site/masculino?O=OrderByScoreDESC
Fix description:
In the Department page like /masculino at austral, all filters come with the same current url. With this fix, this no longer happens.
Use case:
https://australroupas.deco.site/masculino?O=OrderByScoreDESC