Skip to content

feat: adds haptic feedback and checkmark to quickbuy#29279

Merged
joaosantos15 merged 4 commits into
mainfrom
TSA-430-quickbuy-haptic
Apr 24, 2026
Merged

feat: adds haptic feedback and checkmark to quickbuy#29279
joaosantos15 merged 4 commits into
mainfrom
TSA-430-quickbuy-haptic

Conversation

@joaosantos15

@joaosantos15 joaosantos15 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Description

Refactor QuickBuy confirm button with blue color, animated spinner-to-checkmark transition, and haptic feedback.

  • Replace generic Button with custom QuickBuyConfirmButton component
  • Button is now blue (colors.primary.default) with 12px border radius, matching Figma design
  • On transaction submission, show white spinner; on success, transition to checkmark icon with scale animation
  • Add haptic feedback: NotificationFeedbackType.Success on tx success, .Error on failure (Perps pattern)
  • Auto-close sheet 800ms after success state appears
  • Update hook to track button state (idle | loading | success) instead of separate isConfirmLoading boolean
quickbuy-checkmark.mp4

Changelog

CHANGELOG entry: no-changelog

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Moderate risk: changes the QuickBuy transaction submission UX (new success phase, delayed close, and haptic feedback) and replaces the design-system Button with a custom component, which could affect interaction/disabled states during bridging.

Overview
Updates the QuickBuy confirm flow to use a custom QuickBuyConfirmButton that supports an idle/loading/success state, showing a spinner during submission and an animated checkmark on success.

Refactors useQuickBuyBottomSheet to expose confirmButtonState (replacing isConfirmLoading), trigger haptic feedback on success/error via expo-haptics, and delay sheet close by ~800ms after a successful submit before navigating to Routes.TRANSACTIONS_VIEW. Tests are updated to assert the new state model.

Reviewed by Cursor Bugbot for commit 74b79d0. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbotv2 metamaskbotv2 Bot added the team-social-ai Social & AI team label Apr 23, 2026
@joaosantos15 joaosantos15 marked this pull request as ready for review April 23, 2026 16:04
@github-actions github-actions Bot added risk:high AI analysis: high risk size-M labels Apr 23, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e1a702a. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

AI PR Analysis

🚫 Merge safe: false | 🟠 Risk: high

Merge decision: AI analysis did not complete — manual review required before merging.

AI analysis did not complete. Manual review recommended.

View run

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.24%. Comparing base (8542e14) to head (713c1d8).
⚠️ Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
...ents/QuickBuyBottomSheet/useQuickBuyBottomSheet.ts 16.66% 4 Missing and 1 partial ⚠️
...ents/QuickBuyBottomSheet/QuickBuyConfirmButton.tsx 71.42% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29279      +/-   ##
==========================================
+ Coverage   82.23%   82.24%   +0.01%     
==========================================
  Files        5107     5127      +20     
  Lines      134974   135691     +717     
  Branches    30358    30548     +190     
==========================================
+ Hits       110997   111604     +607     
- Misses      16410    16462      +52     
- Partials     7567     7625      +58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Bigshmow
Bigshmow previously approved these changes Apr 23, 2026
@joaosantos15 joaosantos15 added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Apr 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 7 changed files are within the SocialLeaderboard/TraderPositionView/QuickBuyBottomSheet directory, which is a feature-flagged (aiSocialLeaderboardEnabled) component with no corresponding E2E tests in the e2e/ directory (confirmed by grep). The changes are:

  1. Refactoring the confirm button state from a boolean isConfirmLoading to a tri-state confirmButtonState ('idle' | 'loading' | 'success')
  2. Adding haptic feedback via expo-haptics on transaction success/error
  3. Adding a new animated QuickBuyConfirmButton component with visual state transitions
  4. Adding an 800ms delay before closing the sheet after successful transaction

These are isolated UI/UX improvements to a feature-flagged component. No shared components (TabBar, Navigation, BottomSheet infrastructure, confirmations flow), controllers, Engine, or core infrastructure are modified. The bridge/swap hooks are consumed but not changed. No E2E tests exist for this feature area, and the changes don't affect any code paths tested by existing E2E suites.

Performance Test Selection:
The changes add haptic feedback and a brief 800ms animation delay on transaction success within a feature-flagged component. This has no impact on core performance metrics like app launch, login, account list rendering, swap flows, or asset loading. No performance tests are warranted.

View GitHub Actions results

@joaosantos15 joaosantos15 enabled auto-merge April 24, 2026 06:14
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
75.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@joaosantos15 joaosantos15 added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit 600d4b1 Apr 24, 2026
77 of 78 checks passed
@joaosantos15 joaosantos15 deleted the TSA-430-quickbuy-haptic branch April 24, 2026 08:58
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.76.0 Issue or pull request that will be included in release 7.76.0 label Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.76.0 Issue or pull request that will be included in release 7.76.0 risk:high AI analysis: high risk size-M skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants