Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Xamarin not allowing to drop an item in Empty area of grouped collection view where more than one item aligned horizontally #14310

Open
tusharsjagdale opened this issue May 30, 2021 · 4 comments
Labels
a/collectionview a/DragAndDrop s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified t/bug 🐛
Projects

Comments

@tusharsjagdale
Copy link

Description

  1. I have grouped collection view with 3 items per row and implemented drag-drop functionality onto them so that one item of group 1 can be dragged-dropped to the another group (say group 2) of collection view.
  2. I can able to drop onto the collection view item as well as collection view header/footer template. But not able to drop onto the blank area of collection view (Blank area is because of if I am having 4 items, so 3 items are fitting in one row and 1 item is fitting in another row but there is blank area in which two items can be fitted easily. )

Steps to Reproduce

  1. Take grouped collection view
  2. Add Drag/Drop gesture for the items so that item of one group can be drag/drop to another group
  3. Try to drop item in blank area of collection view

Expected Behavior

  1. There should be mechanism through which user can be able to drop item onto the blank area of grouped collection view

Actual Behavior

  1. Xamarin is not allowing to drop drop item onto the blank area of grouped collection view

Basic Information

  • Version with issue: Any
  • Last known good version: Not found yet
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP:
  • Android Support Library / AndroidX Version:
  • NuGet Packages:
  • Affected Devices:

Environment

Show/Hide Visual Studio info

Build Logs

Screenshots

Reproduction Link

Workaround

@tusharsjagdale tusharsjagdale added s/unverified New report that has yet to be verified t/bug 🐛 labels May 30, 2021
@jsuarezruiz jsuarezruiz added this to New in Triage via automation Jun 1, 2021
@NathanJPhillips
Copy link

NathanJPhillips commented Jun 14, 2021

I have a minimal MVVM project (using Prism) to reproduce this issue that I can share if helpful.
The problem comes down to the fact that there doesn't seem to be a template or style for a group in a CollectionView that includes the region for the items in the group. There is a GroupHeaderTemplate for the group header and there is ItemTemplate for items, both of which can have drop handlers, but the region under a group header that doesn't have items in it is not associated with the group. A drop on this area cannot be handled, even by a DropGestureRecognizer set on the whole CollectionView.
This means that currently it is impossible to drag and drop items between groups in a CollectionView.

@jsuarezruiz
Copy link
Contributor

Have you seen this example: https://devblogs.microsoft.com/xamarin/collectionview-drag-and-drop/?
Could you attach a small sample where reproduce the issue?

@jsuarezruiz jsuarezruiz moved this from New to Needs Info in Triage Jun 16, 2021
@jsuarezruiz jsuarezruiz added s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Jun 16, 2021
@NathanJPhillips
Copy link

NathanJPhillips commented Jun 29, 2021

Reproducer here:
TestGroupedDragAndDrop.zip
Try dragging an item from one group to another group. Notice that you can drop on the group header, a different handler allows you to drop on other items in the group, but there is no way to drop on the white space to the right of groups that don't contain a multiple of three items.

@NathanJPhillips
Copy link

@jsuarezruiz - could you update the labels on this issue assuming this repro is adequate?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/collectionview a/DragAndDrop s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/unverified New report that has yet to be verified t/bug 🐛
Projects
Triage
  
Needs Info
Development

No branches or pull requests

3 participants