You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
um problema no Search Page acontecia quando o usuário pesquisava um produto, a busca era feita da maneira correta .. porém alguns filtros não funcionam da maneira correta.
Debugando encontramos um tratamento que estava sendo feito no transform.ts , pelo que vimos por alto ela criava uma nova url e não utilizava o facetLink. Criamos uma versão que preserva a url em questão e o filtro voltou a funcionar nesse caso.
Enhanced vtex/utils/transform.ts utility functions to preserve query parameters in legacy facet links, add description fields to cluster properties when highlights are present, and refactor the toPlace function for consistent option handling.
Changes
Cohort / File(s)
Summary
Query parameter preservation in facet links vtex/utils/transform.ts
Added logic to preserve existing q query parameter when generating legacy facet links containing map= query by constructing VTEX links with appended current q value
Extended toAdditionalPropertyCluster to accept optional highlights?: Set<string> parameter and include description: "highlight" field in returned PropertyValue when applicable
toPlace function refactoring vtex/utils/transform.ts
Refactored toPlace to consistently derive isActive from options in non-VCS branch, aligning with VCS branch data flow; normalized opening hours and holiday handling
Helper function structural adjustments vtex/utils/transform.ts
Minor formatting and parameter handling adjustments across toProduct, breadcrumb, and link builder functions with no observable behavior changes
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
🐰 A carrot-ful of query params saved,
Highlights dancing, descriptions engraved, toPlace aligned from branch to branch,
Transform utils pack a solid punch! ✨
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check
⚠️ Warning
The pull request description is incomplete and does not follow the required template structure. While technical details are provided in Portuguese, required template sections (Issue Link, Loom Video, Demonstration Link) are missing or only contain template placeholders.
Add the required template sections: fill in the Issue Link with the actual GitHub issue number, provide a Loom video link showing the changes, and include a Demonstration Link to a testable environment or branch.
Title check
❓ Inconclusive
The title is partially related to the changeset, referring to facet link functionality which is a real part of the changes, but lacks clarity and uses Portuguese making it unclear to English-speaking reviewers.
Clarify the title in English to better describe the main change, such as 'fix: preserve query parameters in facet links' or 'fix: add facet link query parameter handling'.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
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.
um problema no Search Page acontecia quando o usuário pesquisava um produto, a busca era feita da maneira correta .. porém alguns filtros não funcionam da maneira correta.
Debugando encontramos um tratamento que estava sendo feito no transform.ts , pelo que vimos por alto ela criava uma nova url e não utilizava o facetLink. Criamos uma versão que preserva a url em questão e o filtro voltou a funcionar nesse caso.