Skip to content

Remove pressure customization from some pointer events#30414

Merged
dkwingsmt merged 8 commits intoflutter:masterfrom
dkwingsmt:remove-hover-pressure
Apr 10, 2019
Merged

Remove pressure customization from some pointer events#30414
dkwingsmt merged 8 commits intoflutter:masterfrom
dkwingsmt:remove-hover-pressure

Conversation

@dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Apr 3, 2019

Description

This PR removes parameter pressure from the constructors of the following classes:

  • PointerAddedEvent
  • PointerRemovedEvent
  • PointerHoverEvent
  • PointerEnterEvent
  • PointerExitEvent
  • PointerUpEvent
  • PointerCancelEvent

It also changes PointerEnterEvent.fromMouseEvent and PointerExitEvent.fromMouseEvent into redirecting to their unnamed constructors, which drops the arguments down and pressure from the source event.

For reasoning, migration, and discussion, see #30412.

Related Issues

Tests

It's not related to any tests.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

@dkwingsmt dkwingsmt requested a review from goderbauer April 3, 2019 01:05
@dkwingsmt dkwingsmt self-assigned this Apr 3, 2019
@dkwingsmt dkwingsmt added framework flutter/packages/flutter repository. See also f: labels. c: API break Backwards-incompatible API changes labels Apr 3, 2019
dkwingsmt added a commit to dkwingsmt/flutter that referenced this pull request Apr 3, 2019
@dkwingsmt
Copy link
Contributor Author

This PR contains the breaking change part that used to be in #30414.

@goderbauer
Copy link
Member

Did you follow the breaking change policy from the wiki? Can you link to the announcement? In the PR description? Thanks!

@dkwingsmt
Copy link
Contributor Author

@goderbauer I'm still preparing the announcement, and I found some other issues that I need to reassure before doing so. I will send an announcement, update this PR and make sure to leave enough time.

@dkwingsmt dkwingsmt changed the title Remove pressure from PointerHoverEvent constructor Remove pressure customization from some pointer events (Added, Hover, Up, Cancel, Removed) Apr 3, 2019
@dkwingsmt dkwingsmt changed the title Remove pressure customization from some pointer events (Added, Hover, Up, Cancel, Removed) Remove pressure customization from some pointer events Apr 3, 2019
@dkwingsmt
Copy link
Contributor Author

@goderbauer It seems no objection has been raised in the past 7 days since the proposal (link in PR description). Can you review the PR?

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkwingsmt dkwingsmt merged commit a821136 into flutter:master Apr 10, 2019
@dkwingsmt dkwingsmt deleted the remove-hover-pressure branch April 10, 2019 19:40
@jonahwilliams
Copy link
Contributor

This is breaking the embedded_android_views_integration_test

dkwingsmt added a commit that referenced this pull request Apr 10, 2019
dkwingsmt added a commit that referenced this pull request Apr 10, 2019
dkwingsmt added a commit that referenced this pull request May 3, 2019
* Revert "Revert "Remove pressure customization from some pointer events (#30414)" (#30873)"

This reverts commit f34c2ef.

* Revert pressure removal of PointerUpEvent

* Replace PR with an issue

* Add tests for fromMouseEvent
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

c: API break Backwards-incompatible API changes framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some event kinds shouldn't allow non-zero pressure

4 participants