Repository navigation
Mark storefront components as Commerce data for the Airo builder - #1535
Open
sbolinger-godaddy wants to merge 1 commit into
Open
sbolinger-godaddy wants to merge 1 commit into
sbolinger-godaddy wants to merge 1 commit into
Conversation
Store data comes from the Commerce API, so the Airo site builder must not offer text edits inside it. The shared StorefrontSurface wrapper now carries data-dev-source-origin="commerce", which covers every root and the portaled cart drawer. Unlike data-airo-non-editable, this keeps the components selectable, so a site owner can still ask chat to restyle them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 6edb87f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Summary
The Airo site builder lets a site owner edit page text inline. Products, prices and cart text from
@godaddy/gd-commerce-storefrontcome from the Commerce API, not from the site's text, so the builder must not offer to edit or delete them.The Airo builder treats any element inside
[data-dev-source-origin="commerce"]as Commerce data. Inside such an element it blocks text edits, delete and "fix text", and limits what its hover bar can change. The site owner can still select the component, for example to ask chat for a new style.This change adds
data-dev-source-origin="commerce"toStorefrontSurface, the shared.commerce-storefrontwrapper. The wrapper encloses every root (catalog, product details, cart, product card, related products) and the cart drawer inside its portal, so one attribute covers all of them. The markup is otherwise unchanged. The README documents the attribute.We chose this attribute over
data-airo-non-editable. That attribute makes the builder ignore the element completely, including hover and selection, which would stop a site owner from pointing chat at the storefront.Changeset
@godaddy/gd-commerce-storefrontpatchTest Plan
storefront.test.tsxchecks that the catalog and the open cart drawer are both inside[data-dev-source-origin="commerce"]. With the attribute removed, the test fails. With it restored, the test passes.pnpm --filter @godaddy/gd-commerce-storefront build,typecheck,lintandtestpass (186 tests).🤖 Generated with Claude Code