-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create store locator template #27
Conversation
sohnj877
commented
Nov 29, 2023
@@ -1,10 +1,10 @@ | |||
{% if request.async == true %} | |||
<link href="{{ 'css/ui/row.css' | asset_url }}" rel="stylesheet" /> | |||
<link href="{{ 'css/ui/row.css' | asset_url }}" rel="stylesheet" onload="document.dispatchEvent(new CustomEvent('asset:ready'))" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there no problem with having the same event name fire from multiple asset loads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah no problem with having the same event firing. Just need to wait for the first load
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved, just left one question re. event names
site/global/sections/footer.json
Outdated
@@ -48,7 +48,7 @@ | |||
{ | |||
"label": "Locations And Hours", | |||
"type": "external", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we start using the Link
resource shape + the link
function?
There was recently some documentation added for this and we should document the shape of the Link
resource in its own section (it's the same as the function doc)
In this case, it'd be:
{
"type": "storeLocator"
}
and ideally consumed like
<a href="{{ link(payload) }}">Store locator</a>
…ore-locator * 'alpha' of https://github.com/square/brisk-theme: (52 commits) feat: use system page properties (#52) fix: rename 'option' to 'control' in section controls (#59) refactor: rename 'option' to 'control' in section controls (#57) fix: search result 500 (#54) fix: respond to breaking changes (#55) feat(async): release async template removal (#53) refactor: remove async templates (#50) ci(github-action): use latest version of checkout action (#49) ci(github-actions): fix commitlint help url config (#48) ci(github-actions): add commit linting (#47) docs: update theme version (#46) fix: banner image missing on shop all (#45) refactor(home): update home sections (#43) chore: update hooks (#42) docs: add contributing file (#41) build(github-actions): update job action versions (#40) build(github-actions): add lint action (#39) build(release): add semantic releases (#38) Fix link control Update page to use lowercase value ...
site/global/sections/footer.json
Outdated
"type": "storeLocator", | ||
"href": "/s/store-locator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is considered a "system page" link, so you do not need to specify an href
value
"type": "storeLocator", | |
"href": "/s/store-locator" | |
"type": "storeLocator" |
https://square.github.io/custom-sites-docs/template-syntax/functions/link#system-links
site/pages/store-locator.json
Outdated
"template": "templates\/store\/locations", | ||
"route": "s\/store-locator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these need to be escaped? does it work if escaped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these were added automatically when I downloaded the files 🤔 will remove
🎉 This PR is included in version 1.0.0-alpha.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |