Description
amp-story-shopping-config can either have a script child or a src attribute
a) Inline is always required
b) If a src is present it will override inline
c) If remote fails it should fallback to the inline config
- Data should be fetched and set in the store service under a new entry called
SHOPPING_STATE.
products should be keyed to shopping state by their product-tag-id value so they can be read without iterating over data. This could follow a similar pattern as the ADD_PANNING_MEDIA_STATE action.
amp-story-shopping-tag should subscribe to SHOPPING_STATE and update its text content with the product-title value.
Validation is not part of this PR. Follow up PRs will validate JSON before setting it. I2I
Description
amp-story-shopping-configcan either have ascriptchild or asrcattributea) Inline is always required
b) If a
srcis present it will override inlinec) If remote fails it should fallback to the inline config
SHOPPING_STATE.products should be keyed to shopping state by their
product-tag-idvalue so they can be read without iterating over data. This could follow a similar pattern as theADD_PANNING_MEDIA_STATEaction.amp-story-shopping-tagshould subscribe toSHOPPING_STATEand update its text content with theproduct-titlevalue.Validation is not part of this PR. Follow up PRs will validate JSON before setting it. I2I