feat: add showShippingFacet as lowest-precedence legacy fallback - #783
Merged
Conversation
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
requested review from
RodrigoTadeuF,
vmourac-vtex and
vsseixaso
and removed request for
a team
August 10, 2026 16:59
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:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
Your PR has been merged! App is being published. 🚀 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:
After that your app will be updated on all accounts. For more information on the deployment process check the docs. 📖 |
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.
Why
Themes that set
showShippingFacet(the original prop name before the rename toshowShippingMethodFacet) would silently lose their visibility preference whenfeat/unify-delivery-promise-facets-visibilitylanded. 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):
react/utils/deliveryPromiseFacets.js—resolveShowDeliveryPromiseFacetsnow acceptsshowShippingFacetand uses.find(v => v !== undefined)across all three props to keep the precedence logic readable.react/SearchResultFlexible.js— destructuresshowShippingFacetfrom props and passes it through to the resolver.react/__tests__/utils/deliveryPromiseFacets.test.js— three new / updated cases coveringshowShippingFacetalone,showDeliveryPromiseFacetswinning over all three props, andshowShippingMethodFacetbeatingshowShippingFacet.CHANGELOG.md—### Changedand### Deprecatedbullets updated to document the third-level fallback and its precedence.docs/README.md— new row in the props table forshowShippingFacetmarked as deprecated.Backward compatibility
Fully backward compatible. Themes that already migrated to
showShippingMethodFacetorshowDeliveryPromiseFacetsare unaffected. Themes stuck onshowShippingFacetwill continue working as before.Made with Cursor