Skip to content

[Catalyst] Click-Dragging Behavior in CollectionView #29616

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

Merged
merged 2 commits into from
May 28, 2025

Conversation

Tamilarasan-Paranthaman
Copy link
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause of the issue

Description of Change

  • To achieve the same behavior, enabling drag and drop without a noticeable long press on Mac Catalyst, the gesture recognizer’s MinimumPressDuration was set to 0.1 seconds, reducing the delay and providing a more responsive drag experience that matches the original system behavior.

Issues Fixed

Fixes #29536

Tested the behaviour in the following platforms

  • iOS
  • Mac
  • Android
  • Windows

Screenshot

Before Fix After Fix
Before-Fix.mov
After-Fix.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 22, 2025
Copy link
Contributor

Hey there @@Tamilarasan-Paranthaman! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label May 22, 2025
@jsuarezruiz jsuarezruiz added the platform/macos macOS / Mac Catalyst label May 22, 2025
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman marked this pull request as ready for review May 22, 2025 11:52
@Copilot Copilot AI review requested due to automatic review settings May 22, 2025 11:52
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman requested a review from a team as a code owner May 22, 2025 11:52
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 restores a more responsive drag-and-drop experience on Mac Catalyst by reducing the long-press threshold to 0.1 seconds.

  • Adds a #if MACCATALYST block to set MinimumPressDuration to 0.1 seconds in both reorderable view controllers.
  • Ensures drag gestures match original system behavior without requiring a full long press.

Reviewed Changes

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

File Description
src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs Add MACCATALYST-specific MinimumPressDuration adjustment to the long-press gesture recognizer.
src/Controls/src/Core/Handlers/Items/iOS/ReorderableItemsViewController.cs Add MACCATALYST-specific MinimumPressDuration adjustment to the long-press gesture recognizer.
Comments suppressed due to low confidence (1)

src/Controls/src/Core/Handlers/Items2/iOS/ReorderableItemsViewController2.cs:169

  • Add automated UI tests in TestCases.Shared.Tests and TestCases.HostApp to verify the reduced press duration behavior on Mac Catalyst and ensure tests run reliably against the new gesture timing.
_longPressGestureRecognizer.MinimumPressDuration = 0.1;

@PureWeen PureWeen added this to the .NET 9 SR8 milestone May 22, 2025
@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing May 22, 2025
@rmarinho rmarinho requested review from PureWeen and removed request for StephaneDelcroix and tj-devel709 May 22, 2025 13:40
@rmarinho
Copy link
Member

/azp run

@dotnet dotnet deleted a comment from azure-pipelines bot May 23, 2025
@dotnet dotnet deleted a comment from PureWeen May 23, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing May 23, 2025
@rmarinho rmarinho changed the base branch from main to inflight/candidate May 28, 2025 18:31
@rmarinho rmarinho merged commit f4f30eb into dotnet:inflight/candidate May 28, 2025
130 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing May 28, 2025
github-actions bot pushed a commit that referenced this pull request May 30, 2025
* CollectionView drag changes on Mac

* Mac drag changes
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/macos macOS / Mac Catalyst
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Review Change in behavior disabling click dragging on iOS CollectionView in SR7
4 participants