add button for EventTile.tsx hover event on touchscreen devices#91
add button for EventTile.tsx hover event on touchscreen devices#91
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a touch-friendly affordance to EventTile so users on devices without hover can reveal the tile’s “hover” details, supported by a new device-capability hook.
Changes:
- Introduces
useIsTouchDevicehook using a media-query listener to detect(hover: none). - Updates
EventTileto render a hamburger control on “touch” devices that toggles thehoveredstate.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/utils/hooks/useIsTouchDevice.tsx | New hook to detect lack of hover capability via matchMedia and keep it updated on changes. |
| src/components/event-components/EventTile.tsx | Adds a hamburger control (shown on detected touch/no-hover devices) to toggle the hover details state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
balog-b
left a comment
There was a problem hiding this comment.
Pretty good but needs a little polish.
Right now it requires two clicks to actually trigger the hover action. This is probably due to how touch screen works, where a tap can triggers the hover effect too. I would try disabling the default hover logic when on mobile.
Also, some event cards feature a "Spot album" logo. The new button is currently overlapping said album icon on cards that have a Spot album.
No description provided.