This repository was archived by the owner on Feb 23, 2026. It is now read-only.
generated from deco-sites/start
-
Notifications
You must be signed in to change notification settings - Fork 20
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 into
deco-sites:main
Choose a base branch
from
jovenan:jonatas/fix-returned-filters-vtex-legacy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Allow Category tree on vtex legacy Filters and fixes url with the same page on Department Filters #179
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f284516
feat: Allow Category tree on vtex legacy Filters
jovenan f83e942
fix: getCategoryFacets with the category Id verification
jovenan f4c9d61
Merge branch 'main' into jonatas/fix-returned-filters-vtex-legacy
jovenan 9c443aa
fix: renaming variables and removing comments
jovenan 9c09915
fix: Remove recursion of getCategoryFacets
jovenan f1690d7
fix: using recursion to getCategoryFacets
jovenan 191b4e5
fix: Remove code coments
jovenan 9bfb0a9
fix: Remove Break row
jovenan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this line causes the aforementioned bug
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tlgimenes I don't understand this comment, can you explain? 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 |
||
| if (mapSegments.length === 1) { | ||
| return `${url.pathname}${url.search}`; | ||
| } | ||
|
|
||
| const index = pathSegments.findIndex((s) => s === facet.Value); | ||
| const newMap = selected | ||
| ? [...mapSegments.filter((_, i) => i !== index)] | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.