Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Feb 9, 2021

WIP - status: evaluating impact :)

This is also related to Issue #40107, #70866 / PR #75354

Design Document

Both changes (this and #75354) are part of an overhaul on default ScrollBehaviors. These changes are non-trivial and can be breaking to folks expecting different defaults in existing applications. Currently working on a larger picture design doc that incorporates both of these.

I think there should also be (in this change or another) a way to provide your own ScrollConfiguration/ScrollBehavior in the *App widgets, or theming support for ease of control over these behaviors.

Fixes #71322

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Piinks Piinks added c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels. c: API break Backwards-incompatible API changes f: scrolling Viewports, list views, slivers, etc. platform-web Web applications specifically a: desktop Running on desktop labels Feb 9, 2021
@flutter-dashboard flutter-dashboard bot added f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. labels Feb 9, 2021
@google-cla google-cla bot added the cla: yes label Feb 9, 2021
@Piinks Piinks changed the title [WIP] Disable dragging on Scrollables on desktop [WIP] Disable dragging Scrollables on desktop Feb 9, 2021
@Piinks
Copy link
Contributor Author

Piinks commented Mar 10, 2021

This is currently blocked on #75059 and #75180
This also needs to be updated to remove the web handling, and focus more on PointerDeviceKind in combination with Desktop platforms to decide whether dragging should be allowed.

@renancaraujo
Copy link
Contributor

renancaraujo commented Mar 17, 2021

@Piinks An idea for tackling the PointerDeviceKind thing:

Part 1 (not currently blocked by #75059 or #75180)- Make gesture recognizers receive a set of pointer kinds instead of only one kind.

As of today, a gesture recog can either accept all or only one specified kind, this would make room for us still accept touch and stylus drags (IDK if it is the case of keeping the stylus drag scroll or not) but ignore the mouse ones.

Part 2: Add this set of PointerDeviceKind to ScrollBehavior (or a boolean like acceptMouseDrag to simplify things) and pass it to the recognizers in a scrollable.

I would open a PR with these right away but since we have an ongoing initiative I didn't want to waste people's time reviewing it.

@Piinks
Copy link
Contributor Author

Piinks commented Mar 23, 2021

Closing for now as we re-evaluate the design. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop c: API break Backwards-incompatible API changes c: new feature Nothing broken; request for a new capability f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. platform-web Web applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature_request] Disable scrolling by drag with a mouse

2 participants