Skip to content
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

Some RAC ListBox drag-and-drop examples in the docs don't work on Chrome for Android #6365

Open
staticshock opened this issue May 10, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@staticshock
Copy link

Provide a general summary of the issue here

I've linked to a list of demos from the React Aria docs pages that don't work on Chrome for Android.

🤔 Expected Behavior?

Should roughly match what I see on desktop.

😯 Current Behavior

In all of the examples below, the items are draggable, but the drop area never activates. If I hover an item over it and let go, the drag action is cancelled.

💁 Possible Solution

🤷

🔦 Context

No response

🖥️ Steps to Reproduce

Try any of these demos on Chrome for Android:

Version

Whatever version your docs site is running

What browsers are you seeing the problem on?

Chrome

If other, please specify.

Chrome 124.0.6367.114

What operating system are you using?

Android 14; Pixel 6 Build/AP1A.240405.002

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@staticshock staticshock changed the title Some ListBox drag-and-drop examples don't work on Chrome for Android Some ListBox drag-and-drop examples in the docs don't work on Chrome for Android May 10, 2024
@staticshock staticshock changed the title Some ListBox drag-and-drop examples in the docs don't work on Chrome for Android Some RAC ListBox drag-and-drop examples in the docs don't work on Chrome for Android May 10, 2024
@BenjaminLucier
Copy link

Same issue for me.

@LFDanLu
Copy link
Member

LFDanLu commented May 15, 2024

This is a known issue, typically we've had to add the following to whichever drop handler is being used to properly parse the dropped data for Android. We debated about adding this to the docs examples but felt it would just make them more complex/longer. We can definitely consider adding it to the examples or at least a call out somewhere in the docs.

@LFDanLu LFDanLu added the documentation Improvements or additions to documentation label May 15, 2024
@staticshock
Copy link
Author

I've been working through a few issues in my own use of React Aria's DnD recently, especially on mobile, and I thought it was logical to check if the React Aria docs exhibit the same issues. If they do, I reasoned, then there's a bug in the framework, and if they don't, then the bug is probably on my end. It never even occurred to me that bugs in the React Aria docs would be deliberately there to make the code look simpler than it would be in reality, which is what I think you're suggesting.

@LFDanLu
Copy link
Member

LFDanLu commented May 16, 2024

Yeah, we have been trying to find a good balance between making the docs informative yet not too dense/unapproachable. At the time we debated whether or not to include this snippet of code since it was quite specific but would need to be included in some fashion in every drop handler, but perhaps we could just have a FAQ section somewhere and link to it at the start of every DnD example section.

@staticshock
Copy link
Author

staticshock commented May 16, 2024

In their current state, the docs are obviously very useful as a way to learn about the capabilities of the framework. It makes sense for each example to showcase a specific feature with the highest possible signal-to-noise ratio.

Deceptively, they also appear to be good reference implementations, even though it sounds like they aren't, and in retrospect I understand why they shouldn't strive to be. In my ideal world, whenever an example elides something that would have to be included in a real world implementation, it would be awesome to see a link to a reference implementation. "Warning: this example simplifies some things for the sake of illustration. For support across a wide range of devices, see this reference implementation."

(I'm not asking, by the way, just thinking out loud. In the grand scheme of things, I'd put much higher value on fixes to logic issues I've run into, such as the inconsistent handling of trackpads with tap-to-click enabled.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: ✏️ To Groom
Development

No branches or pull requests

3 participants