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

fix: swipe to reply not working on first try 🍒 #3069

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 4, 2024

This PR was automatically cherry-picked based on the following PR:

Original PR description:



PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

As noticed by some, the swipeToReply doesn't work properly on first time.

Causes

  1. It was working fine when using a 1.6.x stable version of Compose Foundation.
  2. It broke when moving to an early 1.7.0-alpha version.
  3. It seemed "fixed" after updating to later 1.7.0-betaversion.

But, it seems that it has a breaking change now that I'm not sure if is intended or not, so I opened an issue on Google's Issue Tracker.

We override the local touchSlop to make easier to scroll through the messages without activating the swipe action.

But with these new versions of Foundation, when overriding the the touchSlop locally using a CompositionLocalProvider, we need to make sure that both the AnchoredDraggableState and the anchoredDraggable modifier are used within the same local composition provider.

Solutions

Just move the AnchoredDraggableState initialisation inside the CompositionLocalProvider.

ALSO, a slight improvement: reduce a bit the drag required to reply. When developing it I was a bit unsure if 25% or 33% of the screen was best initially, but 33% is a bit too much compared to the experience in other messengers.

Testing

Manually tested


PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@github-actions github-actions bot added cherry-pick PR is cherry-picking changes from another banch size/XS labels Jun 4, 2024
@vitorhugods vitorhugods enabled auto-merge June 4, 2024 07:37
Copy link

sonarqubecloud bot commented Jun 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@AndroidBob
Copy link
Collaborator

Build 5137 succeeded.

The build produced the following APK's:

@vitorhugods vitorhugods disabled auto-merge June 4, 2024 10:43
@vitorhugods vitorhugods merged commit b5b269d into develop Jun 4, 2024
11 checks passed
@vitorhugods vitorhugods deleted the fix/swipe-to-reply-not-working-on-first-try-cherry-pick branch June 4, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick PR is cherry-picking changes from another banch size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants