-
Notifications
You must be signed in to change notification settings - Fork 706
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
Support Rails 7 #1354
Support Rails 7 #1354
Conversation
@@ -9,6 +9,10 @@ | |||
/> | |||
<% unless with_cookie_authentication? %> <script> | |||
document.addEventListener("DOMContentLoaded", async function() { | |||
<% if ShopifyApp.use_importmap? %> | |||
await import("lib/shopify_app") |
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 this the best way to load shopify_app.js
? It requires the DOM content to be loaded, but we need to run it before this point.
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.
Both, await
and import
are supported by most of the browsers so I'd say it's fine.
@@ -9,6 +9,10 @@ | |||
/> | |||
<% unless with_cookie_authentication? %> <script> | |||
document.addEventListener("DOMContentLoaded", async function() { | |||
<% if ShopifyApp.use_importmap? %> | |||
await import("lib/shopify_app") |
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.
Both, await
and import
are supported by most of the browsers so I'd say it's fine.
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.
No issues discovered via tophat.
Amazing update! 👍🔥 |
Closes #1339
What this PR does
Reviewer's guide to testing
rails -v
rails new my_app
bundle add shopify_app --git 'git://github.com/Shopify/shopify_app.git' --branch 'rails-7'
rails generate shopify_app
rails db:migrate
ngrok http 3000
and copy the HTTPS URL/auth/shopify/callback
in theAllowed redirection URLs
fieldSHOPIFY_API_KEY=x SHOPIFY_API_SECRET=y rails server
Checklist
Before submitting the PR, please consider if any of the following are needed:
CHANGELOG.md
if the changes would impact usersREADME.md
, if appropriate./docs
, if necessary