Fix drawers are draggable on desktop platforms#100476
Fix drawers are draggable on desktop platforms#100476fluttergithubbot merged 2 commits intoflutter:masterfrom
Conversation
|
Gold has detected about 1 new digest(s) on patchset 1. |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. Changes reported for pull request #100476 at sha 7deb72979b845d374955962191c16adbd5dc7b29 |
justinmc
left a comment
There was a problem hiding this comment.
What about mobile platforms with a mouse connected or desktop platforms with a touchscreen?
Maybe in this case it's not so easy to handle those cases and we should just go with this for now... This mouse/touch and desktop/mobile distinction is something we haven't done a good job being consistent about in the history of the framework and we're going to have to figure it out at some point.
There was a problem hiding this comment.
Nit: Should this be indented like this? I haven't seen it before in the framework but kind of makes sense...
There was a problem hiding this comment.
Thanks for the feedback, apologies for the delay, looks like this PR fell off my radar (including a couple).
Nit: Should this be indented like this? I haven't seen it before in the framework but kind of makes sense...
Fixed.
Maybe in this case it's not so easy to handle those cases and we should just go with this for now... This mouse/touch and desktop/mobile distinction is something we haven't done a good job being consistent about in the history of the framework and we're going to have to figure it out at some point.
If you file an issue, please tag me, I'd love to help in any way possible. :)
fix test title
7deb729 to
4f54ea6
Compare
justinmc
left a comment
There was a problem hiding this comment.
LGTM 👍
I'll plan to gather a few examples of the desktop vs. mobile-with-keyboard-and-mouse distinction and then open an issue.
|
I think this should be reverted. I don't like when the framework is making decisions on my behalf. And this change makes the 2 settings for enabling the drag obsolete on desktop, which is bad. If the dev wants to block the drag, he/she should use the existing props to do it depending on the platform. drawerEnableOpenDragGesture and endDrawerEnableOpenDragGesture allows to disable this. How Are you going to explain this to thousand of developers that will encounter the 2 settings not working on desktop? Editing more docs? Really bad idea. Flutter doesn't have settings that become not-working for different platforms, not that I know of. |
Drawers are not draggable on desktop hence drawerEnableOpen(DragGesture) and endDrawerEnableOpen(DragGesture) . drag gestures property by definition won't be used when gestures are not supported in the first place on desktop. Please try this Material Drawer demo, this does not support drag to open drawers. In the same way, you can't drag to scroll a list on the desktop using gestures in Flutter |
|
Are you saying that desktop doesn't have drag and drop gesture? |
fixes #100321
minimal code sample
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.