Skip to content

feat: add showShippingFacet as lowest-precedence legacy fallback - #783

Merged
hiagolcm merged 2 commits into
masterfrom
feat/show-shipping-facet-legacy-fallback
Aug 10, 2026
Merged

feat: add showShippingFacet as lowest-precedence legacy fallback#783
hiagolcm merged 2 commits into
masterfrom
feat/show-shipping-facet-legacy-fallback

Conversation

@hiagolcm

Copy link
Copy Markdown
Contributor

Why

Themes that set showShippingFacet (the original prop name before the rename to showShippingMethodFacet) would silently lose their visibility preference when feat/unify-delivery-promise-facets-visibility landed. This PR closes that gap by adding it as the lowest-precedence fallback in the unified visibility gate.

What changed

Precedence chain (first defined wins):

showDeliveryPromiseFacets > showShippingMethodFacet > showShippingFacet > hasBlock
  • react/utils/deliveryPromiseFacets.jsresolveShowDeliveryPromiseFacets now accepts showShippingFacet and uses .find(v => v !== undefined) across all three props to keep the precedence logic readable.
  • react/SearchResultFlexible.js — destructures showShippingFacet from props and passes it through to the resolver.
  • react/__tests__/utils/deliveryPromiseFacets.test.js — three new / updated cases covering showShippingFacet alone, showDeliveryPromiseFacets winning over all three props, and showShippingMethodFacet beating showShippingFacet.
  • CHANGELOG.md### Changed and ### Deprecated bullets updated to document the third-level fallback and its precedence.
  • docs/README.md — new row in the props table for showShippingFacet marked as deprecated.

Backward compatibility

Fully backward compatible. Themes that already migrated to showShippingMethodFacet or showDeliveryPromiseFacets are unaffected. Themes stuck on showShippingFacet will continue working as before.

Made with Cursor

Extends the delivery-promise facets visibility gate to honor the legacy
`showShippingFacet` prop (the original name before the rename to
`showShippingMethodFacet`). Precedence is now:
showDeliveryPromiseFacets > showShippingMethodFacet > showShippingFacet > hasBlock.

Themes that were never updated to the renamed prop will keep working
without any changes on their side.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hiagolcm
hiagolcm requested review from a team as code owners August 10, 2026 16:58
@hiagolcm
hiagolcm requested review from RodrigoTadeuF, vmourac-vtex and vsseixaso and removed request for a team August 10, 2026 16:59
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

Co-authored-by: Cursor <cursoragent@cursor.com>
@hiagolcm
hiagolcm merged commit a04799b into master Aug 10, 2026
7 of 8 checks passed
@hiagolcm
hiagolcm deleted the feat/show-shipping-facet-legacy-fallback branch August 10, 2026 17:06
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Your PR has been merged! App is being published. 🚀
Version 3.150.0 → 3.150.1

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.search-result@3.150.1

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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.

1 participant