Allow Category tree on vtex legacy Filters and fixes url with the same page on Department Filters#179
Open
jovenan wants to merge 8 commits intodeco-sites:mainfrom
Open
Conversation
lucis
suggested changes
Aug 7, 2023
packs/vtex/utils/transform.ts
Outdated
| if (mapSegments.length === 1) { | ||
| return `${url.pathname}${url.search}`; | ||
| } | ||
| // if (mapSegments.length === 1) { |
Author
There was a problem hiding this comment.
this verification causes all top-level department pages to have their filters come with the same page url. You can check in this pages:
Author
|
@lucis I have commited a new fixes to all points. Can you check? |
lucis
suggested changes
Aug 8, 2023
Author
|
@lucis I made the adjustments you mentioned. You can verify? |
lucis
approved these changes
Aug 10, 2023
tlgimenes
requested changes
Aug 10, 2023
| const pathSet = new Set(pathSegments); | ||
|
|
||
| const getLink = (facet: LegacyFacet, selected: boolean) => { | ||
| // Do not allow removing root facet to avoid going back to home page |
Contributor
There was a problem hiding this comment.
Removing this line causes the aforementioned bug
Author
There was a problem hiding this comment.
@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 <tlgimenes@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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