Skip to content

Mark storefront components as Commerce data for the Airo builder - #1535

Open
sbolinger-godaddy wants to merge 1 commit into
mainfrom
storefront-builder-non-editable
Open

sbolinger-godaddy wants to merge 1 commit into
mainfrom
storefront-builder-non-editable

Conversation

@sbolinger-godaddy

Copy link
Copy Markdown
Collaborator

Summary

The Airo site builder lets a site owner edit page text inline. Products, prices and cart text from @godaddy/gd-commerce-storefront come 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" to StorefrontSurface, the shared .commerce-storefront wrapper. 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

  • Changeset added (docs): @godaddy/gd-commerce-storefront patch

Test Plan

  • New test in storefront.test.tsx checks 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, lint and test pass (186 tests).

🤖 Generated with Claude Code

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>
@sbolinger-godaddy
sbolinger-godaddy requested a review from a team as a code owner November 16, 2026 16:56
@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6edb87f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@godaddy/gd-commerce-storefront Patch

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

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