Add first-class <shopify-account> support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 443
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 24
Description
Context
<shopify-account> is Shopify's Storefront Web Component for a customer-account avatar. When selected, it opens Shopify's account sheet with sign-in options or signed-in customer links. Shopify owns the interactive button, account sheet, authentication UI and client-side shadow DOM.
Hydrogen users currently need to load and integrate the component manually. This work adds first-class support with server-rendered signed-out content and stable layout before the custom element upgrades.
Scope
This parent issue tracks three independently reviewable deliverables:
- Add opt-in account widget loading to
ShopifyScripts. - Add a framework-neutral SSR-safe renderer and use it in the React Router template.
- Add idiomatic React and Vue
ShopifyAccountWidgetbindings.
Agreed direction
- Name the
ShopifyScriptsopt-inaccountWidget. - Require a signed-out avatar so every integration has an SSR fallback and reserved layout space.
- Let the framework-neutral renderer accept required trusted avatar HTML. React accepts a required
ReactElement; Vue exposes a required named slot. - Hydrogen owns the
slot="signed-out-avatar"wrapper so consumers cannot misconfigure Shopify's slot protocol. - Emit a scoped nonce-bearing
<style>that reserves the host and avatar dimensions withvar(--shopify-account-avatar-size, 44px). - Do not reproduce Shopify's private shadow DOM or use Declarative Shadow DOM.
- Listen directly on
<shopify-account>for its non-bubblingopenandcloseevents.
Out of scope
- Customer Account OAuth, sessions or account pages.
- Reproducing or styling Shopify's internal account button or sheet.
References
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by mapping the three deliverables named in the issue: accountWidget loading in ShopifyScripts, the framework-neutral SSR-safe renderer used by the React Router template, and the React and Vue bindings. Review the Shopify account and Shopify store API references first. Done means signed-out SSR content, reserved layout space, opt-in loading, and idiomatic bindings with the stated event behavior, without reproducing Shopify's private UI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100