Skip to content

Commit

Permalink
Merge remote-tracking branch 'shopify/main' into next
Browse files Browse the repository at this point in the history
* shopify/main:
  [Video] Add fade in on scroll animation (Shopify#2495)
  Animate rich text and email signup (Shopify#2408)
  [Gift card] Add help doc link and change label for translation (Shopify#2471)
  Add prettier config to support format-on-save (Shopify#2323)
  Announcements slideshow (Shopify#2394)
  fix: Update Follow on Shop Option Text (Shopify#2463)
  Enable "per-PR" async PR mode (Shopify#2488)
  Animate multicolumn (Shopify#2409)
  Fix improper image sizes in the collage section (Shopify#2478)
  Replaced depreciated liquid property/value (Shopify#2480)
  • Loading branch information
pangloss committed Apr 5, 2023
2 parents fb6336e + 2ff714f commit db2c09f
Show file tree
Hide file tree
Showing 131 changed files with 3,566 additions and 3,008 deletions.
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"singleQuote": true
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["shopify.theme-check-vscode"]
"recommendations": ["shopify.theme-check-vscode", "esbenp.prettier-vscode"]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": true
}
8 changes: 3 additions & 5 deletions assets/animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ function onIntersection(elements, observer) {
if (element.isIntersecting) {
const elementTarget = element.target;
elementTarget.classList.add(SCROLL_ANIMATION_ACTIVE_CLASSNAME);
if (elementTarget.hasAttribute("data-cascade"))
if (elementTarget.hasAttribute('data-cascade'))
elementTarget.setAttribute('style', `--animation-order: ${index};`);
observer.unobserve(elementTarget);
}
})
});
}

function initializeScrollAnimationTrigger(rootEl = document) {
const animationTriggerElements = Array.from(
rootEl.getElementsByClassName(SCROLL_ANIMATION_TRIGGER_CLASSNAME)
);
const animationTriggerElements = Array.from(rootEl.getElementsByClassName(SCROLL_ANIMATION_TRIGGER_CLASSNAME));
if (animationTriggerElements.length === 0) return;

const observer = new IntersectionObserver(onIntersection, {
Expand Down
Loading

0 comments on commit db2c09f

Please sign in to comment.