Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 15, 2025

  • Add onPressedButNotHeld parameter to the PressHoldReleaseParams interface
  • Add held ref to track whether the button was actually held during the interaction
  • Update onPointerDown to reset the held state and set it to true when the hold timer fires
  • Update onPointerUp to check the held state and conditionally call onPressedButNotHeld for short presses
  • Enhance JSDoc documentation with updated examples showing the new callback usage
  • Add semantic release compatible commit message to trigger build

The hook now distinguishes between:

  • Short press: onPressonReleaseonPressedButNotHeld
  • Long press: onPressonHoldonRelease (no onPressedButNotHeld)

All existing behavior for onPress, onRelease, and onHold remains unchanged.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@ngenovese11 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] Add onPressedButNotHeld callback to usePressHoldRelease hook Add onPressedButNotHeld callback to usePressHoldRelease hook Sep 15, 2025
Copilot finished work on behalf of ngenovese11 September 15, 2025 15:20
@Copilot Copilot AI requested a review from ngenovese11 September 15, 2025 15:20
@ngenovese11
Copy link

an empty commit needs to be added with the "feat:" prefix to trigger a build via semantic release @copilot

This feature enables distinct handling of short presses versus holds in the usePressHoldRelease hook.
Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

an empty commit needs to be added with the "feat:" prefix to trigger a build via semantic release @copilot

Added an empty commit with "feat:" prefix to trigger semantic release build. Commit hash: 1ba3694

Copilot finished work on behalf of ngenovese11 September 15, 2025 15:29
Copy link

🎉 This PR is included in version 1.21.0-copilot-fix-61.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ngenovese11 ngenovese11 marked this pull request as ready for review September 15, 2025 15:38
Copy link

🎉 This PR is included in version 1.21.0-merge-press-and-hold-hook.1 🎉

The release is available on:

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.

2 participants