Parent
#553 — Spec: one session for Elastic Path identity
What to build
The mechanical bulk of the migration: eight internal data hooks stop fetching through the
browser's Elastic Path client and fetch through the server instead. A shopper and a designer
should be unable to tell this happened — same data, same components, same behaviour.
Two components that call the server by raw string name are corrected to go through the wrapper
that chooses the transport, so that no call site names one.
Spec stories 23, 25.
Acceptance criteria
Blocked by
The tracker's dependency graph on this issue is authoritative; this list mirrors it.
Below is the original ticket, kept intact — it carries the research and decisions from #486, #495, #523 and #524.
In brief
The mechanical bulk of the migration, and none of it is visible to a designer or a shopper.
Eight internal data hooks — product, product list, related products, stock, locations, and three bundle hooks — still fetch through the browser's Elastic Path client. This switches them to the equivalent server functions.
Two components also call the server by raw string name instead of going through the normal wrapper, which bypasses the layer that picks the right transport. Those are corrected here too.
Part of the ADR-0003 token architecture. Sized on #495, rule from #491.
Why
Internal work: the hooks are not exported and the components above them do not change. This is the bulk of the "twelve commerce.client call sites" and it is not breaking.
Work
Move to the isomorphic ep.* functions: use-product, use-product-list, use-related-products, use-stock, use-locations, and the three bundle hooks.
Two call sites bypass the isomorphic wrapper and call callEpProxy by raw string name — registerEPAddToCartButton.tsx:175 and EPCartItemRemoveButton.tsx:85. Under ADR-0003 those are defects: call epAddCartItem / epRemoveCartItem.
Once no component passes a raw name, proxy-fn-parity.test.ts shrinks to guarding the ep.* functions' own internal calls.
ServerCartActionsProvider is rebuilt on epAddCartItem / epUpdateCartItem / epRemoveCartItem; it currently sits entirely on hooks that are being deleted.
Blocked by: the new named functions issue and the server-side headers issue.
ADR-0003: plasmicpkgs/commerce-providers/elastic-path/docs/adr/0003-one-session-for-elastic-path-identity.md. Map: #486. Issue set: #496.
Parent
#553 — Spec: one session for Elastic Path identity
What to build
The mechanical bulk of the migration: eight internal data hooks stop fetching through the
browser's Elastic Path client and fetch through the server instead. A shopper and a designer
should be unable to tell this happened — same data, same components, same behaviour.
Two components that call the server by raw string name are corrected to go through the wrapper
that chooses the transport, so that no call site names one.
Spec stories 23, 25.
Acceptance criteria
Blocked by
The tracker's dependency graph on this issue is authoritative; this list mirrors it.
Below is the original ticket, kept intact — it carries the research and decisions from #486, #495, #523 and #524.
In brief
The mechanical bulk of the migration, and none of it is visible to a designer or a shopper.
Eight internal data hooks — product, product list, related products, stock, locations, and three bundle hooks — still fetch through the browser's Elastic Path client. This switches them to the equivalent server functions.
Two components also call the server by raw string name instead of going through the normal wrapper, which bypasses the layer that picks the right transport. Those are corrected here too.
Part of the ADR-0003 token architecture. Sized on #495, rule from #491.
Why
Internal work: the hooks are not exported and the components above them do not change. This is the bulk of the "twelve
commerce.clientcall sites" and it is not breaking.Work
Move to the isomorphic
ep.*functions:use-product,use-product-list,use-related-products,use-stock,use-locations, and the three bundle hooks.Two call sites bypass the isomorphic wrapper and call
callEpProxyby raw string name —registerEPAddToCartButton.tsx:175andEPCartItemRemoveButton.tsx:85. Under ADR-0003 those are defects: callepAddCartItem/epRemoveCartItem.Once no component passes a raw name,
proxy-fn-parity.test.tsshrinks to guarding theep.*functions' own internal calls.ServerCartActionsProvideris rebuilt onepAddCartItem/epUpdateCartItem/epRemoveCartItem; it currently sits entirely on hooks that are being deleted.Blocked by: the new named functions issue and the server-side headers issue.
ADR-0003:
plasmicpkgs/commerce-providers/elastic-path/docs/adr/0003-one-session-for-elastic-path-identity.md. Map: #486. Issue set: #496.