Define json-datamodel corresponding to Issue 2 (Abstract layout for frontpage) #4

Closed
opened 2025-11-18 02:51:32 +00:00 by namds29 · 1 comment
Member
No description provided.
namds29 added this to the Storefront Shop project 2025-11-18 02:55:41 +00:00
Owner

First Version did go very low level, including divs and basic components.
[ { "Nav": { "props": {}, "children": [ { "Div": { "props": { "className": "flex items-center h-full" }, "children": [ { "LocalizedClientLink": { "props": { "href": "/", "label": "Medusa Store", "className": "bg-black txt-compact-xlarge-plus hover:text-ui-fg-base uppercase", "data-testid": "nav-store-link" } } } ] } }, { "Div": { "props": { "className": "flex items-center gap-x-6 h-full flex-1 basis-0 justify-end" }, "children": [ { "LocalizedClientLink": { "props": { "href": "/account", "label": "Account", "className": "hover:text-ui-fg-base bg-black", "data-testid": "nav-account-link" } } }, { "Suspense": { "props": { "fallback": [ { "LocalizedClientLink": { "props": { "href": "/cart", "label": "Cart (0)", "className": "bg-black hover:text-ui-fg-base flex gap-2", "data-testid": "nav-cart-link" } } } ] }, "children": [ { "CartButton": {} } ] } } ] } } ] } }, { "CartMismatchBanner": { "show": true } }, { "FreeShippingPriceNudge": { "variant": "popup" } }, { "PropsChildren" : {}}, { "Footer": { "copyrightText": "© 2025 MyShop" } } ]

Second Version now abstracts more.
[ { "Header" : { "config" : {"sticky": true}, "children" : [ { "Nav": { "config": { "left": [ { "VtSideMenu": {} } ], "center": [ { "HomeButton": { "config" : {"label":"Medusa Store"}} } ], "right": [ { "AccountButton": { "config": { "label": "Account", "className": "hover:text-ui-fg-base" } } }, { "VtCartButton" : {} } ] } } } ] } }, { "CartMismatchBanner": { "config": {"show": true} } }, { "FreeShippingPriceNudge": { "config": {"variant": "popup" }} }, { "PropsChildren" : {}}, { "Footer": { "config" : {"copyrightText": "© 2025 MyShop"} } } ]

First Version did go very low level, including divs and basic components. ` [ { "Nav": { "props": {}, "children": [ { "Div": { "props": { "className": "flex items-center h-full" }, "children": [ { "LocalizedClientLink": { "props": { "href": "/", "label": "Medusa Store", "className": "bg-black txt-compact-xlarge-plus hover:text-ui-fg-base uppercase", "data-testid": "nav-store-link" } } } ] } }, { "Div": { "props": { "className": "flex items-center gap-x-6 h-full flex-1 basis-0 justify-end" }, "children": [ { "LocalizedClientLink": { "props": { "href": "/account", "label": "Account", "className": "hover:text-ui-fg-base bg-black", "data-testid": "nav-account-link" } } }, { "Suspense": { "props": { "fallback": [ { "LocalizedClientLink": { "props": { "href": "/cart", "label": "Cart (0)", "className": "bg-black hover:text-ui-fg-base flex gap-2", "data-testid": "nav-cart-link" } } } ] }, "children": [ { "CartButton": {} } ] } } ] } } ] } }, { "CartMismatchBanner": { "show": true } }, { "FreeShippingPriceNudge": { "variant": "popup" } }, { "PropsChildren" : {}}, { "Footer": { "copyrightText": "© 2025 MyShop" } } ]` Second Version now abstracts more. `[ { "Header" : { "config" : {"sticky": true}, "children" : [ { "Nav": { "config": { "left": [ { "VtSideMenu": {} } ], "center": [ { "HomeButton": { "config" : {"label":"Medusa Store"}} } ], "right": [ { "AccountButton": { "config": { "label": "Account", "className": "hover:text-ui-fg-base" } } }, { "VtCartButton" : {} } ] } } } ] } }, { "CartMismatchBanner": { "config": {"show": true} } }, { "FreeShippingPriceNudge": { "config": {"variant": "popup" }} }, { "PropsChildren" : {}}, { "Footer": { "config" : {"copyrightText": "© 2025 MyShop"} } } ]`
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Shop/Shop-Storefront#4
No description provided.