Skip to content
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

Merged
merged 10 commits into from
Mar 28, 2024
Merged

feat: create store locator template #27

merged 10 commits into from
Mar 28, 2024

Conversation

sohnj877
Copy link
Collaborator

Screenshot 2023-11-29 at 4 43 25 PM

@@ -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'))" />
Copy link
Collaborator

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?

Copy link
Collaborator Author

@sohnj877 sohnj877 Nov 30, 2023

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

@bashunaimiroy bashunaimiroy self-requested a review November 29, 2023 21:55
Copy link
Collaborator

@bashunaimiroy bashunaimiroy left a 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

@sohnj877 sohnj877 changed the base branch from accessibility to main November 30, 2023 22:26
@@ -48,7 +48,7 @@
{
"label": "Locations And Hours",
"type": "external",
Copy link
Collaborator

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
  ...
@sohnj877 sohnj877 changed the base branch from main to alpha March 28, 2024 20:37
Comment on lines 50 to 51
"type": "storeLocator",
"href": "/s/store-locator"
Copy link
Collaborator

@kchung kchung Mar 28, 2024

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

Suggested change
"type": "storeLocator",
"href": "/s/store-locator"
"type": "storeLocator"

https://square.github.io/custom-sites-docs/template-syntax/functions/link#system-links

Comment on lines 7 to 8
"template": "templates\/store\/locations",
"route": "s\/store-locator"
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@sohnj877 sohnj877 merged commit 412992a into alpha Mar 28, 2024
3 checks passed
@sohnj877 sohnj877 deleted the store-locator branch March 28, 2024 21:00
Copy link

🎉 This PR is included in version 1.0.0-alpha.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants