Skip to content

feat: (attempt 2) replace tilt effect during Instagram media interactions #280

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisvogt
Copy link
Owner

Reverts #279 to reapply #278.

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for chrisvogt ready!

Name Link
🔨 Latest commit 0f46032
🔍 Latest deploy log https://app.netlify.com/sites/chrisvogt/deploys/67777227bc5f9e00085d3b4c
😎 Deploy Preview https://deploy-preview-280--chrisvogt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.46%. Comparing base (4ce8f7c) to head (0f46032).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #280      +/-   ##
==========================================
+ Coverage   94.06%   94.46%   +0.39%     
==========================================
  Files          64       64              
  Lines         657      668      +11     
  Branches      189      193       +4     
==========================================
+ Hits          618      631      +13     
+ Misses         34       32       -2     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chrisvogt chrisvogt marked this pull request as draft February 1, 2025 22:05
@chrisvogt
Copy link
Owner Author

Converted to a draft because this still has the same bug from the previous revert.

@chrisvogt chrisvogt requested a review from Copilot May 28, 2025 23:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the previous tilt effect during Instagram media interactions with a focus- and hover-based approach, effectively reverting earlier changes to reapply #278. The changes include CSS updates for focus states and fade-in animations, modifications to event handlers in the MediaItemGrid and InstagramWidget components, and corresponding updates to tests and snapshots.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
theme/src/styles/global.css Added focus styles and a fadeIn keyframes animation for media item icons.
theme/src/components/widgets/spotify/media-item-grid.spec.js Updated tests to use react-testing-library and verify focus and mouse events.
theme/src/components/widgets/spotify/media-item-grid.js Updated onFocus, onBlur, and onMouse* handlers with consistent state management.
theme/src/components/widgets/instagram/instagram-widget.spec.js Removed VanillaTilt tests, added tests for lightGalleryRef and focus event handling.
theme/src/components/widgets/instagram/instagram-widget.js Removed the VanillaTilt effect and integrated classnames with focus handling.
theme/src/components/widgets/instagram/instagram-widget-item.{js,spec.js} Added focus/blur and mouse event handlers along with conditional class toggling.
theme/package.json Bumped the version and removed the unused vanilla-tilt dependency.
Comments suppressed due to low confidence (1)

theme/src/components/widgets/spotify/media-item-grid.js:3

  • Consider initializing currentMediaId with null instead of false for consistency with onBlur events that set it to null.
const [currentMediaId, setCurrentMediaId] = useState(false)

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

Successfully merging this pull request may close these issues.

1 participant